From 66359b80d9c1f702b162beaeccbc0600efa0c21f Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 19:03:11 -0700 Subject: [PATCH 01/32] document async transport requirement (#6541) --- sdk/identity/azure-identity/README.md | 6 ++++++ sdk/keyvault/azure-keyvault-keys/README.md | 10 +++++----- sdk/keyvault/azure-keyvault-secrets/README.md | 10 +++++----- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index b80aa7cb539b..22b1bf6c2019 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -173,6 +173,12 @@ client = EventHubClient(host, event_hub_path, credential) ``` ## Async credentials: +This library includes a complete async API supported on Python 3.5+. To use the +async credentials in `azure.identity.aio`, you must first install an async +transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. + This example demonstrates authenticating the asynchronous `SecretClient` from [`azure-keyvault-secrets`][azure_keyvault_secrets] with asynchronous credentials. ```py diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index 0690e0822427..44d5ee7e9179 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -153,10 +153,11 @@ for key in keys: ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Key Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Asynchronously create a Key `create_rsa_key` and `create_ec_key` create RSA and elliptic curve keys in the vault, respectively. @@ -257,7 +258,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y 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. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity diff --git a/sdk/keyvault/azure-keyvault-secrets/README.md b/sdk/keyvault/azure-keyvault-secrets/README.md index ab50a297d194..a94af9ac724b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-keyvault-secrets/README.md @@ -148,10 +148,11 @@ This example lists all the secrets in the specified Key Vault. ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Secret Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Async create a secret This example creates a secret in the Key Vault with the specified optional arguments. @@ -247,7 +248,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y 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. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity From 379c1a1623de99d63b15b79a0ec8e56a8c163879 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 29 Jul 2019 19:44:44 -0700 Subject: [PATCH 02/32] [AutoPR] alertsmanagement/resource-manager (#5697) * Generated from f4b30b3785ae1fa51f4333f2acd863137d9c84b2 (#5696) removed "required" field from ExpandDetectorParameter * Packaging update of azure-mgmt-alertsmanagement * Packaging update of azure-mgmt-alertsmanagement * regenerated package * recent version * update history and version... again... * added note about general breaking changes --- .../azure-mgmt-alertsmanagement/HISTORY.rst | 21 + .../azure-mgmt-alertsmanagement/MANIFEST.in | 4 + .../azure-mgmt-alertsmanagement/README.rst | 21 +- .../azure/mgmt/alertsmanagement/__init__.py | 7 +- ...client.py => _alerts_management_client.py} | 61 +- .../mgmt/alertsmanagement/_configuration.py | 55 + .../mgmt/alertsmanagement/models/__init__.py | 192 +- ....py => _alerts_management_client_enums.py} | 35 + .../mgmt/alertsmanagement/models/_models.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_models_py3.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_paged_models.py | 79 + .../mgmt/alertsmanagement/models/alert.py | 46 - .../models/alert_modification.py | 47 - .../models/alert_modification_item.py | 54 - .../models/alert_modification_item_py3.py | 54 - .../models/alert_modification_properties.py | 41 - .../alert_modification_properties_py3.py | 41 - .../models/alert_modification_py3.py | 47 - .../alertsmanagement/models/alert_paged.py | 27 - .../models/alert_properties.py | 36 - .../models/alert_properties_py3.py | 36 - .../mgmt/alertsmanagement/models/alert_py3.py | 46 - .../alertsmanagement/models/alerts_summary.py | 46 - .../models/alerts_summary_group.py | 41 - .../models/alerts_summary_group_item.py | 41 - .../models/alerts_summary_group_item_py3.py | 41 - .../models/alerts_summary_group_py3.py | 41 - .../models/alerts_summary_py3.py | 46 - .../alertsmanagement/models/essentials.py | 138 -- .../alertsmanagement/models/essentials_py3.py | 138 -- .../mgmt/alertsmanagement/models/operation.py | 32 - .../models/operation_display.py | 40 - .../models/operation_display_py3.py | 40 - .../models/operation_paged.py | 27 - .../alertsmanagement/models/operation_py3.py | 32 - .../mgmt/alertsmanagement/models/resource.py | 45 - .../alertsmanagement/models/resource_py3.py | 45 - .../alertsmanagement/models/smart_group.py | 118 -- .../models/smart_group_aggregated_property.py | 32 - .../smart_group_aggregated_property_py3.py | 32 - .../models/smart_group_modification.py | 47 - .../models/smart_group_modification_item.py | 54 - .../smart_group_modification_item_py3.py | 54 - .../smart_group_modification_properties.py | 45 - ...smart_group_modification_properties_py3.py | 45 - .../models/smart_group_modification_py3.py | 47 - .../models/smart_group_py3.py | 118 -- .../models/smart_groups_list.py | 32 - .../models/smart_groups_list_py3.py | 32 - .../alertsmanagement/operations/__init__.py | 10 +- .../operations/_action_rules_operations.py | 575 ++++++ ...ts_operations.py => _alerts_operations.py} | 162 +- .../{operations.py => _operations.py} | 20 +- .../_smart_detector_alert_rules_operations.py | 436 +++++ ...rations.py => _smart_groups_operations.py} | 180 +- .../azure/mgmt/alertsmanagement/version.py | 2 +- .../azure-mgmt-alertsmanagement/setup.py | 2 +- 57 files changed, 5003 insertions(+), 2191 deletions(-) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/{alerts_management_client.py => _alerts_management_client.py} (57%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/{alerts_management_client_enums.py => _alerts_management_client_enums.py} (84%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{alerts_operations.py => _alerts_operations.py} (81%) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{operations.py => _operations.py} (87%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{smart_groups_operations.py => _smart_groups_operations.py} (70%) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst index 2719b1b9c080..145999b84643 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst @@ -3,6 +3,27 @@ Release History =============== +0.2.0rc1 (2019-07-29) ++++++++++++++++++++++ + +**Features** + +- Added operation AlertsOperations.meta_data +- Added operation group SmartDetectorAlertRulesOperations +- Added operation group ActionRulesOperations + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- AlertsManagementClient cannot be imported from `azure.mgmt.alertsmanagement.alerts_management_client` anymore (import from `azure.mgmt.alertsmanagement` works like before) +- AlertsManagementClientConfiguration import has been moved from `azure.mgmt.alertsmanagement.alerts_management_client` to `azure.mgmt.alertsmanagement` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.models.my_class` (import from `azure.mgmt.alertsmanagement.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.operations.my_class_operations` (import from `azure.mgmt.alertsmanagement.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.1.0 (2018-09-17) ++++++++++++++++++ diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in index bb37a2723dae..e4884efef41b 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in @@ -1 +1,5 @@ +recursive-include tests *.py *.yaml include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst index aa17aea1b51f..dad7b90d290e 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Alerts Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py index 5512ab09648e..97a96941bfdd 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .alerts_management_client import AlertsManagementClient -from .version import VERSION +from ._configuration import AlertsManagementClientConfiguration +from ._alerts_management_client import AlertsManagementClient +__all__ = ['AlertsManagementClient', 'AlertsManagementClientConfiguration'] -__all__ = ['AlertsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py similarity index 57% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py index 735b0c12b85c..dea82c97209f 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py @@ -11,46 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.alerts_operations import AlertsOperations -from .operations.smart_groups_operations import SmartGroupsOperations -from . import models - - -class AlertsManagementClientConfiguration(AzureConfiguration): - """Configuration for AlertsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'http://localhost' - - super(AlertsManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import AlertsManagementClientConfiguration +from .operations import Operations +from .operations import AlertsOperations +from .operations import SmartGroupsOperations +from .operations import ActionRulesOperations +from .operations import SmartDetectorAlertRulesOperations +from . import models class AlertsManagementClient(SDKClient): @@ -65,6 +33,10 @@ class AlertsManagementClient(SDKClient): :vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations :ivar smart_groups: SmartGroups operations :vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations + :ivar action_rules: ActionRules operations + :vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations + :ivar smart_detector_alert_rules: SmartDetectorAlertRules operations + :vartype smart_detector_alert_rules: azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -73,17 +45,18 @@ class AlertsManagementClient(SDKClient): Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, subscription_id1, base_url=None): - self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url) super(AlertsManagementClient, 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-05-05' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -93,3 +66,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.smart_groups = SmartGroupsOperations( self._client, self.config, self._serialize, self._deserialize) + self.action_rules = ActionRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.smart_detector_alert_rules = SmartDetectorAlertRulesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py new file mode 100644 index 000000000000..cc778d8d1c6d --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class AlertsManagementClientConfiguration(AzureConfiguration): + """Configuration for AlertsManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, subscription_id1, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if subscription_id1 is None: + raise ValueError("Parameter 'subscription_id1' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AlertsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.subscription_id1 = subscription_id1 diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py index b5d44aef16b9..84870cf01aa0 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py @@ -10,46 +10,97 @@ # -------------------------------------------------------------------------- try: - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .resource_py3 import Resource - from .essentials_py3 import Essentials - from .alert_properties_py3 import AlertProperties - from .alert_py3 import Alert - from .alert_modification_item_py3 import AlertModificationItem - from .alert_modification_properties_py3 import AlertModificationProperties - from .alert_modification_py3 import AlertModification - from .smart_group_modification_item_py3 import SmartGroupModificationItem - from .smart_group_modification_properties_py3 import SmartGroupModificationProperties - from .smart_group_modification_py3 import SmartGroupModification - from .alerts_summary_group_item_py3 import AlertsSummaryGroupItem - from .alerts_summary_group_py3 import AlertsSummaryGroup - from .alerts_summary_py3 import AlertsSummary - from .smart_group_aggregated_property_py3 import SmartGroupAggregatedProperty - from .smart_group_py3 import SmartGroup - from .smart_groups_list_py3 import SmartGroupsList + from ._models_py3 import ActionGroup + from ._models_py3 import ActionGroupsInformation + from ._models_py3 import ActionRule + from ._models_py3 import ActionRuleProperties + from ._models_py3 import Alert + from ._models_py3 import AlertModification + from ._models_py3 import AlertModificationItem + from ._models_py3 import AlertModificationProperties + from ._models_py3 import AlertProperties + from ._models_py3 import AlertRule + from ._models_py3 import AlertRulePatchObject + from ._models_py3 import AlertsMetaData + from ._models_py3 import AlertsMetaDataProperties + from ._models_py3 import AlertsSummary + from ._models_py3 import AlertsSummaryGroup + from ._models_py3 import AlertsSummaryGroupItem + from ._models_py3 import AzureResource + from ._models_py3 import Condition + from ._models_py3 import Conditions + from ._models_py3 import Detector + from ._models_py3 import Diagnostics + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponse1, ErrorResponse1Exception + from ._models_py3 import ErrorResponseBody + from ._models_py3 import Essentials + from ._models_py3 import ManagedResource + from ._models_py3 import MonitorServiceDetails + from ._models_py3 import MonitorServiceList + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PatchObject + from ._models_py3 import Resource + from ._models_py3 import Scope + from ._models_py3 import SmartGroup + from ._models_py3 import SmartGroupAggregatedProperty + from ._models_py3 import SmartGroupModification + from ._models_py3 import SmartGroupModificationItem + from ._models_py3 import SmartGroupModificationProperties + from ._models_py3 import Suppression + from ._models_py3 import SuppressionConfig + from ._models_py3 import SuppressionSchedule + from ._models_py3 import ThrottlingInformation except (SyntaxError, ImportError): - from .operation_display import OperationDisplay - from .operation import Operation - from .resource import Resource - from .essentials import Essentials - from .alert_properties import AlertProperties - from .alert import Alert - from .alert_modification_item import AlertModificationItem - from .alert_modification_properties import AlertModificationProperties - from .alert_modification import AlertModification - from .smart_group_modification_item import SmartGroupModificationItem - from .smart_group_modification_properties import SmartGroupModificationProperties - from .smart_group_modification import SmartGroupModification - from .alerts_summary_group_item import AlertsSummaryGroupItem - from .alerts_summary_group import AlertsSummaryGroup - from .alerts_summary import AlertsSummary - from .smart_group_aggregated_property import SmartGroupAggregatedProperty - from .smart_group import SmartGroup - from .smart_groups_list import SmartGroupsList -from .operation_paged import OperationPaged -from .alert_paged import AlertPaged -from .alerts_management_client_enums import ( + from ._models import ActionGroup + from ._models import ActionGroupsInformation + from ._models import ActionRule + from ._models import ActionRuleProperties + from ._models import Alert + from ._models import AlertModification + from ._models import AlertModificationItem + from ._models import AlertModificationProperties + from ._models import AlertProperties + from ._models import AlertRule + from ._models import AlertRulePatchObject + from ._models import AlertsMetaData + from ._models import AlertsMetaDataProperties + from ._models import AlertsSummary + from ._models import AlertsSummaryGroup + from ._models import AlertsSummaryGroupItem + from ._models import AzureResource + from ._models import Condition + from ._models import Conditions + from ._models import Detector + from ._models import Diagnostics + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponse1, ErrorResponse1Exception + from ._models import ErrorResponseBody + from ._models import Essentials + from ._models import ManagedResource + from ._models import MonitorServiceDetails + from ._models import MonitorServiceList + from ._models import Operation + from ._models import OperationDisplay + from ._models import PatchObject + from ._models import Resource + from ._models import Scope + from ._models import SmartGroup + from ._models import SmartGroupAggregatedProperty + from ._models import SmartGroupModification + from ._models import SmartGroupModificationItem + from ._models import SmartGroupModificationProperties + from ._models import Suppression + from ._models import SuppressionConfig + from ._models import SuppressionSchedule + from ._models import ThrottlingInformation +from ._paged_models import ActionRulePaged +from ._paged_models import AlertPaged +from ._paged_models import AlertRulePaged +from ._paged_models import OperationPaged +from ._paged_models import SmartGroupPaged +from ._alerts_management_client_enums import ( Severity, SignalType, AlertState, @@ -58,6 +109,11 @@ AlertModificationEvent, SmartGroupModificationEvent, State, + ScopeType, + Operator, + SuppressionType, + ActionRuleStatus, + AlertRuleState, TimeRange, AlertsSortByFields, AlertsSummaryGroupByFields, @@ -65,26 +121,53 @@ ) __all__ = [ - 'OperationDisplay', - 'Operation', - 'Resource', - 'Essentials', - 'AlertProperties', + 'ActionGroup', + 'ActionGroupsInformation', + 'ActionRule', + 'ActionRuleProperties', 'Alert', + 'AlertModification', 'AlertModificationItem', 'AlertModificationProperties', - 'AlertModification', - 'SmartGroupModificationItem', - 'SmartGroupModificationProperties', - 'SmartGroupModification', - 'AlertsSummaryGroupItem', - 'AlertsSummaryGroup', + 'AlertProperties', + 'AlertRule', + 'AlertRulePatchObject', + 'AlertsMetaData', + 'AlertsMetaDataProperties', 'AlertsSummary', - 'SmartGroupAggregatedProperty', + 'AlertsSummaryGroup', + 'AlertsSummaryGroupItem', + 'AzureResource', + 'Condition', + 'Conditions', + 'Detector', + 'Diagnostics', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponse1', 'ErrorResponse1Exception', + 'ErrorResponseBody', + 'Essentials', + 'ManagedResource', + 'MonitorServiceDetails', + 'MonitorServiceList', + 'Operation', + 'OperationDisplay', + 'PatchObject', + 'Resource', + 'Scope', 'SmartGroup', - 'SmartGroupsList', + 'SmartGroupAggregatedProperty', + 'SmartGroupModification', + 'SmartGroupModificationItem', + 'SmartGroupModificationProperties', + 'Suppression', + 'SuppressionConfig', + 'SuppressionSchedule', + 'ThrottlingInformation', 'OperationPaged', 'AlertPaged', + 'SmartGroupPaged', + 'ActionRulePaged', + 'AlertRulePaged', 'Severity', 'SignalType', 'AlertState', @@ -93,6 +176,11 @@ 'AlertModificationEvent', 'SmartGroupModificationEvent', 'State', + 'ScopeType', + 'Operator', + 'SuppressionType', + 'ActionRuleStatus', + 'AlertRuleState', 'TimeRange', 'AlertsSortByFields', 'AlertsSummaryGroupByFields', diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py similarity index 84% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py index f3295fc6ef88..2d9334e583c7 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py @@ -81,6 +81,41 @@ class State(str, Enum): closed = "Closed" +class ScopeType(str, Enum): + + resource_group = "ResourceGroup" + resource = "Resource" + + +class Operator(str, Enum): + + equals = "Equals" + not_equals = "NotEquals" + contains = "Contains" + does_not_contain = "DoesNotContain" + + +class SuppressionType(str, Enum): + + always = "Always" + once = "Once" + daily = "Daily" + weekly = "Weekly" + monthly = "Monthly" + + +class ActionRuleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AlertRuleState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class TimeRange(str, Enum): oneh = "1h" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py new file mode 100644 index 000000000000..a602fe2c9347 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + 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 scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, **kwargs): + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.conditions = kwargs.get('conditions', None) + self.description = kwargs.get('description', None) + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = kwargs.get('status', None) + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + 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 scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = kwargs.get('custom_email_subject', None) + self.custom_webhook_payload = kwargs.get('custom_webhook_payload', None) + self.group_ids = kwargs.get('group_ids', None) + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + 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 id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, **kwargs): + super(ActionRule, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, **kwargs): + super(AlertModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, **kwargs): + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = kwargs.get('modifications', None) + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AlertProperties, self).__init__(**kwargs) + self.essentials = kwargs.get('essentials', None) + self.context = kwargs.get('context', None) + self.egress_config = kwargs.get('egress_config', None) + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = kwargs.get('location', "global") + self.tags = kwargs.get('tags', None) + + +class AlertRule(AzureResource): + """The alert rule information. + + 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 id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRule, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.detector = kwargs.get('detector', None) + self.scope = kwargs.get('scope', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, **kwargs): + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs): + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, **kwargs): + super(AlertsSummary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = kwargs.get('total', None) + self.smart_groups_count = kwargs.get('smart_groups_count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Condition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.values = kwargs.get('values', None) + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, **kwargs): + super(Conditions, self).__init__(**kwargs) + self.severity = kwargs.get('severity', None) + self.monitor_service = kwargs.get('monitor_service', None) + self.monitor_condition = kwargs.get('monitor_condition', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.alert_rule_id = kwargs.get('alert_rule_id', None) + self.description = kwargs.get('description', None) + self.alert_context = kwargs.get('alert_context', None) + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Detector, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.parameters = kwargs.get('parameters', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.supported_resource_types = kwargs.get('supported_resource_types', None) + self.image_paths = kwargs.get('image_paths', None) + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + 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 scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Diagnostics, self).__init__(**kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse1, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, 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 Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = kwargs.get('target_resource', None) + self.target_resource_name = kwargs.get('target_resource_name', None) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceList, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :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(OperationDisplay, 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 PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PatchObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.tags = kwargs.get('tags', None) + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Scope, self).__init__(**kwargs) + self.scope_type = kwargs.get('scope_type', None) + self.values = kwargs.get('values', None) + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = kwargs.get('alerts_count', None) + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = kwargs.get('resources', None) + self.resource_types = kwargs.get('resource_types', None) + self.resource_groups = kwargs.get('resource_groups', None) + self.monitor_services = kwargs.get('monitor_services', None) + self.monitor_conditions = kwargs.get('monitor_conditions', None) + self.alert_states = kwargs.get('alert_states', None) + self.alert_severities = kwargs.get('alert_severities', None) + self.next_link = kwargs.get('next_link', None) + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = kwargs.get('modifications', None) + self.next_link = kwargs.get('next_link', None) + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + 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 scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, **kwargs): + super(Suppression, self).__init__(**kwargs) + self.suppression_config = kwargs.get('suppression_config', None) + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, **kwargs): + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = kwargs.get('recurrence_type', None) + self.schedule = kwargs.get('schedule', None) + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.recurrence_values = kwargs.get('recurrence_values', None) + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py new file mode 100644 index 000000000000..635be9d76f8e --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + 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 scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = scope + self.conditions = conditions + self.description = description + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = status + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + 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 scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, *, action_group_id: str, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionGroup, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.action_group_id = action_group_id + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, *, group_ids, custom_email_subject: str=None, custom_webhook_payload: str=None, **kwargs) -> None: + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = custom_email_subject + self.custom_webhook_payload = custom_webhook_payload + self.group_ids = group_ids + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(ManagedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + 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 id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, *, location: str, tags=None, properties=None, **kwargs) -> None: + super(ActionRule, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.properties = properties + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertModification, self).__init__(**kwargs) + self.properties = properties + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, *, modifications=None, **kwargs) -> None: + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = modifications + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: + super(AlertProperties, self).__init__(**kwargs) + self.essentials = essentials + self.context = context + self.egress_config = egress_config + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, location: str="global", tags=None, **kwargs) -> None: + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = location + self.tags = tags + + +class AlertRule(AzureResource): + """The alert rule information. + + 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 id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, state, severity, frequency, detector, scope, action_groups, location: str="global", tags=None, description: str=None, throttling=None, **kwargs) -> None: + super(AlertRule, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.detector = detector + self.scope = scope + self.action_groups = action_groups + self.throttling = throttling + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, tags=None, description: str=None, state=None, severity=None, frequency=None, action_groups=None, throttling=None, **kwargs) -> None: + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = tags + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.action_groups = action_groups + self.throttling = throttling + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = properties + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs) -> None: + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsSummary, self).__init__(**kwargs) + self.properties = properties + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = total + self.smart_groups_count = smart_groups_count + self.groupedby = groupedby + self.values = values + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = name + self.count = count + self.groupedby = groupedby + self.values = values + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, operator=None, values=None, **kwargs) -> None: + super(Condition, self).__init__(**kwargs) + self.operator = operator + self.values = values + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, *, severity=None, monitor_service=None, monitor_condition=None, target_resource_type=None, alert_rule_id=None, description=None, alert_context=None, **kwargs) -> None: + super(Conditions, self).__init__(**kwargs) + self.severity = severity + self.monitor_service = monitor_service + self.monitor_condition = monitor_condition + self.target_resource_type = target_resource_type + self.alert_rule_id = alert_rule_id + self.description = description + self.alert_context = alert_context + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, *, id: str, parameters=None, name: str=None, description: str=None, supported_resource_types=None, image_paths=None, **kwargs) -> None: + super(Detector, self).__init__(**kwargs) + self.id = id + self.parameters = parameters + self.name = name + self.description = description + self.supported_resource_types = supported_resource_types + self.image_paths = image_paths + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + 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 scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Diagnostics, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse1, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = target_resource + self.target_resource_name = target_resource_name + self.target_resource_group = target_resource_group + self.target_resource_type = target_resource_type + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, *, data, **kwargs) -> None: + super(MonitorServiceList, self).__init__(**kwargs) + self.data = data + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, status=None, tags=None, **kwargs) -> None: + super(PatchObject, self).__init__(**kwargs) + self.status = status + self.tags = tags + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, scope_type=None, values=None, **kwargs) -> None: + super(Scope, self).__init__(**kwargs) + self.scope_type = scope_type + self.values = values + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = alerts_count + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = resources + self.resource_types = resource_types + self.resource_groups = resource_groups + self.monitor_services = monitor_services + self.monitor_conditions = monitor_conditions + self.alert_states = alert_states + self.alert_severities = alert_severities + self.next_link = next_link + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = name + self.count = count + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = properties + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = modifications + self.next_link = next_link + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + 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 scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, *, suppression_config, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Suppression, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.suppression_config = suppression_config + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, *, recurrence_type, schedule=None, **kwargs) -> None: + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = recurrence_type + self.schedule = schedule + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, *, start_date: str=None, end_date: str=None, start_time: str=None, end_time: str=None, recurrence_values=None, **kwargs) -> None: + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.start_time = start_time + self.end_time = end_time + self.recurrence_values = recurrence_values + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, *, duration=None, **kwargs) -> None: + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = duration diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py new file mode 100644 index 000000000000..aece7093df75 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.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. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class SmartGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SmartGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SmartGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SmartGroupPaged, self).__init__(*args, **kwargs) +class ActionRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`ActionRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ActionRule]'} + } + + def __init__(self, *args, **kwargs): + + super(ActionRulePaged, self).__init__(*args, **kwargs) +class AlertRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`AlertRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AlertRule]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py deleted file mode 100644 index 634c2c747b17..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.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 .resource import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, **kwargs): - super(Alert, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py deleted file mode 100644 index e2d77167596c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.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 .resource import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, **kwargs): - super(AlertModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py deleted file mode 100644 index 50915b06ce40..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.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 AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py deleted file mode 100644 index b051daad6d2a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_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 AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py deleted file mode 100644 index c1d1b8123ecd..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.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 AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, **kwargs): - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = kwargs.get('modifications', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py deleted file mode 100644 index 51e67637a07a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_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 AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, *, modifications=None, **kwargs) -> None: - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = modifications diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py deleted file mode 100644 index b7cae8114091..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_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 .resource_py3 import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py deleted file mode 100644 index 2ae2c88ee2e1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class AlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`Alert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} - } - - def __init__(self, *args, **kwargs): - - super(AlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py deleted file mode 100644 index a8c7b761aba5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.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 AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AlertProperties, self).__init__(**kwargs) - self.essentials = kwargs.get('essentials', None) - self.context = kwargs.get('context', None) - self.egress_config = kwargs.get('egress_config', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py deleted file mode 100644 index a6c9cf43db24..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_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 AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: - super(AlertProperties, self).__init__(**kwargs) - self.essentials = essentials - self.context = context - self.egress_config = egress_config diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py deleted file mode 100644 index 4068ed33b63a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_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 .resource_py3 import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(Alert, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py deleted file mode 100644 index 9521d5cb5d32..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.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 .resource import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, **kwargs): - super(AlertsSummary, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py deleted file mode 100644 index 470f52f8efdf..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.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 AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = kwargs.get('total', None) - self.smart_groups_count = kwargs.get('smart_groups_count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py deleted file mode 100644 index 232fd9f12e08..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.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 AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py deleted file mode 100644 index f802c4f1eaa3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_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 AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = name - self.count = count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py deleted file mode 100644 index b9d4c71d3403..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_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 AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = total - self.smart_groups_count = smart_groups_count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py deleted file mode 100644 index ed41ea6d10de..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_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 .resource_py3 import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertsSummary, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py deleted file mode 100644 index a333d42f1b82..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py +++ /dev/null @@ -1,138 +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 Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = kwargs.get('target_resource', None) - self.target_resource_name = kwargs.get('target_resource_name', None) - self.target_resource_group = kwargs.get('target_resource_group', None) - self.target_resource_type = kwargs.get('target_resource_type', None) - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py deleted file mode 100644 index 01052b35702e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py +++ /dev/null @@ -1,138 +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 Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = target_resource - self.target_resource_name = target_resource_name - self.target_resource_group = target_resource_group - self.target_resource_type = target_resource_type - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py deleted file mode 100644 index 1b5fea4ff02a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.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 Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py deleted file mode 100644 index 89c4bdd6ccb6..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.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 OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :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(OperationDisplay, 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) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py deleted file mode 100644 index fa3740dfc655..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_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 OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py deleted file mode 100644 index 3794d02c84f1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py deleted file mode 100644 index ee66b4cfa181..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_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 Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py deleted file mode 100644 index 7454d56b9033..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.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 msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py deleted file mode 100644 index 83ff9951fb91..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_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 msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py deleted file mode 100644 index b1754f67fb4c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py +++ /dev/null @@ -1,118 +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 .resource import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = kwargs.get('alerts_count', None) - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = kwargs.get('resources', None) - self.resource_types = kwargs.get('resource_types', None) - self.resource_groups = kwargs.get('resource_groups', None) - self.monitor_services = kwargs.get('monitor_services', None) - self.monitor_conditions = kwargs.get('monitor_conditions', None) - self.alert_states = kwargs.get('alert_states', None) - self.alert_severities = kwargs.get('alert_severities', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py deleted file mode 100644 index 4681ff600eff..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.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 SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py deleted file mode 100644 index 5a6bfb2d896e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_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 SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = name - self.count = count diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py deleted file mode 100644 index b0c27ebc02c4..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.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 .resource import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py deleted file mode 100644 index b87b7a06465d..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.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 SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py deleted file mode 100644 index aa07075fb384..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_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 SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py deleted file mode 100644 index 5535552813b3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.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 msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = kwargs.get('modifications', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py deleted file mode 100644 index 40d128112187..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_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 msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = modifications - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py deleted file mode 100644 index b8cb946b706a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_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 .resource_py3 import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py deleted file mode 100644 index a0c00f029485..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py +++ /dev/null @@ -1,118 +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 .resource_py3 import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = alerts_count - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = resources - self.resource_types = resource_types - self.resource_groups = resource_groups - self.monitor_services = monitor_services - self.monitor_conditions = monitor_conditions - self.alert_states = alert_states - self.alert_severities = alert_severities - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py deleted file mode 100644 index 17302096edc5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.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 SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, **kwargs): - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py deleted file mode 100644 index 538de5af7747..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_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 SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, *, next_link: str=None, value=None, **kwargs) -> None: - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = next_link - self.value = value diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py index 9341f4bfee3b..946b389ce5fb 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py @@ -9,12 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .alerts_operations import AlertsOperations -from .smart_groups_operations import SmartGroupsOperations +from ._operations import Operations +from ._alerts_operations import AlertsOperations +from ._smart_groups_operations import SmartGroupsOperations +from ._action_rules_operations import ActionRulesOperations +from ._smart_detector_alert_rules_operations import SmartDetectorAlertRulesOperations __all__ = [ 'Operations', 'AlertsOperations', 'SmartGroupsOperations', + 'ActionRulesOperations', + 'SmartDetectorAlertRulesOperations', ] diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py new file mode 100644 index 000000000000..4b988fecc8a6 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py @@ -0,0 +1,575 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ActionRulesOperations(object): + """ActionRulesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-05-preview" + + self.config = config + + def list_by_subscription( + self, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rule in a given subscription. + + List all action rules of the subscription and given input filters. + + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + 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 = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules'} + + def list_by_resource_group( + self, resource_group_name, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rules created in a resource group. + + List all action rules of the subscription, created in given resource + group and given input filters. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules'} + + def get_by_name( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Get action rule by name. + + Get a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + fetched + :type action_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_name.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def create_update( + self, resource_group_name, action_rule_name, action_rule, custom_headers=None, raw=False, **operation_config): + """Create/update an action rule. + + Creates/Updates a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + created/updated + :type action_rule_name: str + :param action_rule: action rule to be created/updated + :type action_rule: ~azure.mgmt.alertsmanagement.models.ActionRule + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(action_rule, 'ActionRule') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def delete( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete action rule. + + Deletes a given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be deleted + :type action_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('bool', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def update( + self, resource_group_name, action_rule_name, status=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Patch action rule. + + Update enabled flag and/or tags for the given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be updated + :type action_rule_name: str + :param status: Indicates if the given action rule is enabled or + disabled. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + action_rule_patch = models.PatchObject(status=status, tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(action_rule_patch, 'PatchObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py similarity index 81% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py index fd15f46bc817..7d0a9fa6d063 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py @@ -11,6 +11,7 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError from .. import models @@ -18,11 +19,14 @@ class AlertsOperations(object): """AlertsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + :ivar identifier: Identification of the information to be retrieved by API call. Constant value: "MonitorServiceList". """ models = models @@ -32,15 +36,70 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" + self.identifier = "MonitorServiceList" self.config = config + def meta_data( + self, custom_headers=None, raw=False, **operation_config): + """List alerts meta data information based on value of identifier + parameter. + + :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: AlertsMetaData or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertsMetaData or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.meta_data.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['identifier'] = self._serialize.query("self.identifier", self.identifier, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertsMetaData', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + meta_data.metadata = {'url': '/providers/Microsoft.AlertsManagement/alertsMetaData'} + def get_all( self, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, smart_group_id=None, include_context=None, include_egress_config=None, page_count=None, sort_by=None, sort_order=None, select=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """List all the existing alerts, where the results can be selective by - passing multiple filter parameters including time range and sorted on - specific fields. . + """List all existing alerts, where the results can be filtered on the + basis of multiple parameters (e.g. time range). The results can then be + sorted on the basis specific fields, with the default being + lastModifiedDateTime. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +110,20 @@ def get_all( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -73,14 +131,14 @@ def get_all( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param smart_group_id: Filter the alerts list by the Smart Group Id. Default value is none. :type smart_group_id: str - :param include_context: Include context which has data contextual to - the monitor service. Default value is false' + :param include_context: Include context which has contextual data + specific to the monitor service. Default value is false' :type include_context: bool :param include_egress_config: Include egress config which would be used for displaying the content in portal. Default value is 'false'. @@ -102,9 +160,9 @@ def get_all( others. Possible values include: 'asc', 'desc' :type sort_order: str :param select: This filter allows to selection of the fields(comma - seperated) which would be part of the the essential section. This - would allow to project only the required fields rather than getting - entire content. Default is to fetch all the fields in the essentials + separated) which would be part of the essential section. This would + allow to project only the required fields rather than getting entire + content. Default is to fetch all the fields in the essentials section. :type select: str :param time_range: Filter by time range by below listed values. @@ -128,8 +186,7 @@ def get_all( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.get_all.metadata['url'] @@ -192,6 +249,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +262,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts'} @@ -259,7 +319,6 @@ def get_by_id( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -272,7 +331,7 @@ def get_by_id( def change_state( self, alert_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state of the alert. + """Change the state of an alert. :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -321,7 +380,6 @@ def change_state( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -334,7 +392,9 @@ def change_state( def get_history( self, alert_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of an alert. + """Get the history of an alert, which captures any monitor condition + changes (Fired/Resolved) and alert state changes + (New/Acknowledged/Closed). :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -379,7 +439,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertModification', response) @@ -392,10 +451,13 @@ def get_history( def get_summary( self, groupby, include_smart_groups_count=None, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """Summary of alerts with the count each severity. + """Get a summarized count of your alerts grouped by various parameters + (e.g. grouping by 'Severity' returns the count of alerts for each + severity). - :param groupby: This parameter allows the result set to be aggregated - by input fields. For example, groupby=severity,alertstate. Possible + :param groupby: This parameter allows the result set to be grouped by + input fields (Maximum 2 comma separated fields supported). For + example, groupby=severity or groupby=severity,alertstate. Possible values include: 'severity', 'alertState', 'monitorCondition', 'monitorService', 'signalType', 'alertRule' :type groupby: str or @@ -412,21 +474,20 @@ def get_summary( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -434,8 +495,8 @@ def get_summary( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param time_range: Filter by time range by below listed values. Default value is 1 day. Possible values include: '1h', '1d', '7d', @@ -510,7 +571,6 @@ def get_summary( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertsSummary', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py similarity index 87% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py index 9718bb4566f6..057900f678f2 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py @@ -19,11 +19,13 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config @@ -52,8 +54,7 @@ def list( ~azure.mgmt.alertsmanagement.models.OperationPaged[~azure.mgmt.alertsmanagement.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -78,6 +79,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -88,12 +94,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.AlertsManagement/operations'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py new file mode 100644 index 000000000000..2cc0b1152ea4 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py @@ -0,0 +1,436 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SmartDetectorAlertRulesOperations(object): + """SmartDetectorAlertRulesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01" + + self.config = config + + def list( + self, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription. + + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + 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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def list_by_resource_group( + self, resource_group_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + 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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def get( + self, resource_group_name, alert_rule_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """Get a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def create_or_update( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~azure.mgmt.alertsmanagement.models.AlertRule + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AlertRule') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + if response.status_code == 201: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def patch( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Patch a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: + ~azure.mgmt.alertsmanagement.models.AlertRulePatchObject + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.patch.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AlertRulePatchObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def delete( + self, resource_group_name, alert_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete an existing Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py similarity index 70% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py index 8ff2c33ae120..bd4c0cfce5c1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py @@ -18,11 +18,13 @@ class SmartGroupsOperations(object): """SmartGroupsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -32,15 +34,15 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config def get_all( self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config): - """Get all smartGroups within the subscription. + """Get all Smart Groups within a specified subscription. - List all the smartGroups within the specified subscription. . + List all the Smart Groups within a specified subscription. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +53,20 @@ def get_all( :param target_resource_type: Filter by target resource type. Default value is select all. :type target_resource_type: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param smart_group_state: Filter by state of the smart group. Default @@ -82,7 +83,7 @@ def get_all( "includeContent" filter is selected, maximum value allowed is 25. Default value is 25. :type page_count: int - :param sort_by: Sort the query results by input field Default value + :param sort_by: Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'. Possible values include: 'alertsCount', 'state', 'severity', 'startDateTime', 'lastModifiedDateTime' @@ -97,79 +98,89 @@ def get_all( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: SmartGroupsList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroupsList or - ~msrest.pipeline.ClientRawResponse + :return: An iterator like instance of SmartGroup + :rtype: + ~azure.mgmt.alertsmanagement.models.SmartGroupPaged[~azure.mgmt.alertsmanagement.models.SmartGroup] :raises: :class:`ErrorResponseException` """ - # Construct URL - url = self.get_all.metadata['url'] - 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 = {} - if target_resource is not None: - query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_group is not None: - query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') - if monitor_service is not None: - query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') - if monitor_condition is not None: - query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') - if severity is not None: - query_parameters['severity'] = self._serialize.query("severity", severity, 'str') - if smart_group_state is not None: - query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') - if time_range is not None: - query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if page_count is not None: - query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') - if sort_by is not None: - query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') - if sort_order is not None: - query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SmartGroupsList', response) - + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_all.metadata['url'] + 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 = {} + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if monitor_condition is not None: + query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if smart_group_state is not None: + query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') + if time_range is not None: + query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') + if page_count is not None: + query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') + if sort_by is not None: + query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') + if sort_order is not None: + query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.SmartGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups'} def get_by_id( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get information of smart alerts group. + """Get information related to a specific Smart Group. - Get details of smart group. + Get information related to a specific Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -213,9 +224,8 @@ def get_by_id( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -232,8 +242,7 @@ def get_by_id( def change_state( self, smart_group_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state from unresolved to resolved and all the alerts within - the smart group will also be resolved. + """Change the state of a Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -281,9 +290,8 @@ def change_state( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -300,7 +308,8 @@ def change_state( def get_history( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of smart group. + """Get the history a smart group, which captures any Smart Group state + changes (New/Acknowledged/Closed) . :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -345,7 +354,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SmartGroupModification', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py index e0ec669828cb..fda99682a9d1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0rc1" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py index 129b94c14ea7..899d78df4c87 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ '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', From 7a0f5d377c97d7bef8491b3e1857dfd397ec2609 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 03/32] Synchronous username/password auth (#6416) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 4 +- .../identity/_internal/msal_credentials.py | 98 +++++++++++------ .../azure/identity/constants.py | 4 + .../azure/identity/credentials.py | 100 +++++++++++++++--- .../azure-identity/tests/test_identity.py | 31 ++++++ .../tests/{helpers.py => keys_helpers.py} | 0 .../tests/test_challenge_auth.py | 2 +- .../tests/test_challenge_auth_async.py | 2 +- 9 files changed, 194 insertions(+), 49 deletions(-) rename sdk/keyvault/azure-keyvault-keys/tests/{helpers.py => keys_helpers.py} (100%) diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index 512b415a27ec..fd23d51c8e32 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -8,6 +8,7 @@ ClientSecretCredential, EnvironmentCredential, ManagedIdentityCredential, + UsernamePasswordCredential, ) @@ -35,4 +36,5 @@ def __init__(self, **kwargs): "DefaultAzureCredential", "EnvironmentCredential", "ManagedIdentityCredential", + "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index 9ea29a25784d..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .msal_credentials import ConfidentialClientCredential -from .msal_transport_adapter import MsalTransportResponse, MsalTransportAdapter +from .msal_credentials import ConfidentialClientCredential, PublicClientCredential +from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse 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 9bf44cbb3219..83906bf71c2e 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py @@ -5,35 +5,40 @@ """Credentials wrapping MSAL applications and delegating token acquisition and caching to them. This entails monkeypatching MSAL's OAuth client with an adapter substituting an azure-core pipeline for Requests. """ - +import abc import time +import msal +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from .msal_transport_adapter import MsalTransportAdapter + try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False + ABC = abc.ABC +except AttributeError: # Python 2.7, abc exists, but not ABC + ABC = abc.ABCMeta("ABC", (object,), {"__slots__": ()}) # type: ignore try: from unittest import mock except ImportError: # python < 3.3 import mock # type: ignore +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + if TYPE_CHECKING: # pylint:disable=unused-import - from typing import Any, Mapping, Optional, Union + from typing import Any, Mapping, Optional, Type, Union -from azure.core.credentials import AccessToken -from azure.core.exceptions import ClientAuthenticationError -import msal - -from .msal_transport_adapter import MsalTransportAdapter - -class MsalCredential(object): +class MsalCredential(ABC): """Base class for credentials wrapping MSAL applications""" - def __init__(self, client_id, authority, app_class, client_credential=None, **kwargs): - # type: (str, str, msal.ClientApplication, Optional[Union[str, Mapping[str, str]]], Any) -> None + def __init__(self, client_id, authority, client_credential=None, **kwargs): + # type: (str, str, Optional[Union[str, Mapping[str, str]]], Any) -> None self._authority = authority self._client_credential = client_credential self._client_id = client_id @@ -41,35 +46,35 @@ def __init__(self, client_id, authority, app_class, client_credential=None, **kw self._adapter = kwargs.pop("msal_adapter", None) or MsalTransportAdapter(**kwargs) # postpone creating the wrapped application because its initializer uses the network - self._app_class = app_class self._msal_app = None # type: Optional[msal.ClientApplication] - @property - def _app(self): + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + @abc.abstractmethod + def _get_app(self): # type: () -> msal.ClientApplication - """The wrapped MSAL application""" + pass - if not self._msal_app: - # MSAL application initializers use msal.authority to send AAD tenant discovery requests - with mock.patch("msal.authority.requests", self._adapter): - app = self._app_class( - client_id=self._client_id, client_credential=self._client_credential, authority=self._authority - ) + def _create_app(self, cls): + # type: (Type[msal.ClientApplication]) -> msal.ClientApplication + """Creates an MSAL application, patching msal.authority to use an azure-core pipeline during tenant discovery""" - # monkeypatch the app to replace requests.Session with MsalTransportAdapter - app.client.session = self._adapter - self._msal_app = app + # MSAL application initializers use msal.authority to send AAD tenant discovery requests + with mock.patch("msal.authority.requests", self._adapter): + app = cls(client_id=self._client_id, client_credential=self._client_credential, authority=self._authority) - return self._msal_app + # monkeypatch the app to replace requests.Session with MsalTransportAdapter + app.client.session = self._adapter + + return app class ConfidentialClientCredential(MsalCredential): """Wraps an MSAL ConfidentialClientApplication with the TokenCredential API""" - def __init__(self, **kwargs): - # type: (Any) -> None - super(ConfidentialClientCredential, self).__init__(app_class=msal.ConfidentialClientApplication, **kwargs) - def get_token(self, *scopes): # type: (str) -> AccessToken @@ -79,10 +84,37 @@ def get_token(self, *scopes): # First try to get a cached access token or if a refresh token is cached, redeem it for an access token. # Failing that, acquire a new token. - app = self._app # type: msal.ConfidentialClientApplication + app = self._get_app() result = app.acquire_token_silent(scopes, account=None) or app.acquire_token_for_client(scopes) if "access_token" not in result: raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) return AccessToken(result["access_token"], now + 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 + + +class PublicClientCredential(MsalCredential): + """Wraps an MSAL PublicClientApplication with the TokenCredential API""" + + def __init__(self, **kwargs): + # type: (Any) -> None + super(PublicClientCredential, self).__init__( + authority="https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations"), **kwargs + ) + + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + def _get_app(self): + # type: () -> msal.PublicClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.PublicClientApplication) + return self._msal_app diff --git a/sdk/identity/azure-identity/azure/identity/constants.py b/sdk/identity/azure-identity/azure/identity/constants.py index 5b50dd98625b..1c2608e5da8b 100644 --- a/sdk/identity/azure-identity/azure/identity/constants.py +++ b/sdk/identity/azure-identity/azure/identity/constants.py @@ -13,6 +13,10 @@ class EnvironmentVariables: AZURE_CLIENT_CERTIFICATE_PATH = "AZURE_CLIENT_CERTIFICATE_PATH" CERT_VARS = (AZURE_CLIENT_ID, AZURE_CLIENT_CERTIFICATE_PATH, AZURE_TENANT_ID) + AZURE_USERNAME = "AZURE_USERNAME" + AZURE_PASSWORD = "AZURE_PASSWORD" + USERNAME_PASSWORD_VARS = (AZURE_CLIENT_ID, AZURE_USERNAME, AZURE_PASSWORD) + MSI_ENDPOINT = "MSI_ENDPOINT" MSI_SECRET = "MSI_SECRET" diff --git a/sdk/identity/azure-identity/azure/identity/credentials.py b/sdk/identity/azure-identity/azure/identity/credentials.py index d53edf8e2c62..2e09a306aa71 100644 --- a/sdk/identity/azure-identity/azure/identity/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/credentials.py @@ -6,6 +6,7 @@ Credentials for Azure SDK authentication. """ import os +import time from azure.core import Configuration from azure.core.credentials import AccessToken @@ -14,6 +15,7 @@ from ._authn_client import AuthnClient from ._base import ClientSecretCredentialBase, CertificateCredentialBase +from ._internal import PublicClientCredential from ._managed_identity import ImdsCredential, MsiCredential from .constants import Endpoints, EnvironmentVariables @@ -26,6 +28,7 @@ # pylint:disable=unused-import from typing import Any, Dict, Mapping, Optional, Union from azure.core.credentials import TokenCredential + EnvironmentCredentialTypes = Union["CertificateCredential", "ClientSecretCredential", "UsernamePasswordCredential"] # pylint:disable=too-few-public-methods @@ -96,23 +99,29 @@ def get_token(self, *scopes): class EnvironmentCredential: """ - Authenticates as a service principal using a client ID/secret pair or a certificate, - depending on environment variable settings. - - These environment variables are required: + Authenticates as a service principal using a client secret or a certificate, or as a user with a username and + password, depending on environment variable settings. Configuration is attempted in this order, using these + environment variables: + Service principal with secret: - **AZURE_CLIENT_ID**: the service principal's client ID + - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. - Additionally, set **one** of these to configure client secret or certificate authentication: - - - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets + Service principal with certificate: + - **AZURE_CLIENT_ID**: the service principal's client ID - **AZURE_CLIENT_CERTIFICATE_PATH**: path to a PEM-encoded certificate file including the private key + - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. + + User with username and password: + - **AZURE_CLIENT_ID**: the application's client ID + - **AZURE_USERNAME**: a username (usually an email address) + - **AZURE_PASSWORD**: that user's password """ def __init__(self, **kwargs): # type: (Mapping[str, Any]) -> None - self._credential = None # type: Optional[Union[CertificateCredential, ClientSecretCredential]] + self._credential = None # type: Optional[EnvironmentCredentialTypes] if all(os.environ.get(v) is not None for v in EnvironmentVariables.CLIENT_SECRET_VARS): self._credential = ClientSecretCredential( @@ -128,6 +137,14 @@ def __init__(self, **kwargs): certificate_path=os.environ[EnvironmentVariables.AZURE_CLIENT_CERTIFICATE_PATH], **kwargs ) + elif all(os.environ.get(v) is not None for v in EnvironmentVariables.USERNAME_PASSWORD_VARS): + self._credential = UsernamePasswordCredential( + client_id=os.environ[EnvironmentVariables.AZURE_CLIENT_ID], + username=os.environ[EnvironmentVariables.AZURE_USERNAME], + password=os.environ[EnvironmentVariables.AZURE_PASSWORD], + tenant=os.environ.get(EnvironmentVariables.AZURE_TENANT_ID), # optional for username/password auth + **kwargs + ) def get_token(self, *scopes): # type (*str) -> AccessToken @@ -139,10 +156,7 @@ def get_token(self, *scopes): :raises: :class:`azure.core.exceptions.ClientAuthenticationError` """ if not self._credential: - message = "Missing environment settings. To authenticate with one of the service principal's client secrets, set {}. To authenticate with a certificate, set {}.".format( - ", ".join(EnvironmentVariables.CLIENT_SECRET_VARS), ", ".join(EnvironmentVariables.CERT_VARS) - ) - raise ClientAuthenticationError(message=message) + raise ClientAuthenticationError(message="Incomplete environment configuration.") return self._credential.get_token(*scopes) @@ -233,3 +247,65 @@ def _get_error_message(history): else: attempts.append(credential.__class__.__name__) return "No valid token received. {}".format(". ".join(attempts)) + + +class UsernamePasswordCredential(PublicClientCredential): + """ + Authenticates a user with a username and password. In general, Microsoft doesn't recommend this kind of + authentication, because it's less secure than other authentication flows. + + Authentication with this credential is not interactive, so it is **not compatible with any form of + multi-factor authentication or consent prompting**. The application must already have the user's consent. + + This credential can only authenticate work and school accounts; Microsoft accounts are not supported. + See this document for more information about account types: + https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/sign-up-organization + + :param str client_id: the application's client ID + :param str username: the user's username (usually an email address) + :param str password: the user's password + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant. + """ + + def __init__(self, client_id, username, password, **kwargs): + # type: (str, str, str, Any) -> None + super(UsernamePasswordCredential, self).__init__(client_id=client_id, **kwargs) + self._username = username + self._password = password + + def get_token(self, *scopes): + # type (*str) -> AccessToken + """ + Request an access token for `scopes`. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # MSAL requires scopes be a list + scopes = list(scopes) # type: ignore + now = int(time.time()) + + app = self._get_app() + accounts = app.get_accounts(username=self._username) + result = None + for account in accounts: + result = app.acquire_token_silent(scopes, account=account) + if result: + break + + if not result: + # cache miss -> request a new token + result = app.acquire_token_by_username_password( + username=self._username, password=self._password, scopes=scopes + ) + + if "access_token" not in result: + raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index b017792595a8..4e7fb13b4f6b 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -21,6 +21,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential from azure.identity.constants import EnvironmentVariables @@ -239,3 +240,33 @@ def test_imds_credential_retries(): def test_default_credential(): DefaultAzureCredential() + + +def test_username_password_credential(): + expected_token = "access-token" + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + credential = UsernamePasswordCredential( + client_id="some-guid", + username="user@azure", + password="secret_password", + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + token = credential.get_token("scope") + assert token.token == expected_token diff --git a/sdk/keyvault/azure-keyvault-keys/tests/helpers.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py similarity index 100% rename from sdk/keyvault/azure-keyvault-keys/tests/helpers.py rename to sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py index 04ead0b933b1..13054cc0b1d2 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py @@ -18,7 +18,7 @@ from azure.keyvault.keys._shared import ChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import mock_response, Request, validating_transport +from keys_helpers import mock_response, Request, validating_transport def test_challenge_cache(): diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py index c4d72b1c7550..27cda5f91d8e 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py @@ -19,7 +19,7 @@ from azure.keyvault.keys._shared import AsyncChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import async_validating_transport, mock_response, Request +from keys_helpers import async_validating_transport, mock_response, Request @pytest.mark.asyncio From f9f2db1050735d6f3f7a3cb6f0c4ee888b82f155 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 04/32] Synchronous interactive browser authentication (#6466) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 1 + .../_internal/auth_code_redirect_handler.py | 75 +++++++++++ .../azure/identity/browser_auth.py | 121 ++++++++++++++++++ .../azure-identity/tests/test_identity.py | 73 ++++++++++- 5 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py create mode 100644 sdk/identity/azure-identity/azure/identity/browser_auth.py diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index fd23d51c8e32..1df14dd617f5 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .browser_auth import InteractiveBrowserCredential from .credentials import ( CertificateCredential, ChainedTokenCredential, @@ -35,6 +36,7 @@ def __init__(self, **kwargs): "ClientSecretCredential", "DefaultAzureCredential", "EnvironmentCredential", + "InteractiveBrowserCredential", "ManagedIdentityCredential", "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse 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 new file mode 100644 index 000000000000..caaa9519033c --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py @@ -0,0 +1,75 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, Mapping, Optional + +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 + + +class AuthCodeRedirectHandler(BaseHTTPRequestHandler): + """HTTP request handler to capture the authentication server's response. + Largely from the Azure CLI: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/_profile.py + """ + + def do_GET(self): + if self.path.endswith("/favicon.ico"): # deal with legacy IE + self.send_response(204) + return + + query = self.path.split("?", 1)[-1] + query = parse_qs(query, keep_blank_values=True) + self.server.query_params = query + + self.send_response(200) + self.send_header("Content-Type", "text/html") + self.end_headers() + + self.wfile.write(b"Authentication complete. You can close this window.") + + def log_message(self, format, *args): # pylint: disable=redefined-builtin,unused-argument,no-self-use + pass # this prevents server dumping messages to stdout + + +class AuthCodeRedirectServer(HTTPServer): + """HTTP server that listens on localhost for the redirect request following an authorization code authentication""" + + query_params = {} # type: Mapping[str, Any] + + def __init__(self, port, timeout): + # type: (int, int) -> None + super(AuthCodeRedirectServer, self).__init__(("localhost", port), AuthCodeRedirectHandler) + self.timeout = timeout + + def wait_for_redirect(self): + # type: () -> Mapping[str, Any] + while not self.query_params: + try: + self.handle_request() + except ValueError: + # socket has been closed, probably by handle_timeout + break + + # ensure the underlying socket is closed (a no-op when the socket is already closed) + self.server_close() + + # if we timed out, this returns an empty dict + return self.query_params + + def handle_timeout(self): + """Break the request-handling loop by tearing down the server""" + self.server_close() diff --git a/sdk/identity/azure-identity/azure/identity/browser_auth.py b/sdk/identity/azure-identity/azure/identity/browser_auth.py new file mode 100644 index 000000000000..82460513092d --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/browser_auth.py @@ -0,0 +1,121 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import socket +import time +import uuid +import webbrowser + +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, List, Mapping + +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from ._internal import AuthCodeRedirectServer, ConfidentialClientCredential + + +class InteractiveBrowserCredential(ConfidentialClientCredential): + """ + Authenticates a user through the authorization code flow. This is an interactive flow: ``get_token`` opens a + browser to a login URL provided by Azure Active Directory, and waits for the user to authenticate there. + + Azure Active Directory documentation describes the authorization code flow in more detail: + https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code + + :param str client_id: the application's client ID + :param str secret: one of the application's client secrets + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant, which can authenticate work or school accounts. + *timeout (str)* - seconds to wait for the user to complete authentication. Defaults to 300 (5 minutes). + """ + + def __init__(self, client_id, client_secret, **kwargs): + # type: (str, str, Any) -> None + self._timeout = kwargs.pop("timeout", 300) + self._server_class = kwargs.pop("server_class", AuthCodeRedirectServer) # facilitate mocking + authority = "https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations") + super(InteractiveBrowserCredential, self).__init__( + client_id=client_id, client_credential=client_secret, authority=authority, **kwargs + ) + + def get_token(self, *scopes): + # type: (str) -> AccessToken + """ + Request an access token for `scopes`. This will open a browser to a login page and listen on localhost for a + request indicating authentication has completed. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # start an HTTP server on localhost to receive the redirect + for port in range(8400, 9000): + try: + server = self._server_class(port, timeout=self._timeout) + redirect_uri = "http://localhost:{}".format(port) + break + except socket.error: + continue # keep looking for an open port + + if not redirect_uri: + raise ClientAuthenticationError(message="Couldn't start an HTTP server on localhost") + + # get the url the user must visit to authenticate + scopes = list(scopes) # type: ignore + request_state = str(uuid.uuid4()) + app = self._get_app() + auth_url = app.get_authorization_request_url(scopes, redirect_uri=redirect_uri, state=request_state) + + # open browser to that url + webbrowser.open(auth_url) + + # block until the server times out or receives the post-authentication redirect + response = server.wait_for_redirect() + if not response: + raise ClientAuthenticationError( + message="Timed out after waiting {} seconds for the user to authenticate".format(self._timeout) + ) + + # redeem the authorization code for a token + code = self._parse_response(request_state, response) + now = int(time.time()) + result = app.acquire_token_by_authorization_code(code, scopes=scopes, redirect_uri=redirect_uri) + + if "access_token" not in result: + raise ClientAuthenticationError(message="Authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) + + def _parse_response(self, request_state, response): + # type: (str, Mapping[str, Any]) -> List[str] + """ + Validates ``response`` and returns the authorization code it contains, if authentication succeeded. Raises + :class:`azure.core.exceptions.ClientAuthenticationError`, if authentication failed or ``response`` is malformed. + """ + + if "error" in response: + message = "Authentication failed: {}".format(response.get("error_description") or response["error"]) + raise ClientAuthenticationError(message=message) + if "code" not in response: + # a response with no error or code is malformed; we don't know what to do with it + message = "Authentication server didn't send an authorization code" + raise ClientAuthenticationError(message=message) + + # response must include the state sent in the auth request + if "state" not in response: + raise ClientAuthenticationError(message="Authentication response doesn't include OAuth state") + if response["state"][0] != request_state: + raise ClientAuthenticationError(message="Authentication response's OAuth state doesn't match the request's") + + return response["code"] diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 4e7fb13b4f6b..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -2,15 +2,16 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +import functools import json import os import time import uuid try: - from unittest.mock import Mock + from unittest.mock import Mock, patch except ImportError: # python < 3.3 - from mock import Mock + from mock import Mock, patch import pytest from azure.core.credentials import AccessToken @@ -21,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -242,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From f5839013a2f1f2be7a06fd3a9c91e02e55d0fe8b Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Tue, 30 Jul 2019 16:27:05 -0700 Subject: [PATCH 05/32] we dont need thread locks (#6551) --- .../azure-core/azure/core/tracing/context.py | 38 +++++-------------- .../azure-core/tests/test_tracing_context.py | 11 ++---- 2 files changed, 13 insertions(+), 36 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/context.py b/sdk/core/azure-core/azure/core/tracing/context.py index a00f88f2d854..f8761cd71502 100644 --- a/sdk/core/azure-core/azure/core/tracing/context.py +++ b/sdk/core/azure-core/azure/core/tracing/context.py @@ -29,8 +29,8 @@ class ContextProtocol(Protocol): Implements set and get variables in a thread safe way. """ - def __init__(self, name, default, lock): - # type: (string, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (string, Any) -> None pass def clear(self): @@ -54,11 +54,10 @@ class _AsyncContext(object): Uses contextvars to set and get variables globally in a thread safe way. """ - def __init__(self, name, default, lock): + def __init__(self, name, default): self.name = name self.contextvar = contextvars.ContextVar(name) self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -78,8 +77,7 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - self.contextvar.set(value) + self.contextvar.set(value) class _ThreadLocalContext(object): @@ -88,11 +86,10 @@ class _ThreadLocalContext(object): """ _thread_local = threading.local() - def __init__(self, name, default, lock): - # type: (str, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (str, Any) -> None self.name = name self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -112,16 +109,14 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - setattr(self._thread_local, self.name, value) + setattr(self._thread_local, self.name, value) -class TracingContext: - _lock = threading.Lock() - +class TracingContext(object): def __init__(self): # type: () -> None - self.current_span = TracingContext._get_context_class("current_span", None) + context_class = _AsyncContext if contextvars else _ThreadLocalContext + self.current_span = context_class("current_span", None) def with_current_context(self, func): # type: (Callable[[Any], Any]) -> Any @@ -146,17 +141,4 @@ def call_with_current_context(*args, **kwargs): return call_with_current_context - @classmethod - def _get_context_class(cls, name, default_val): - # type: (str, Any) -> ContextProtocol - """ - Returns an instance of the the context class that stores the variable. - :param name: The key to store the variable in the context class - :param default_val: The default value of the variable if unset - :return: An instance that implements the context protocol class - """ - context_class = _AsyncContext if contextvars else _ThreadLocalContext - return context_class(name, default_val, cls._lock) - - tracing_context = TracingContext() diff --git a/sdk/core/azure-core/tests/test_tracing_context.py b/sdk/core/azure-core/tests/test_tracing_context.py index 59aa2c8a8b60..984d2ad480d3 100644 --- a/sdk/core/azure-core/tests/test_tracing_context.py +++ b/sdk/core/azure-core/tests/test_tracing_context.py @@ -34,19 +34,14 @@ def __exit__(self, exc_type, exc_val, exc_tb): class TestContext(unittest.TestCase): - def test_get_context_class(self): - with ContextHelper(): - slot = tracing_context._get_context_class("temp", 1) - assert slot.get() == 1 - slot.set(2) - assert slot.get() == 2 - def test_current_span(self): with ContextHelper(): - assert tracing_context.current_span.get() is None + assert not tracing_context.current_span.get() val = mock.Mock(spec=AbstractSpan) tracing_context.current_span.set(val) assert tracing_context.current_span.get() == val + tracing_context.current_span.clear() + assert not tracing_context.current_span.get() def test_with_current_context(self): with ContextHelper(tracer_to_use=mock.Mock(AbstractSpan)): From e833df051107a76c1fc793c84c8b8e5967e31c19 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 06/32] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../keys/_shared/async_client_base.py | 11 +- .../tests/keys_async_preparer.py | 16 +- .../test_keys_async.test_backup_restore.yaml | 294 +- ...t_keys_async.test_key_crud_operations.yaml | 886 ++--- .../test_keys_async.test_key_list.yaml | 522 ++- ...t_keys_async.test_key_wrap_and_unwrap.yaml | 354 +- ...est_keys_async.test_list_deleted_keys.yaml | 922 +++-- .../test_keys_async.test_list_versions.yaml | 520 ++- .../test_keys_async.test_purge.yaml | 1946 +++++----- .../test_keys_async.test_recover.yaml | 3248 +++++++---------- ...sync.test_example_key_crud_operations.yaml | 472 +-- ...sync.test_example_key_list_operations.yaml | 690 ++-- ...sync.test_example_keys_backup_restore.yaml | 294 +- ..._keys_async.test_example_keys_recover.yaml | 670 ++-- .../secrets/_shared/async_client_base.py | 9 +- ...c.test_example_secret_crud_operations.yaml | 340 +- ...c.test_example_secret_list_operations.yaml | 619 ++-- ...c.test_example_secrets_backup_restore.yaml | 337 +- ...ts_async.test_example_secrets_recover.yaml | 700 ++-- ...est_secrets_async.test_backup_restore.yaml | 281 +- ...crets_async.test_list_deleted_secrets.yaml | 945 ++--- ...test_secrets_async.test_list_versions.yaml | 507 ++- .../test_secrets_async.test_purge.yaml | 2032 +++++------ .../test_secrets_async.test_recover.yaml | 2956 +++++++-------- ...ets_async.test_secret_crud_operations.yaml | 459 ++- .../test_secrets_async.test_secret_list.yaml | 507 ++- .../tests/secrets_async_preparer.py | 16 +- 27 files changed, 9104 insertions(+), 11449 deletions(-) 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 0714edabf420..43368a0c6bc8 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 @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -100,11 +100,12 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, - DistributedTracingPolicy() + DistributedTracingPolicy(), ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py index a232358ec959..4db357acc42b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from keys_preparer import VaultClientPreparer from keys_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml index 1bdab8917b58..38a47ce653ba 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:49:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: - cache-control: - - no-cache - content-length: - - '10607' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10607' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10608' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml index 15050919b2c8..bd62679835e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml @@ -4,620 +4,650 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:50:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"enabled": true}, "tags": {"purpose": "unit test", "test - name": "CreateECKeyTest"}, "kty": "EC-HSM"}' + body: '{"kty": "EC-HSM", "attributes": {"enabled": true}, "tags": {"purpose": + "unit test", "test name": "CreateECKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '116' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/7e76b0fc24ca49de8d22b283874b4aa8","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"FDZyxw3F8gSsjKrFwIAxsZ7UFqXykyn9dhPZqUCZ2uw","y":"uwkjuEzOUxSMEh1gm35SysHWS9wrpCUObRu3bzy5eoE"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/3f38336e9de04e7ea3a3ba86094fe0c0","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"KPH8P9UF3zj4Mb-E16WdJk2yE1v4RYMbbI3eraGUS0Y","y":"wXamLF3U4ekD8lKEixbJ1JNaveo_aWkvD6fllRvCAz8"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit test","test name":"CreateECKeyTest"}}' headers: - cache-control: - - no-cache - content-length: - - '435' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '435' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/ccf44a9e1f0a4f65b16196c5115e7580","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Xp3Dh254KJvTKQEI-SEno4nr47Ste9Q0OozXC1mB3os","y":"jJ2D4Cm41HnPPyqeAtcPGUAOLX7e8B2dzBLz4-HpEiw"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/1085fdf8d174406bb92d1c4dc73559f0","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"29pQuyVmhkbuizq-9M-ngz-H59dPnQ07GpzXpWolEVE","y":"b3owWVWqXekjdSKuf5RnuJqyGAtUQr8J5DxP1CQhG4o"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '376' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '376' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-P-256-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"key": {"n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", - "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3", - "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", - "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], - "kty": "RSA", "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", - "e": "AQAB", "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + body: '{"key": {"kty": "RSA", "key_ops": ["encrypt", "decrypt", "sign", "verify", + "wrapKey", "unwrapKey"], "n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", + "e": "AQAB", "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ", + "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", "qi": "AJ_nrkLpK8BPzVeARkvSHQyKwMWZ-a8CD95qsKfn0dOZAvXY-2xhQYTEwbED-0bpTNEKbIpA-ZkaHygmnzJkNbbFAnb9pkkzU8ZQqDP3JNgMfVIroWx58Oth9nJza2j7i-MkPRCUPEq3Ao0J52z7WJIiLji8TTVYW_NaiM1oxzsH", - "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ"}}' + "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", + "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '1724' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5416109f.vault.azure.net/keys/import-test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/7123c497acc9445cb23e076358438cbe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/42143a5692c24ebb9e9b3a5e951aead6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '664' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '664' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/import-test-key + - api-version=7.0 + - '' - request: - body: '{"tags": {"test name ": "CreateRSAKeyTest", "purpose": "unit test"}, "key_ops": - ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], "kty": "RSA", - "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "tags": {"purpose": "unit test", "test name + ": "CreateRSAKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '177' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123?api-version=7.0 + uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '706' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '706' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' headers: - cache-control: - - no-cache - content-length: - - '80' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:32 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml index 51c87bd8cbb5..b32c1b43787b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:51:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/c3878937d48c43329f222ec5d2b76c1e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lJIfl9xtZMQVY21_qGFK5QXeCbwhavw_7CUAht9SAK_gIEG4AI4NIOeOi3dS0QdJTYfPUrcpySR7Bk3T87AqqBh-CKkWKIZ3nhYL6PAyycCddK4M4NWaQcwrjhi14AXZJi1qmokZIs92yvrXWy9oUh2QjatpCkL1EWtZph7UGHhWda4qU48-rL-e8BwN1LglFlR-fFTc6N_tfQHgdN0hQaM4YELOx9le2unTtPuR5acj_JTGBZwvttERTF5PBupYd3h3VbfTTecXG1EPsUelLHMRc1EaAw0q5vjwdbaLwDXfyvFEypkn8iEH_5CdYSFV0oPtwEpGi7yF4WThT6U4DQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/f69e28d9f4324473b5bd0975bef0b17f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r5KgC3SObkSXF1aWoNtdHkM9ht3YC6Hte6-DtL8A7B0XnOJWBt6GThkjd9rmrYcLE0MXjs-oskYY0Iir6cyQapZ3HEOi_zlOU09e7dk1piADk838EImb46UZxbnDtoCRlMX87JMRWFmEqKvUvkLjEf64IvN7QAleRJdwFx79CJ_qRhZbvVTd7ZD8vt5PFTccwDb_wM4TQdPnanEGHQZFFmB75faNZefnNRbROMwgUkFHSJu4Ono8nW-LsmLZlQKEZO5JiI69wA8VjgsLQXi1ION_ujDuFp5ojMG7YlD8G_njTGjHvdmhIqZmJSumNlGEPB1k4B2O281-l-hBK6A3wQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/b023d80926a5491abbdd63338ffc168b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tXG3Izs9RyCg-553a9N_Yz4N3H0AQEftAK4HNfmAM1JeEEci-F2ByaSeTs4R3jQYuQpJE1iY2YcQUop_ojFfy11CwUZnBR-wWYLj634VxuARoTDEFJTsWBACToK_D9IAsyphscqcmz3vBAnCkpnqd-Yc0UxBpLOBbv-RZfH-uuSm5xX33bU68h5ry1YDoxDK_3GEZg39SxjQu7j6T9nZmnfT1do_Ccny8TBAsViJJZga5SsjPAOwjSSw2-4ZIz2bvu65gWdck17IBulXTdatjpvdOOYoXudAHR3ZduDDkns6Id2gXuy4CHqwGCgKXpVaWd6C50w01JjGAFXuAS-TWw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/7abf970d281f4eb98e3f870688da9f89","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tkecVG8HJoW1QSh1DkZPm2op8q6Cvc6-0CpQjaobDBeJNSwbj_c-9Z8mEmIrGH-Inq89iSKvVXcvCOP7uiIkjOKFFzFpHc9ItdQqImNmDyLFlp8UBRyR8VTMxYiCq04i80www8Js1ALsp9Nup-2uVCrq-9z2pWUV8-QQO-1bgQJeUYkWHOsdv1uMkPBfLNNkFTSlSiAtHipNh2NtYi_OnkOofvrDFF4gX5ULllA4v17mZQspfeDU4llIJmEZNvTQXPLwQixX4hjBwXdH-7yGrEGPA_ZXPBl9ljkz0VjwJLZ294HEcLFfBcB66ePZ6rtRiMFZ345dGZKs4W38IMap8w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/37574dac891145798031bdc16ae59c2c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sG0yoon1QqM_RKNd0MAN2qmvjwSXCQ581sbogwBCNGcxX6CH2oRubUqVeQr4Nm__NGmjD4mikbKkkpxzaf9rd0-YCRpKRUL0ATCuhfIj8u0acP7uUPBrJXyqSsOUze0jvRCCCV9s3_QtqsLIxbID9uZuIu8xcJ5zkdYhtVWd2U9_601XWlboeWhWiTIMggsf5wj9PnTVYgM1tN4TY0AuFYjgb6FJD9MbJ92Y5bCDRH4Lpxze3bgskArHjOfZTVUjPd5_sCyi2a48Ky8u5N2uqEgv8OaNLML3JAeoSz07k7mg3hLnlDdldIgR0vdJPeW8MiwN1WkC2w35eRu4JGHXsQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/dcab406fd2b14132b97afa7241f0cdcd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pnYNev0ZqxpCrih-DOzgA0RRXfCPF4fS2DmFWitUvpYR8PmqEzg23NSkh5lsFtQDj0zIcE_hrbrf91ZXbXTi10bBjO7SystNXHplIiQOXKYPx5J7od8ADLLZwJMGCY-FLc2zGUHAWHRJlB0oYSKOxXREwziT0qOyIhubwUXR2hDOxE4GuAeQCMgaU_HyHG42RVWoWis2Wgg26miJTzdfs9LLzrqbsvUfFSG5skFq5SltyHyzeLVzBjIvxKoMt-R_8RacsbUXc85sJfMBym4V4FRH7xkgQMc_3_TmRvBbO7fS-QzD6V7Mfdv8bv1y4398LYVHQMtdomjJrylohwUlpw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/90b5aac48baa474f9c13e295e3d593fe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"y2AJUotY9EXCjtEq815wHGDerpkwIFgMRW-5vpt8RIhScsPc7-GK4Cog62_JwtRSduqJtEw3NWL6icZ8i-5HmRTfN-uDr7xt0iVs3sDVArc-osPBan07LTgiMPMyw_qlmwvzrdkl2LmSvipNZymHGcg-kUh7_7ZQS_ZxCAUNu9eA1zmjENAux3svJLl1ISXoVk9OwRXYeU7WdN82s8_GbkeAG6js-mazlO99z7iAM2eLKWV6rGqZgouBMfr3POBPhg895vgHDpCIX_1QQzGVwJld2mzuC81_dSDc6eTbQKEgf0Sr1-P8ywXo23DR76fYC7pzILh-LuFLnf-NbnmBpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/ff3f5ac04b114bcb8d398abd238d900d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uefbUngKT-RjMND2guq1DLRxUHBjJYNnWdYWd58Y6xodyu2aup8wQysPurgdYMQiNQI58JPo-7dlVgAi__63cZ357df1SzQOGx2erne-RJ5MzmxnB3W-Dg5d_w8Fv7wwbnkoZx8QUi54geI1Gp0o9qratTjNLjnbEFBNZ74E9NiMT63Ps_KU4-2l5HAQPXoXpehFfY4buvsVLNBIno_kBqrqAh1tSPTE7OT-uidwtxdFZAxtL_abz5XSR0sLwRmdrmDvqlaGWTniAWUD_l3imisOYj1I3bhshCwKlge3BJ6m706fgP7LGrTmtIZBJYBBNBsG9BrAskWyBYFDwCLzCw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/897d30c8c9a64c5baf42ddc28cc323a2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nBnwU-Tc_DQd5xt8pxaNa1jJytxCM6nXf0TLMG-K7fURjW8FuYpaUdLEkK8PXGzxrUdJVgR-9tRLjbDgYdqxa0RG4-jHy6Rwbm3XO7gUUoQrQzlDot7HBEvrjldOKfu-evN510V-ZrH1ABJ717cm2CPtmhyW7WQ_jGxmvFq-sWwhWOUfC6UpV7AnYyBkq_fAn9vnbPRH7dXoMf1G5lCtJ5uoAlt8ys9Vr6Bq1tkf3U2JW9-SnWwfb51dZjbRkKCVuqIVm90Ik7qnUoV-r32Ehdo1t-VbKpiTfyOdhxclV8fbgCQ2NO0P1oWoC6wDEs8ut_JaX-1V6NuiocpvmSt4Tw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/1783678540a949af87bb325dc25ca8a7","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"td-f0a_KPz3Koohs9dhl2kZuH9ZJa9xXhZrugBZBsOrTb6TbJuP1YcPSaKpseA_edeR-jT0gdm503PcKMskF5KQCtr5v90zOnpYWafJ_8Q16m7h9DjfChFkDxxIVvi68YMYwT-R0eL2Cr-9j5rotjqPp2wPBRFQ8hcH2FY4aJMvZ5CqTCI9Ci_S0DB26G2IbianCAYhn7_KHvZCnOFaP42UpqS5DDMnq1KJtIjImuAhOsmHtm6RvjUR9MPD4B9LxydnP0lzBhkzPXo9vnR8NeJjhGgALFyDB-09w7XzcroPDtq1--SmUpF9GqiXBoJnOa7TlQnCc7dphqGCTnPJtqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/689d4f8f09004d8aab516b94aca67d00","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"67VK0tZg5Ui7KAtcdVy4I4Y-IHca4jl966D8DWcj8ZEovCAGIWlQvFSlVRvFeEqrmoVD3zSeO5yXOQwKRzDI3rrKmc2a4b_so2cuCqxtP6OuMbiCzTS5vV57UpkqIDuN1IuyKjFnS9T_ZLAQE9y_4SLRXM9vUzzC0tCaOR924WJ-mEIfKtUlab6IytrcUHLdJi5kkO-882I-HptJfjzoyGAvHTmJIDuQWgMuMAkQP1-5ZG8V3pEinuj8FtLKcfmI8RGixEEAvTxO5FAre1aEeta2EdbsdIVTi85xXOcPu5LrWdo0URY400ytWN5yQvSDsCOEqO5Apdhk5elgl6trTw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/4ff953ee148d4cd8816f3dfbcade0691","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1ApBVUvnMDvdH_yGJfdTzMZmtwLm2k7tg_2IVywj5ZvxxTiZ5aTTCiwuVXjXzqMdGAcj3hmrAC7m0kr8gLSAXye5Tq-5oofu-48jZ91SzY9bWfi5Ss1NpaWTJ0RIe7bEvcjdYQprz1A5FIr_B7IaHYdhbkXz3qzf96gLq8elRBeSDev1NC4bFz0CkWKOeXZF3vTOsHo38q9Ne9XZMW_hEb0ln4ZCADsVV20pLZ4IZmsRIUuwwEaSAkaPzpJYOsGc3Oh_qRXr-hMRkdZv7dPYsZ1LfdeuIb9slHgBEza5OBb9NGOhNFMfk3Kyiez4rHdlk3JF7fPIvkt9St-7lnHJbQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/a1f7acfaafc34a6495a429c6aed2eadf","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"l0gxdJyCn-voQuNg_2bqrlOXgnQStVxXHDYdvBdOlZpoq2BzzvvC73MoPcldBuI5ySRiF8B1nx82yXQKnEabXpXWvvl70Ye36l7YrDrg_Dhq38MU4Uv7i_rdqdBQPG4tr6cBz0BWR5yHqGy4LL7dcWhLtyUH3-wbC74zj2KqjCGIx3AfadEwkR8HIjCGmLhbtaUbCEU5PoHrIfLOFt1u4Ah2NripLqv54n75PeJSXaRffSzQJOU6qC4eOnHcEbP85w9SsnSlOZp4gvjqN9JvwWaoy7E20anft6zt7tjFLG_inkASqUU8QcrN9SwBkV_saE4WAWcd31-6dBpeGY9Jww","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/3863898fb4ea4c8ca57c47785d614ba5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"x3Hyl5Sqttjt1gg_OK1g1ghjqGiDUrUpKkq5k7hiBs9KkYK5sSvKQCalGHWStOE2YUB5tt056_PYbXIG3KO_z58BNXy3yneEiqZxAWyPKDyvQcuyPj_zqXdDDMVuBe1mrIXTU5kgyQ3JgWB69PE6ALtAY6BnFz5vx97yLdgnebHzv486Ti23VdusiDagnLkY8_chGtcZZ-9VE8OSOrNH1zk46wxDP7gERk2O64nT_EKViMBn9vWTJs093v7SIrWrJKUXL8RGMPW5jJ1uCgdBDOPz5pWz1Wl6VLcqHfUsVjgKrU9QffxugIMeFpx9vSFUOVeKiI__iRHUTE0Y_T35Ow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb4dd0c0a.vault.azure.net/keys?api-version=7.0&maxresults=7 + uri: https://vaultb4dd0c0a.vault.azure.net/keys?maxresults=7&api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1133' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1133' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys + - maxresults=7&api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml index f4b7259e3499..d8b5e54d09b3 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml @@ -4,312 +4,252 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ny6wNPsxof_QVouEvyn1dKEiKG8hArgSRJzUhtQKuA9A5Nij2CxUdqgezqmm4CAqyj9sBuQqIHI_BO1RKq7Jea1BzfbWmce40hhPqa1RLDG8Kb_LrYRz3GavBXCl9QR_lzn5DQYawzLCQFKvt4lXOJVhSOAiGmAayV2axTNxCM---8pwfztqf6g4dc7cUEIiLc0ZtnzcqwmgBuLu2ysrEkVRvhRY517fp5M17OLQDmIx75f9y2Nc8t_w4ZsWhIZKiUJBDfNKcBxN08Nljnowhc2CwemQ5aZLQCPZiibsOMVIi9FufjBOTBxnD2MSoaGrIuEDrLv1Y1UEK1wHE_MFuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"kUy_5eJ-0LXYETECBi2NIkf184IoLXhY30v3XFmJYSyy4roFaUr-0CQNtZ-Rztee5M1LNJpROZ4uSZjSZgabLj-IGpO27NLc8_jw1tR956bLlphc2D4jPPq9AXEDotXGAjAop8FXUCyDYmAStaEu0VZWK66S9N1mFTRG46aiy4F4sj_68ZeMQDlbzrR6aH7zq-1FEuSiQGAVMkMGS4CCoXAWm68WexBui0_CgJbcd5z-050qEBkGVvWXYkAA_uko9hsQNNCCh7-pGW4hwavS-T8s2g95UOiYlDSJwzLUqSfw_mNWjr490gtP76OaHyT3DB5JGGeHFWLsGdJhW10rvQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527149,"updated":1564527149,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + body: '{"alg": "RSA-OAEP", "value": "RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//unwrapkey + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/wrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + body: '{"alg": "RSA-OAEP", "value": "X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/unwrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml index 235cb77d07bd..c59b3ce7c6e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml @@ -4,706 +4,678 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:53:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/a724cd7584454a3cbe29f3a05d7eef10","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nC7idSUXK32dkqtn8M-4UB3JoMvCGygFa1TlYH0nQQUvYGn7aNp5t1vtJFqq2Jlafl5pZhdHTumt-R-Plewno2zO3iyjza1MOTdeK8FJEHPpK7I7FNH01KdYnU5Q0xY95L8tbXUcQAYW7ankxMIeKxqrokt7flCGUQeXDwOalJIyQyFvdUe4buytdGHTMFV7lgHIQx4mvekZi3yzuWgyDiuohRd8Krb0lo6suUYOIetzbcXMWqrSRmQdEO_vvptApgSOwxPrqx7OkcNsrcgJkrXQzd6xjgho57GQ6u_TxmGB7uW3LBTKnwqgWOfmELKVCH5laRfjmZk2S-Fwc1tXyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f96ace71d4b941eca3ae0490e503d288","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"28DloB07w40yR2-_MHpdg-prfQ_xseRn-d10ZMoZg5jZaU1prixa2ZCWOtLXPVMsFU-fNOb4QtZJ3fJbJTVU-h-tPzKsixRwVljpiAwLw2wlRExZWUbQETs6Rd8B4q_GKJZpiHzO2-NLk61PJJyLoQ1iKA0SOIAtZMROAHx5CHuEc6wsuIsGEDpwdjncXH6-REvllgkOQ_SpfeiERvMlaAoFPceg4bi6SVE47xDGl0J1yEAaXiCba49o_jhO4SQ2fh2nYR-2sN5ZlgYFFVyPfp1PyvzL-NQLNp5KXwuQQY0-GNsXz-PWZMGstAqSRWjR76vWx5-lB0ohA7JwM_VCuw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527194,"updated":1564527194,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/4c4f6f8faf7b48a7bef7972fb705379d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"k8Ow-6LTG9ELTNRnQC3MqQncYGqmUY-6EgNnX1Ed5Q_SM8hJUl7dBtb8gVn0qc3KFy6Q32gBgveziuCaEaMK_wN48RCLmRLCuFsXmnHsHDdxMzEv2YL_dV0RrpcW0O0m-bgAt6z5aOOY4Pwa5EOBTyqNS5H56Rp9mm7MQijt1mcWRwOUHIRteZWpjQ2DPoSu20bufIldM97wdC7dZd38q5NFDY9W7TCNLTD__MEl-ySmkVRIEPaMpcObNtRPiB6kadylcgBsoAAR871Wzb1tdRiQkpyEko5of_9iAdZEbUY0XiG_zJpdFxfvy9rds3fXfXhSppolt-CC20IHfyjEqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/dca838942cc249aba2f9d052ee4d9bd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2azn8ADVPwbppZCfxsCvr_XKqCeA49ZRxxyuIUC-_Cue-13fIKGkHqFqbJVdJuPftJxsh1MmrUVcfUGMPsTFdUBCVfpuiFXEXSe9exEudUAZNmBYb3HiCbbu3ThWw2Z5-OioKDwf-qKA_H_vooI9YP-yYEDhJcfvjsiyxzBNGoLBld6yiPi3PhCw9kqvEHUYnS-XPgTqhJChf7g4oYRT-XMVPhR8nkbQ-NQ_IQjjZzxkhkpltWfEYX_KL0-Uy4x3kz2ykPtQXRpeZuaD2PpuRXIt5ssqTC4segtWiyzCKhp4H9A8pVbJKd_9fnSArsfNQXY0e5bJac6ZhJJd_ES2XQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/5c71fbc7997e4fe2b2aff141a6886d11","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nPBVYE_5WfYi6r0Z_rnhhYuBQe_qy67NeGm6dAJCSFT_4Mc2iitb5cJmEJO_0cUxMaiSWatpHzGYTzQ_c51yKjpW0CNX08FZi4ZO0JsZVUnUUL8gYjEK9VNNaeSJPvrNMHPsp-ee1TieBpdB-emZanoRtKVlotJ35-B5KYcs2BIv6KG81LI_F-ZFleqBAlR0u6ty1cggkEgz7OsKjIePcfG0wIdttqyzlKoYOVPTx6wWfHHZDcseTPWpikGUaSTi8GWL9HJ_BugI16JEW9WIALoWOlflQ7884UoH2S7WZ0wQ97MT0NbwdkwgcowiKzD6li0euweojvu2D8WYk1M-VQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f50f900706a24363be08c408cd3d8908","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"oMEeM4hmofM8AW7C67c_Jubcu1t9yh3uDLGSQP8cowwyKh3IVtLgyruzGwLoXF8B9gJZaj39iaKhMdPzc8metT1746Ub3vFiIGGXDBJ_R8EXPxSjSFvOn43QwRBQhEmfsqqnjIqHvj-e_IXyLtUMFj8HteNPbfpzAdlKsXAZhNd1l9INIekQZKfuOLRdB2SIMC6saG_gkQcL5y80lDozJCOQEhHfRdvVg5H1HDa994SPwGZqygKS-JTwYvNDyjFR2HMpAYK1d-2PHCLAMD-n-b_FRcg8EPU6g8DtEBqWpXSlFmTmBDA9hs9bVUZgbPMOIg0edSHPj4n4oxcupmsw9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/ae0bb0500b5a4899873962cedbd62ef3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1XLrHrA2xR35sNHz7Bl23TuCTwcdOO8aY891NJLUnxQUvPxj90vLf9iQA7Kd_J9-XxU3ImXY-qp0kOb7qJPeRI2MydpRxbpipmmU1aMjDhHReaY-4eiEt1Wq4H1i73qE62VnQMY04pSkweNqcG5GANlpuBKqmaFvi6uLeK0b38ioK5leJsZ-bQyVveNa23hxZ7bAt3WlMe1-eoh0S5yITRFIlq3GDieFC546e2oL0H-TJOPsdZ6aUiF9Ff2D9mMtw1V44ulaZHs9wyQXPPcukY495_yBPq7W6NvEq4C7FJgYroBRNw1wg7y_iFQ8cvf3vTfK2m8ofwtoaeePWC75lw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/7b75b1c578a94a1a814f889d2edfa79e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vm4vIl0Qd7O-kBaGB5xZUi-1s6PjVoiOOrA1vJC3jCYDb2YB-xO5Okibq_rrmeqKCGqA1BvjAYU5koHNuI81HwYLVnSuaH05xxX4h2_tDpupmHNMyvaixEAFldoS_rY6LXu0sjU-NiTxug8qesZSk2D6Y8dtblv87MxPbz11Asc-IjhseHzkn6U8HfPx4Z0IVRtKtC83Qa_fE5PvFXE-vgzDCKbJcpQKvk_ykByxZGyYn9etCJntKuPCob1w5MnFoWbIAvLmkd_xXr1c75jhRT1Wio6eKPUYk3oj13kn0Wci5t_MYz7PeAUVlLXgx38hxU6rlkAKI5_c_mEaLF4mpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/22e7a0ac26f541309d942aae55f56069","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"i3dwC_iG7Pnosa0C-7DGNoZ1mnH-wWPwXdYDPUr0Tl4ZQna3klAnLRO-yVO4zeB3t3kgVmQ3nYSw-M4HYM4FA-_BcbddPqcelUSWgD5LMH4SKW0sQyKPfeUWqgQQq1Q2K4LO55nLjPzu87FOdGT-fJ1hNCqCOWb6WMio6fIAA7Aw91ZfgDt1_icif_c7OzIyskD657ryxPn45P2t3z-XRUmYVg2Xt4WLSlqc-jScZtGYGNwq82E-t2IviQplaBvLB4sNtCRYzqu5NChFYUXEhZal87Q0kWTq6xZa9D-82OmwCk9WnHCia_XDf8zPNcQQsvMisoD-bDbipGZIHjLrPw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/57fccb90503944cf8c8cb4f5ff94cf96","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1FfP070rHhDf3XumOs1t9fiXrXnYxt4mj1JQaz73YveKVuUGZ8MhY05So7SZlTnCaYGjY0p_pyMJK5hMRQX_gSUXFdKsB3HJZdxcEEnsgkXoLHI4tpGfGjznjj-Ky0G4rV6hQjlsIf6n4nxRCiPG4CjJw7nWlBJn4eDw1HSwEFtKcMHIW0p79rrHhuHGMYRbGWAMYgVTkGypsH45e6PyVXE5ueEERzJKA0f4S9LioIsp5LEleThm_E4CE9azlnYvl2WbKeensPKnYVlw_30gIDGsd719UJizsYxyn0Z6q-6ki7Ws4RWrWmZRaZii1c3CdhIpT8h504_DB-4DECqKSw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/39f5c626c2234116b55e89a302e37cd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tIN4UcaySsLj1sY6wvLbFT2WCKGqf-VtnzBfNcnTNqGe0dZbX8fE4LJmPF7--uy3zN3zucHJS9TptQJuyHUI8Opb9dTnA_O7BpECmCLxdpEucmhdpX_Jn4rSZ_B2Gd6ssBO03QjwqUEiNWiIdeASyx7sCy1AazekV6jPIyiAiZH9aW9KtPp0x-hHCEnoiCTo_vsX7L0q6ZIxA1ro6pLEt6HhTFRQN3MpFU-rMMHgyqDhbgquOUzTmWaUMtMJhRvH2Fyfyd07Q3BnguhZMulT7uOWGbF3uorMcVq-TMxi3XA97ri3BQzAgDwfXxLpWxWu3cstSJwsdjs6hp-QkIFAMQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/e8ff437f48034bc08401754943403333","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iW4vfWb9owDVk2P5GGu4qfMbIrRhcQUenHS6BRkAQPhqrDQ-8FuHO27r-fliHlm7bGNRlBgD7dMtPBrsAPdGHS21MX4T5Yo8YjQvYwGkqiMHlDeGiWqrEKZhj7yOWvqJXtCJkgCYLoswMgy6nIz3Ptj3yKhQ6nzb4djeVgNnaatxgas-QUbhLobplHq94AoxlJDqIBvBqLv2C4AR9XqtxS0mOFu_BM4eCNq_-ALK3hMpdYGfxpoDCRiWAsC8s1iHsv5DjeKF44Gmoexw7A081shyar5HW067ttOyMz_iI3lj9Dxo8n2g5o8HSQgz7ysPDR_QcxEY-rxsUhDdxwFUqw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:21 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml index 506c1eec8c5b..8fc2e743bbf5 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:54:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7koFGg8HikMmRoD_jMkk75c8jcJPc16nIpU3e3HxM8svQlFT3nM3gV2WCmkuydO98UYQIeHvm7mPNAAIpIZtnYHnDdT-YNZt4o4VEsUQvd-caLXLWaNaUkZDycCC3NLnOltKVoKNIcZz1AstY5I4o-4OYvYkTp1YeXBsHAzafCClwGbUF9bXx0N8InLGsUzNnU38Pi-RiBZQDyloHJ6x6_n5vhu2gBQUgfyCCwnknQDJD6Gw0DG0JM0lNKN3NhtMRgsuJSd0BXvty6pVN1TFvS320eNSlHIBX--hdN5U1ByKuy8MWIzSNyeF18nyW_ThlJCb-M3W4NgQN3B9hWm76w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1Cae7MgCaUb8l3cPvfpb97X4idEo2n6G3duPbBtVrarFg_hxNMrcRCeRhURHqZSc8vMnXnAoGWI43WWOJxm9ZCsTJ4h3KOHKv3t6BSB-cI28UNvTolGeVcs6SPfaj6ZinqkS9FNIvUQd7hanoXDq3l8qurjD1HKP8nYvnny0g8V3v_lcuIrexQbp1E3o0V3XX9eaFTD_NMNN28bELyRSM9dqnFTnelqrw4PBkaPfZ7hcUyCVHki6DCIAceuaneCwwZnOQyDYNsFdaEK8ahdorMrSQ5Z00ZYT3gWMgFjEP5mRzTOya6uMw-8Tqy5DDRf-ajTydYamzXjYzSoY00uapw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"96s63BcHVYpDmfb9hVIqsWAovKP2CaBMRrOSzB4LNxD7iVCEBubsoFoc37_CqK5dhcNIRV8Z6GQoP2gDjP317V_ToJxPk6dqhSymhQGvIT6PvTaIovmzQUgl9CCn8rRC366kcZofyB4FOZVjs2UJe30EjqdyZOBraXsWWa6DCBM7uuRTXHorOcA464mz4RFSHgyoaEhQrtTwGUBUEK_4zXSnrUO7_k4tLjCgZhvNIRaC2pBQ5XY4n-jCSRw2R-5BbjSvqoVYzQ_P-6iZs2Krj9VWNzAdWTHXDr-vS5isShwo2FODdiygabZMnwtJRUv-N_QicsXe4QRii0DHPFFtLw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pv95cZnMAvrZ6RYvddRwe9Mh46LsolgFNHT0S_NFIL-Lk_HQkpR90iRR3hMhv8zucL8bFDo-JFVktFG1mf4kYXIwSNELfHQW5STjRzZePeE9waRtXRtvm9pwifGCS5lD8xq3zm5BMtRYJlNlrymLVbCK9U9bzB7aSi-ByTUd7SaFCFV7mHNrSaNjonLZWtWMcEh76P8DZC0GBO4cxG0XyLXd51fDNnwBd0DlXFPXUHlQ3d2TGHtd7aQCCsO3iOfdmoOJNv6RjsHR67ZUsHHE1sBm1rOoMHNUUTWSoEhYi9WeAWcahijZfcABjoXmNHyPmByDVNmxrNwgSbMlKOjzww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vkJZ9m9QRSVxUOx1X1Ag2MVp3Hnl9Fs3tQ5VXXMm7d-KxntbQH2xr5KHZe3YmUK1ZHHOH_TWjneoQS0fGwkarA0GAzhGr8O_SpDDQ8l5KttNe4niAYuxRT9_5-DTOzkMAuTKyJPJS0RblaPWxo9lQLpvQLdLPD5HyQBRlz0N4g2wi5Rcdu5rqKPBFBWnNRz-CfpEPA7ov_vec5bEATmqIphxAPasKuxGGyJ4ceLWM4dnQlxsgLjI_QE4r1UoLucZPkK8_lV9W76uh28SLY4Ve-wwyq8anPYT5oOLXWrWhqrxxCHeKpFhXgpLYd3_Mong9A6OSvGmL2nG-G7LBXxfpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xk9Ix3IM9NfXTXbn7KV3Fe34jpKghO0M7X1ZwFTDa2bcWvxBewgsI5L2m017H9EoCqRpbu2-HkHGztKZfwSfpEKYA4OvdObgwBXA_IVHDUiExsjrtkcQJR_LtPrsIrZpIZt5_g_RMOhjpWG40iOHtzo7XiYjg26-MV1LNWGiooPRECJNaXZaS1fy2FCNXxHff6kR7kpKBSZQSx4qNUwnfmLmIvGSyOdLnCOvdrQtESGaSc7LMWCLJs1HlyN1wlaXmZnIIAs7Vo15ABCK3FCP5zZ0DpppAZUdMay4tWyevvlMG5CK6NpQTLkc49U884XqXILVfkEAzkwZekdr6gu_Cw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n9pVD9XL43BykxzcY1c6XKmGMuN20UbSM6uaku1GdCzvuPCWO54fdRqs8JduEvUOgRTuYV52QMGLvyb2_AXrzvedEZI6o2PE2FO5kJH8qfFyCjqiqY6H-MeFfMfa2UoVSG-ykYIxqayh_HpwSwndVMPnoc0p5_lmecZqsFCJrT5OZZTmHat9iyNXEp9G-nY4EVOPnxb_HsqxWoIivjqO_OeVUXneLYzU9iCEpihr3eXYrE8nIeiGMimehDC0EF3RlJ9BvsC2Aj6EddajS9xh8mrTXMms4k-2X_8IJwQcarPpAqiz9K7GWbCcTPdQEbddQSX5FkZ_FeeLC013JEap9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"h-72gARqMwXp7XtwAwPww4PVBoPuK5UA6mXubetsECLjnjrAU5W90bGcj9hM6qqLxZzUHWXB17SNObjBK39Up9DSaq7nX9N8MDslgW0NgQ5Sm2fRc2t7Rr87qrk8HqRQrqqo3MwArB5C-K7AYQrfihBMG8C21XTrv_NFS7VSWc1dzA9nWm7ch96I5pK7b-VCJ1M5UMuMBpu4JAOrebwiIbyt51CWkq2Qn0FBwg433ygFJFJCTjDV9biGFWePS1TknaJGFGwh6oMqokpItcWBIlD5qWbq-DaCjKD2HLnt7pWWjee6Qcjwoib4MrqBoJCZ8hK4J0oWZiYS93gfuGpDHw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wOKd__6i8rgLj8FY36VE4_r912xmbafiiaruIKRg0YH88kkDeFyrtuma13WFYco4C_Mpd9_VmTOBYydkLUJG3skk0pYj_lpaXgickbrUfYUO518-3rMXR6ZEfP_UAZonk6rc6rMAl1mBHPxJSI_61TKFRyDPFIVN3cfn3Rlu32MTTk4yFlGKzkx03z1DHjxNvAoDWOq4Rx7M2y-SFb3hS-Cbo9S3k3EObwpyqyLab9NuHjK8_TlaTChVSyaKegaxDKPdZSOwLpaugzKGiuYDc2Pv7FBvBysrZwWo9y8g-djQTCW7de4Sg4d1e_OgXkVd9jKM-iDmZP-0FG1KNrODUw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pj2NZDpblOdcn9WnMuduYVQH6L4sQaHLnENAgOpBVJrmPGFaTC06UizxlnFQQgXFrWFIDV3fMRYZjvKj0CDTZw3ArUDI1AC3rAMez07CNJrxBc-pyRJo2qm7yET4JjUcoNUzPe49Jg0sTm_GjYCU5oO8hNPjmkvFBqk_tK21wn-GUezhNSw5Xt5wrNut5D9bx9Ec6SNw1jhtC58jyB4BAfyprpbPEBf7jbQ4rmEbPmFNWYtRp2wu-dd2AJ8rUzkyrtDsMIrZeki4J9VmrOd3sfxb2mrTh52u8MMUr4LpVC57YsExMluLEAgKS7BORvwL0zUhbsLE0gbYJ29ovETHbw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ywQxBhO2g4PKjb28A6xkhoNpIJpbEB7CR9XnCQYugrMCTBbgn1Wu5WUIL4nFbOHQqfZFgVm3Iz3GxQx9qbEuKZAZLrQemQvPKfJxShysmvaUvfOFkWAHreHROokOOhpz6RONaOKCExDLebh6xrwY_QX4Mu3CQRLrxXAXCpNCpLkLxSGcwf2QsxyfDgDk5_do5CHWUdDIrfYeBwphry-amLVnevfaMiy-cfuEA7uNXT-g6E0G0IKpK7d4BC_-D_Ik-H1Za5lbMDYCzIDaTyILuoQ3o6AyP2sSQFu287_RMlwny17Z1z_uUSp4t33mLBmKfqnofOpj3DTFV1cSVi_58Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xny3krbx8hK8KQxeapgTJ062YqcjL40lwn3SaYZF6jvd_NdgExGmHBwqzZhaK0PGciDWQjUSDffKWuOAMJpZRskJ-HkHqB5s2kDQxqNcgHC0M20HA-JjiPRWHqAOpd7-CwaP4Dh0WkuCUZZ2cFHn13AzPifHE9W3uaRVm4UqsSJ9DhVYMxmtdykXkxPbamuv7C7-Cc7OJepctGFRI-z2_locTjZCjLAioOLkR-TiO8HC-dwhdVHGVLb6ndKfnK1oONyKMYmdamciR_xoswsR64k9L8zRH4mQXs1JLcK5bdZGSI9TC8HLsJ1pbISmbvcB8UBWr-vKBvLyyQxCh-oVxQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"u1FSeDgoMKXed5j9AedatfVS7qA5zOZuIV5Si5_8A9H5AbJnR6SixEbxH-en_MEeFGIegUfuV_KGnGI7prxZtNH8Wcb5j3FPRsHo4icHMGXfXIJBKsGzP6pt6SzCF3PyGW9IjLFfIf1HD3LLzd5OiaYSHxtpOuHYNPzyo26O0ElTtHBwhUnp0YLSN6_gfCXLEMwjsXMk3EJ-XCDBuPXmRz4CqWgBtA8sABeU9Sy4Ptv_MsdDjLz5wRnvE-_WPHmux2-7BjMvgxln5c_vMEhkmU3L3Jaz5vEK_JO41Q3TVT09mVqudpGCu0qGzd3U4dGn_T-lEW89bR-K9Oqt52ZChQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p6oM5Rje-NLaSvWUXblUxWhXXQ57Uu-4TshEi02pY8Prj9j77Noem7d8RjwPVhTFWEcVoBsivfU8QOHb4yv9v2vWNxCXf6pcqCQU6edvRaxT8C71FlKcMcaRCOqJJRT0lCyf6lbGKsAhpMAfztyV9HBcLUnLtQPtQtqif4tBfCkiDGSI0606lZHmP3bUd5EurPOXGpcLq9gV2m_L5_EjDa5ZgTl_weMHOrzxsIyKjDG3z0Mf66SSLkpt2e6qvsa2bvsV10m0mqAo1jHkJPa2XXdrE4EAe5X2EWoesw_voom0zsrfemdFD1poDPwWsbZvkRBR1T-GmN7cj6xjucJspQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/versions?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1441' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1441' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml index 8986e7164929..2d209bec87d0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml @@ -4,1472 +4,1334 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key3"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml index 4ee4fb170618..e24f206c563f 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml @@ -4,2604 +4,2008 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 - response: - body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: POST + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' - headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:20 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml index c4fcbb136ec5..311c72bb7799 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml @@ -4,409 +4,327 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:58:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600}, "key_ops": ["encrypt", "decrypt", "sign", - "verify", "wrapKey", "unwrapKey"], "kty": "RSA", "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "attributes": {"exp": 2527401600}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '144' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/1bb7bf47dd094b40aa9c050474731167","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-JtT7b6aQoFd3zphPJ6UkTUHc3j0wzUXYodlpplJVWbNc0wOkaeA41omIFcMIVekvTmFJrFPMw3NFTwGeO0TrbQvQJtmksfIx3dTPWOG4zlWcnWrHMhSS2m5HZwYQPWFhSHB9VtgBE6fCzosaInazhiI61f1eGULobYGiRWv3fZ8Ez4iF531AC1RbgYT9uHoOCZ6a2LvwBOOEC3vGLJGRy0A9Ez-s2Yek_fy95ZVySOD7J6OSh4h_GC9roVICi0v9fHwGd8MXCRnKzq-lUxrylIsyfXU78PbG4rojGMQswD8oPfkONH45jWSBe2e2SXkx-HiRQ4VzbMKOxm9bpSYQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/5bb4d99959504269a7f5e4bf00ae97a6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pmTUlox1v_IPM5MvQyBqp98q8Xhf9Jl_sLc_Z-GN-MSIEXJUuy9otFpP7AxaiF_EpmRWHfhvnnYvjHMEiye29zhavf_nreGFJFoTtWi0ONPF9CCEjG1xyxwnp6wA6EuvhdVzY7NZAlgqQOGULH4QSFsiQw4WZrEJBdV3nsV8aBAhe7uDhHEuy9GZR92l1p1QUrMwOfW1-ELKV0B0naLY5bScduOJADZAe_C6ChHye_e4Ha4L9xH0arfgf5A42t7UCYF7N0DAKK94EDRHTJlFXWt--MzFatkLQtaAYrR8PhBIRB3lwmPmE0LS73KHxOMqBJRlilUMCUxTUXkGYIuxsQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1564527529,"updated":1564527529,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '673' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '673' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA-HSM", "key_size": 2048}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '36' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/ab5beb5937e94d788ebb0ccbdc4859aa","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pebUyWT5U8L33ZSuWtyPAcoHvB8gOQySsc1PJVzt03rA5UJrfwtJ4Qr5sHS4phxkUmG3gb4FzUHwztAPRaTdwquqM7b9Qk8OPP1BRZeZrrM78iATXd0gM_xzcFs6GE58WFc-ZFVTC9PDVb9ktwDwwf5nSLGsPlqW0dPZEaOkFwv6w9RBqyJtdvGw7zQGeKm9oRG1eQXNSenhJfiYLyDM1Ve6eiSYEBwiG3KAr7QxBIoRxIqecutM2e7MwLWedoPr0BwMUnI6x9k78ytHv9YaHkRU0cLN34o4t4sghoRGape1sg-SR8NW298U5LyukSRX68zAn89d1LU2X-gBSUA9Yw","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/eb05248e5ec54109bf3b4cc3d9880773","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rlLVJ4CJfxs5CnDFBNqjxlE7c5pcfDFU7PR3v47sL0r0-pPHBya1yUY7Q5FaqCqOIaYAZ9y48MLmcBWHrY5A1xj70DnLXc4ss5KazZopPjCGDLjNzzsfd8YSb0BGm3CrmaYgTXWy3KUbBNR8GX1KaSZkL_OtlPh0jHluHukTZDCsNZWXFqC2ffms31dh-IG9JL-zwtb1zDHJ2oBI43Che5nJVY1_y4ebFDXanwyHzbww2KkbXupR2mK0GqbI3uvjD4v5BEJCX6mCtY2gEW35B1K6lsFgqEFwybD8zbjGKPmrLE0WwFZoXXtQtqch0dica4G4lZm2oX9LnHq_3tPYUQ","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '662' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '662' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2?api-version=7.0 + uri: https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '413' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '413' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault9627173e.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1562703533,"scheduledPurgeDate":1570479533,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1564527530,"scheduledPurgeDate":1572303530,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '544' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '544' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml index 6c925adfa57b..d69c5663290a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml @@ -4,612 +4,492 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/8bd25d6c7e4d4c95b249df2ad1a06f03","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"kt3oH8H10CKe2_VPcIxBJ4PQt6O1eCkmCrtyHmdmF6Y","y":"Oje7K1kKsEoeFQn7WZgJ0pZ5n325HykdIeOXoOgVes8"},"attributes":{"enabled":true,"created":1562703511,"updated":1562703511,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/99a194f5b97f44ae9125c47157810df2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"b-JfAkvIfu_ILrlz684i-pj0cpd55tzyHDWcW8T0OaA","y":"w1TcOgtEU3ehfOd5jRiZl9PNRHieGIDDwUcWCGuNeQM"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/986a1037ce7845eb9b3927fc07576f12","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Ulzv_dmHaTAW68YM9dNRAAtYHSxfIWG1pJsl_ZVknvo","y":"ywMBREwV1gC0OBCHul6Mm-sbwku3DjQA1yK7CpQyFBk"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/fbc0bda5d70640fe85e5fb435aa55d93","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"7q_mEVJXTIDf7a0CVque6SFN5tXoJyzlZENayGeWsSI","y":"rL-ILnqU7evEpes10rf3xzsnlEbg6gdsDfc08s8LN4k"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a0501fcbc568481b829637c6a92e4abb","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"--BpzoUqMk2FLfcY1VnrLKSzW4GtjfBu_cVUFATu7mY","y":"BU_Q-pS8w3hH9elSSPe0jKzKj4Ey03I3GdgGy_tS7mo"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/21946cb8e9d14344a7c9ba8d3db75227","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Qw1ppcyCUcBHgQ2UEyuTdPYTwOGn7OHLxsT8lXeKdRY","y":"gTWfs8Cjd6QWnWeaAR9lzVePttSlFLzoX1c80aNAkyI"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/b62f8f82b76b47549153d116b383815f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"VQqpb7RotE1iQu9i-7iRZGg8GOpxVQQB6tx_7tMPMZU","y":"SRqLIoGAGpKgrXYP8JwBPSEdW50xNPXpMOeh4YkpvgI"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/8bb57a6e699544c6b71d279fd8df32e9","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"xs5QeiF_UBlgmjt9gcJPoI_d71xgE8RqUl_q3Gna760","y":"rfbSl_9PK-Pq704mE6SQIyrhDRK66QIme0DEZHi2rPQ"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/6b36301002db4081bfc37dc15a3cf31b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"9rz853RQmmMerwKCfQpSONzDOwC9mniosBB0IWOQldmNJL53cj-yYVaXIaXyblWBA3uDkwWFLFvtz8_mxDowBxMamsJ46_njsKswVOHCgvxwilwc22EwEPyxaQimvRipMtU7mHMEyETOhvMKNhifTa3kv7YKKNGrIO2Psa2MvH7mxdYmjFhbPgdXwF_b7cINa2UGrf0fI_aXryJjY7E1L6J2GDAXiBGaVh59FMRU1DQQkRBBDVIzuGep6QLhpi9Jk4fUKYpFwL6ees5KRmg_Ztgz8E15yWkSRmsoEcNvrL6Enb05blHGNc6uCUYrRcwki1VV_mGW-DWEOE0zHaQysw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/0be8a06e74a14348be5604f2d9b2f3ce","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tBGkSMbkIgrbJ61a9DarlO_4f08KDkv8II8OHveKO7JCC2oWX6tOuXdn_zK00wY_Z7QkpBcsdStiPVjdyh9EsyqpaMoheM-HYFPNIMFOa8olntSvHs1D3pAoaHlJOh4-w9QF7CQALLHb6AM5t6molo8Upui1Z7XdHGKXX7RO4IYA752AzaLIakjLO3TCAMinZmnDDGAhunUB94_WpsWv1AAJSFSPjDHCz2dakZnLvreR-EVZz9nk-l3R8aQcr9y9p__ksIshnGKwJJ9l2vMO6p7MiK2RJLd-HFzEWDFKkWfYm9iRfp5vcoNxujLbXP2Rde4qvVlW5PmjLiBSLBxEhQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/a298f2b63271489f807d41d71a2e10c4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wWuHzO89M8QbAl7BsuKWydhq_xj0RkrAsUjJTtRiLJs6CGl4jkvI9jBJb25Wis0anulK7cQKLv9K7MwtZtpLhnbUya-Qj_D9d9BSOCyjm_DFH9v6tNqKuexqKDu2aUrulDxXqUng4jW_4Is7P2g1uhkdoMJ0pzkToEIi0TUETmfUT7SBOgwr3zwPKcLGeO8H5jwT7AS7lVaz6MKFn07vVnE6sVq6Jxi9jyB6IHO7iwRB6w3cGVPexJGft5m3bt9Kuf47WHyOzVHqmwMMv5W2r8Wb5zVv6cVnb08o44OqGKOGXk0vqqiM2QAB__vM5MbVQMK2TcuJiotjiSHrNJZ8pw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/6bd05085b2d54b9093127c75e5109209","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sUhJXxGr6fnKoM9o2q_-XBTFhglYPxfx3XpPPRaTCQlS12cWlu9mKBY1RyuJafMWsUP73N8iNJKa4qFF1C_F6PGBMPJ8lANW98WmJwaF764ZpkEkndGC7wCmqeWQkx0s3PH7mG8jj5uZdCVRAkWqGtmPfxBmV9dYRyDWVgr1r26XnqYzHhXclfIlOdg7VLg5xbtJ_rzrGP5PeETOeBDLJy_4iANPL8YVaJg8r75W_g9JjvLm2ieg66uqwvIm5RlZ8RtqcNgUXLlaCmYXL1jFbTP5lRXFPkXFl1DmXT9pXKS43Wo34MFOuU1tCJsHvtXgyeUHUKHpBdbhxSRc-UZmow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/022d0289f15b460c830fcd30ddfdafca","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"z56wacSTQoxXCtyq_6uTAUvh-UESgYVJy2RbWQ5DMl1ZJDeIHTublcGy8e_kBOUgkiCFhObP29e8DaTEhuc-vJ62XX2EuDzvmMp2tUido83IIeXatP1gb4TQpXAVBviFXdPQNbce1sDZ5XpA4Zi8HCV1QqVyAJLKTJB6hOpwTW_HXG2qpYQVqOhMXv-39ZkWnVWSWLfz9kKDvfbXCeBDiLz7iVDVdB8ELExAi6vz4xjCRZPExQCCvXXu22OsbehfoW4FLb_NhcTjmTQQfCQ-3G_eskXYl8envgVsi5dxMqklnb0aHM3PTadXrY1wcnjLhYL1vgC7LKS7dc8c5rX29Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a7fd89dcc95045e9adac42c03dcc7c42","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n1XbURcEge3wXm6Nk0F10k896dMK7xHaM4pJM6en8WHWuP0OJbTM9NzSmtyhZKh0akiphWCgfaycX4aChrB-7tYGxGcNS3iACwuciBbYeE39tzhJ5eD8byzCWUQVJkx4vsMOhICsaZcrc1Rei5b_LHu-U-T0CTdRDGM-Xvc7-5zP0fLWhhgxahTnTzEne_j4LGIp62H8ijge-btNpU4yK_lWMl0JNgtSSmkY9GTfU0hOqBvCQqWeZ2rfOczeROyzk1XEaLIsjBeSK4us8qjg74OpRGyl4khN__eYIjNPf3gO0qTQMljWtGc4iwG5n72tlx9yg8uIQP9fR38O5xXBVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/f9aabe1e98594882908b42b110e3bc82","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tazNLMksNQi1DwDd3CF2qpnUteGfDXKoraalUO1qmpnVVta8m0z3Ekl9QQocQNFoJlIAnG0PHRrnKRdLt5QMiacE4VO61G-KqP7l-2L6CbC1fEywIqE_FNC7U1neWDuSpel5s1v9HSQp616yUz4zGaBMdwzPykyp4bo2MPcRXkrpZjOBUaX2Z9MGW58Q5ic3Aj3l3MrNY_uOj8JdisNSShn0tnzez5QOV1rdEOcYzmzrNCr00xqjY1qE70uhKSFfdIuxKEsRU05dCuJTbAyLKj_vhsnnnyKQEN1pXcQCO2XaH_ZlCsXdvwWbH5Ptldyn2AHJQ2FT9iLGNOmgr820jw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/14a31e671a3542528b59e4dc06e16bc2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vJCL4Hqk2sGCa8jhMLNRXkUW5fxYdXReSH8K7p7ntVCWnTQGxQVo4gWDHT21Jl8hPCsowiPcddNMLBPV0PTH7J4hTtH-Qsf0nTxduGXvsUCPZIE8noWq4ExTUhoiBysZ6ginKjc_YHH8Dvd3Ei9CK7GP5JF2sfswra1MzU9M2sOQrcFy9-vr6HzThDyhSZpfcy3wN4RvQPLKGxS7tv9bpNrUWoP-1anA6rlj3I1qgbbKS6JFr8X8bxfbql77qOAl07j7zpdaPLGONa2WW8V7XOgR9x_2DLwLJxccBXHURPa3YvMm0av_xSuLZIEIk1cQ11WLSRUZemY-PXtXb_kXww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '707' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '707' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys/key-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/deletedkeys?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml index 16f0745fa807..84db990cff27 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:00:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: - cache-control: - - no-cache - content-length: - - '10635' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10635' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault96041739.vault.azure.net/keys/test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10636' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml index d1318da0dda6..f2bac86a4b60 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml @@ -4,444 +4,502 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:01:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultfcf91456.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:10 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name/recover + - api-version=7.0 + - '' version: 1 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 dd2c6f0a9b95..43368a0c6bc8 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 @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -104,7 +104,8 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml index aa5bf8efab58..cc15961c68b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml @@ -1,255 +1,245 @@ interactions: - request: - body: '{"value": "secret-value", "attributes": {"exp": 2527401600, "enabled": - true}}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '77' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' +- request: + body: '{"value": "secret-value", "attributes": {"enabled": true, "exp": 2527401600}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: + Accept: + - application/json + Content-Length: + - '77' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43?api-version=7.0 + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/20166f0199b14d72b73abfd7de4a766d + - api-version=7.0 + - '' - request: body: '{"contentType": "text/plain", "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '61' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '284' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '284' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687785,"scheduledPurgeDate":1570463785,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528273,"scheduledPurgeDate":1572304273,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '421' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '421' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml index a8f8117e3c14..d51d5f132c6f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml @@ -1,510 +1,453 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value0"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/7b96a58d018e4599ab88e88b9572c2bf","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/36914dd1657f4c27a5b0b018511debd4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/c83f87d170cb4436b96399150e087f63","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/4ba6609ebc11430eb24e151319af2559","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/5f6ee6ed44b044edb5a6f00fe7f9061d","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/407135ffe3844dfda97b308d219da2bc","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/39faf9645abe43a7afa4833e92ca1fff","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/64057abdfdb845e49ba1693718fde7ae","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/15315d867b184d72968338963ef8306c","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/ec5f2a5b6971486e87bbb9a0c9c6ed5a","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/e5301eed3f1d4dec927bf145794b0465","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/22314f577cda4d898c295eaf427c83e6","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/82158634aff74f8881ccef96e604a47b","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/f78f624a3cb046c4927a84f599e6eeb1","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1231' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1231' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets/secret-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/secret-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/deletedsecrets?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml index 9f94d903ad43..28cbfb841c0e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml @@ -1,254 +1,243 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '222' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '222' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: - cache-control: - - no-cache - content-length: - - '5406' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5406' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5407' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml index c42445d00a55..8936cbf3e59b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml @@ -1,117 +1,134 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:13:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '234' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '234' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -119,48 +136,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -168,48 +175,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -217,181 +214,338 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:43 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name/recover?api-version=7.0 response: body: - string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '211' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '211' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:56 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name/recover + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml index b6c8060bf441..90c8d9b81ab1 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml @@ -1,206 +1,205 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: '{"value": "secVal32f60fbc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '227' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '227' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: - cache-control: - - no-cache - content-length: - - '5378' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5378' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5379' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml index e8638c8abf32..dba0b9685274 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml @@ -1,625 +1,386 @@ interactions: - request: - body: '{"value": "secval99e4122d"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '27' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/4176712f5ccc49e69605dba983a4f344","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:15:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/bebb1fbf2bf34988b8e02c8ee5f925ad","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/093a7c0702ba41e2920961edf29252e1","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/2c24f5bc003541cca1fea12d2bd5f82b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1b12330c84764ba9a010e7cc65d06ea3","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/398ba2a5091d435ca4b7ac05058b509b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1c47984da2fd45ca960731c2d62031ab","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/b76683bd312a4f129eb83d59901cae55","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/354aa036d79d4ec9aacc5a0c762e8e88","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/ac1f506c933b41c3a5732247e2334429","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/c591ae13276d4e84848e59c8bda9db05","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/6eec08471fbc443daa555c8b44a4ed6f","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: - body: null + body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '0' + - '27' + Content-Type: + - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: DELETE + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: DELETE + uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -627,48 +388,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -676,131 +427,105 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '343' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '343' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml index 0891a7d98254..f21aa267f8e2 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:16:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/versions?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1427' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1427' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml index c68d8212f97b..2a5134de0b12 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml @@ -1,1618 +1,1264 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' + headers: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultb5580c06.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml index 57e1f8288b5f..aee5c8738d11 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml @@ -1,2320 +1,1826 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:20 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultce560cd9.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml index 5267d8020874..5d9a0991c11a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml @@ -1,359 +1,330 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: '{"value": "crud_secret_valuec01d1319"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '38' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/177427fb4ac34d35be6430082742ca9d","attributes":{"enabled":true,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"}}' + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/eeecb8113ad344299d57e9d44eb3694c","attributes":{"enabled":true,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '235' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '235' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: - body: '{"value": "crud_secret_valuec01d1319", "attributes": {"enabled": true, - "nbf": 1422864000}, "tags": {"foo": "created tag"}}' + body: '{"value": "crud_secret_valuec01d1319", "tags": {"foo": "created tag"}, + "attributes": {"enabled": true, "nbf": 1422864000}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '122' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600, "enabled": false}, "contentType": "text/plain", + body: '{"contentType": "text/plain", "attributes": {"enabled": false, "exp": 2527401600}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '114' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: crud-secret"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml index 35c4ed11f967..96d5382039a5 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + 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: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal05b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 response: body: - string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/bfaad709fbaa4d57ae07facbff500795","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/7f3cb1f832414f19a13156842b138e4f","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal15b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec1?api-version=7.0 response: body: - string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/392da3f3b4b44b71aefb2e9ffdba9321","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/b11f6d6c11ec4c84b08b9b759540bf96","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec1 + - api-version=7.0 + - '' - request: body: '{"value": "secVal25b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec2?api-version=7.0 response: body: - string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/59fa973224914f6fb53d37c20f2e87e6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/f50f507c68ff48e593f32de9f03de503","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec2 + - api-version=7.0 + - '' - request: body: '{"value": "secVal35b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec3?api-version=7.0 response: body: - string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/050564bf189641819bc88c0d70d31ee6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/699ddadf328143de8c19b32677a5b3ac","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec3 + - api-version=7.0 + - '' - request: body: '{"value": "secVal45b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec4?api-version=7.0 response: body: - string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/aae71679bf754b668f14bcd9bd9fe2f9","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/b57c587071b4448a89ecac767c62435f","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec4 + - api-version=7.0 + - '' - request: body: '{"value": "secVal55b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec5?api-version=7.0 response: body: - string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/48cf92ab65f340f6a98002ebf0ca4dcd","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/ea4090f7b0294803b170516bc009cc16","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec5 + - api-version=7.0 + - '' - request: body: '{"value": "secVal65b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec6?api-version=7.0 response: body: - string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/53fcee1dc3ac4805940914670cc50199","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/2eb7ddee8282440fb1cf9d0b37517c41","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5b50e84.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1140' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1140' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py index 6472b3d3308d..da13fcdc54c8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from secrets_preparer import VaultClientPreparer from secrets_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) From 95220b74a1c5bc9a701ea63413ed955a87f91032 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Jul 2019 01:19:55 -0700 Subject: [PATCH 07/32] [AutoPR hanaonazure/resource-manager] Removing monitoring hana instance API (#6535) * Generated from 70b51057c4cca0cdb6a743b4e02f39c132121570 Removing monitoring hana instance API * Generated from a6757c439ed37f69147b6a7b50a20f1ca69789be Removing monitoring hana instance API * Packaging update of azure-mgmt-hanaonazure * Updated Release History --- .../azure-mgmt-hanaonazure/HISTORY.rst | 12 +++ .../azure-mgmt-hanaonazure/README.rst | 2 +- .../azure/mgmt/hanaonazure/models/_models.py | 10 +++ .../mgmt/hanaonazure/models/_models_py3.py | 12 ++- .../operations/_hana_instances_operations.py | 89 ------------------- .../azure/mgmt/hanaonazure/version.py | 2 +- .../azure-mgmt-hanaonazure/setup.py | 1 - 7 files changed, 35 insertions(+), 93 deletions(-) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst index b99767ae2a90..cdda9582b52b 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst @@ -3,6 +3,18 @@ Release History =============== +0.9.0 (2019-07-31) +++++++++++++++++++ + +**Features** + +- Model SapMonitor has a new parameter hana_db_credentials_msi_id +- Model SapMonitor has a new parameter hana_db_password_key_vault_url + +**Breaking changes** + +- Removed operation HanaInstancesOperations.enable_monitoring + 0.8.0 (2019-06-26) ++++++++++++++++++ diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst index 3751f89d5670..1c9ad134cc31 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure SAP Hana on Azure Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py index d9c93b5d62d8..2643e4c67737 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,6 +522,8 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -527,6 +535,8 @@ def __init__(self, **kwargs): self.hana_db_sql_port = kwargs.get('hana_db_sql_port', None) self.hana_db_username = kwargs.get('hana_db_username', None) self.hana_db_password = kwargs.get('hana_db_password', None) + self.hana_db_password_key_vault_url = kwargs.get('hana_db_password_key_vault_url', None) + self.hana_db_credentials_msi_id = kwargs.get('hana_db_credentials_msi_id', None) self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py index dece72c8661c..9f6950525157 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,10 +522,12 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, hana_db_password_key_vault_url: str=None, hana_db_credentials_msi_id: str=None, **kwargs) -> None: super(SapMonitor, self).__init__(location=location, **kwargs) self.hana_subnet = hana_subnet self.hana_hostname = hana_hostname @@ -527,6 +535,8 @@ def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: self.hana_db_sql_port = hana_db_sql_port self.hana_db_username = hana_db_username self.hana_db_password = hana_db_password + self.hana_db_password_key_vault_url = hana_db_password_key_vault_url + self.hana_db_credentials_msi_id = hana_db_credentials_msi_id self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py index b4932fa45b64..2165693784cd 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling @@ -737,91 +736,3 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) shutdown.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown'} - - - def _enable_monitoring_initial( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.enable_monitoring.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'hanaInstanceName': self._serialize.url("hana_instance_name", hana_instance_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(monitoring_parameter, 'MonitoringDetails') - - # 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, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def enable_monitoring( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to add a monitor to an SAP HANA instance. - - :param resource_group_name: Name of the resource group. - :type resource_group_name: str - :param hana_instance_name: Name of the SAP HANA on Azure instance. - :type hana_instance_name: str - :param monitoring_parameter: Request body that only contains - monitoring attributes - :type monitoring_parameter: - ~azure.mgmt.hanaonazure.models.MonitoringDetails - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._enable_monitoring_initial( - resource_group_name=resource_group_name, - hana_instance_name=hana_instance_name, - monitoring_parameter=monitoring_parameter, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - enable_monitoring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/monitoring'} diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py index e4f3d5055303..3697d9b71739 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.8.0" +VERSION = "0.9.0" diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py index d88dbac05eaf..57c68ff652aa 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py @@ -64,7 +64,6 @@ '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', From 02e17b75611746c948aa29cb19ebd8cc66820e40 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 08/32] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../azure/keyvault/keys/_client.py | 25 +++++-- .../azure/keyvault/keys/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../azure/keyvault/keys/aio/_client.py | 30 +++++--- .../azure/keyvault/secrets/_client.py | 25 +++++-- .../keyvault/secrets/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- .../azure/keyvault/secrets/aio/_client.py | 30 +++++--- 24 files changed, 498 insertions(+), 242 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py index ee0e81d07f73..b591ffdcaf0f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py @@ -353,8 +353,12 @@ def list_deleted_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedKey._from_deleted_key_item(item) for item in pages) + return self._client.get_deleted_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_keys(self, **kwargs): @@ -381,8 +385,12 @@ def list_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name, **kwargs): @@ -407,8 +415,13 @@ def list_key_versions(self, name, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_key_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_key_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_key(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) 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 43368a0c6bc8..193e6e324c7e 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 @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, 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 51f916d2938f..28bccc61f053 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 @@ -9,7 +9,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.keys._models import Key, DeletedKey, KeyBase, KeyOperationResult -from azure.keyvault.keys._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from azure.keyvault.keys._shared import AsyncKeyVaultClientBase class KeyClient(AsyncKeyVaultClientBase): @@ -354,9 +354,12 @@ def list_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: @@ -380,9 +383,13 @@ def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIter :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_key_versions(self.vault_url, name, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_key_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_key(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -538,9 +545,12 @@ def list_deleted_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Delete :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedKey._from_deleted_key_item) - return iterable + return self._client.get_deleted_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index 1f0a670bf217..40678aabf7d4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -179,8 +179,12 @@ def list_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name, **kwargs): @@ -206,8 +210,13 @@ def list_secret_versions(self, name, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secret_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secret_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def backup_secret(self, name, **kwargs): @@ -336,8 +345,12 @@ def list_deleted_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedSecret._from_deleted_secret_item(item) for item in pages) + return self._client.get_deleted_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_secret(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) 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 43368a0c6bc8..193e6e324c7e 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 @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, 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 89a0fa98836e..9a4a92375ad9 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 @@ -10,7 +10,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes -from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from .._shared import AsyncKeyVaultClientBase class SecretClient(AsyncKeyVaultClientBase): @@ -182,9 +182,12 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secrets(self.vault_url, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: @@ -208,9 +211,13 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secret_versions(self.vault_url, name, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secret_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -335,9 +342,12 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_secrets(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) - return iterable + return self._client.get_deleted_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: From 37c46c6cd6f1a0a0ca86befa19dbb3def2c69b70 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:33:30 -0700 Subject: [PATCH 09/32] azure-core history 1.0.0b2 (#6562) * azure-core history * Update HISTORY.md --- sdk/core/azure-core/HISTORY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sdk/core/azure-core/HISTORY.md b/sdk/core/azure-core/HISTORY.md index b54129f9c2e0..2123f6308b80 100644 --- a/sdk/core/azure-core/HISTORY.md +++ b/sdk/core/azure-core/HISTORY.md @@ -3,6 +3,27 @@ ------------------- +2019-08-XX Version 1.0.0b2 + +## Breaking changes + +- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372 +- `azure.core.paging` has been completely refactored #6420 +- HttpResponse.content_type attribute is now a string (was a list) #6490 +- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490 + +## Bug fixes + +- aiohttp is not required to import async pipelines classes #6496 +- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490 +- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372 +- `AiohttpTransport` does not raise on unexpected kwargs #6355 + +## Features + +- New paging base classes that support `continuation_token` and `by_page()` #6420 +- Proxy support for `AiohttpTransport` #6372 + 2019-06-26 Version 1.0.0b1 - Preview 1 release From c6ebc931361814bc42707387b69b333f9e5724d4 Mon Sep 17 00:00:00 2001 From: Bryan Van de Ven Date: Wed, 31 Jul 2019 11:28:59 -0700 Subject: [PATCH 10/32] Make private Cosmos modules private [WIP] (#6329) * make consistent_hash_ring private * make default_retry_policy private * make endpoint_discovery_retry_policy private * make hash_partition_resolver private * make location_cache private * make murmur_hash private * make range private * make range_partition_resolver private * make vector_session_token private * make resource_throttle_retry_policy private * make retry_utility private * make utils private * make routing private * make execution_context private * make cosmos_client_connection private * make retry_options private * make query_iterable private * make constants private * make synchronized_request private * make session_retry_policy private * make partition private * make global_endpoint_manager private * make runtime_constants private * make session private * make request_object private * make base private --- .../azure/cosmos/{base.py => _base.py} | 8 +- ..._hash_ring.py => _consistent_hash_ring.py} | 8 +- .../cosmos/{constants.py => _constants.py} | 0 ...ection.py => _cosmos_client_connection.py} | 48 ++++++------ ...try_policy.py => _default_retry_policy.py} | 4 +- ...py => _endpoint_discovery_retry_policy.py} | 6 +- .../__init__.py | 0 .../aggregators.py | 2 +- .../base_execution_context.py | 14 ++-- .../document_producer.py | 8 +- .../endpoint_component.py | 2 +- .../execution_dispatcher.py | 10 +-- .../multi_execution_aggregator.py | 8 +- .../query_execution_info.py | 0 ...manager.py => _global_endpoint_manager.py} | 4 +- ...esolver.py => _hash_partition_resolver.py} | 8 +- .../{location_cache.py => _location_cache.py} | 1 - .../{murmur_hash.py => _murmur_hash.py} | 2 +- .../cosmos/{partition.py => _partition.py} | 2 +- .../{query_iterable.py => _query_iterable.py} | 4 +- .../azure/cosmos/{range.py => _range.py} | 0 ...solver.py => _range_partition_resolver.py} | 0 .../{request_object.py => _request_object.py} | 2 +- ....py => _resource_throttle_retry_policy.py} | 2 +- .../{retry_options.py => _retry_options.py} | 0 .../{retry_utility.py => _retry_utility.py} | 24 +++--- .../cosmos/{routing => _routing}/__init__.py | 0 .../collection_routing_map.py | 34 ++++---- .../routing_map_provider.py | 42 +++++----- .../{routing => _routing}/routing_range.py | 12 +-- ...ime_constants.py => _runtime_constants.py} | 0 .../azure/cosmos/{session.py => _session.py} | 12 +-- ...try_policy.py => _session_retry_policy.py} | 0 ...ed_request.py => _synchronized_request.py} | 4 +- .../azure/cosmos/{utils.py => _utils.py} | 10 +-- ...sion_token.py => _vector_session_token.py} | 1 - .../azure-cosmos/azure/cosmos/container.py | 14 ++-- .../azure/cosmos/cosmos_client.py | 8 +- .../azure-cosmos/azure/cosmos/database.py | 12 +-- .../azure-cosmos/azure/cosmos/documents.py | 4 +- .../azure-cosmos/azure/cosmos/scripts.py | 16 ++-- sdk/cosmos/azure-cosmos/azure/cosmos/user.py | 6 +- .../MultiMasterOperations/ConflictWorker.py | 1 - .../MultiMasterScenario.py | 2 +- .../azure-cosmos/test/base_unit_tests.py | 2 +- sdk/cosmos/azure-cosmos/test/crud_tests.py | 52 ++++++------- .../azure-cosmos/test/globaldb_mock_tests.py | 18 ++--- .../azure-cosmos/test/globaldb_tests.py | 18 ++--- .../azure-cosmos/test/location_cache_tests.py | 24 +++--- .../azure-cosmos/test/multimaster_tests.py | 10 +-- sdk/cosmos/azure-cosmos/test/orderby_tests.py | 4 +- sdk/cosmos/azure-cosmos/test/proxy_tests.py | 2 +- .../test/query_execution_context_tests.py | 4 +- .../azure-cosmos/test/retry_policy_tests.py | 46 +++++------ .../routing/collection_routing_map_test.py | 34 ++++---- .../routing/routing_map_provider_tests.py | 78 +++++++++---------- .../azure-cosmos/test/routing_map_tests.py | 8 +- sdk/cosmos/azure-cosmos/test/session_tests.py | 16 ++-- .../test/session_token_unit_tests.py | 2 +- .../test/streaming_failover_test.py | 24 +++--- sdk/cosmos/azure-cosmos/test/utils_tests.py | 4 +- 61 files changed, 344 insertions(+), 347 deletions(-) rename sdk/cosmos/azure-cosmos/azure/cosmos/{base.py => _base.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{consistent_hash_ring.py => _consistent_hash_ring.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{constants.py => _constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{cosmos_client_connection.py => _cosmos_client_connection.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{default_retry_policy.py => _default_retry_policy.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{endpoint_discovery_retry_policy.py => _endpoint_discovery_retry_policy.py} (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/aggregators.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/base_execution_context.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/document_producer.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/endpoint_component.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/execution_dispatcher.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/multi_execution_aggregator.py (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/query_execution_info.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{global_endpoint_manager.py => _global_endpoint_manager.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{hash_partition_resolver.py => _hash_partition_resolver.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{location_cache.py => _location_cache.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{murmur_hash.py => _murmur_hash.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{partition.py => _partition.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{query_iterable.py => _query_iterable.py} (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range.py => _range.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range_partition_resolver.py => _range_partition_resolver.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{request_object.py => _request_object.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{resource_throttle_retry_policy.py => _resource_throttle_retry_policy.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_options.py => _retry_options.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_utility.py => _retry_utility.py} (83%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/collection_routing_map.py (79%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_map_provider.py (80%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_range.py (89%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{runtime_constants.py => _runtime_constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session.py => _session.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session_retry_policy.py => _session_retry_policy.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{synchronized_request.py => _synchronized_request.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{utils.py => _utils.py} (86%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{vector_session_token.py => _vector_session_token.py} (99%) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/base.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_base.py index 5fa2839f0b0d..6e4bf3e10888 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py @@ -33,8 +33,8 @@ from . import documents from . import partition_key from . import http_constants -from . import constants -from . import runtime_constants +from . import _constants as constants +from . import _runtime_constants import six from six.moves.urllib.parse import quote as urllib_quote @@ -178,10 +178,10 @@ def GetHeaders(cosmos_client_connection, if verb == 'post' or verb == 'put': if not headers.get(http_constants.HttpHeaders.ContentType): - headers[http_constants.HttpHeaders.ContentType] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.ContentType] = _runtime_constants.MediaTypes.Json if not headers.get(http_constants.HttpHeaders.Accept): - headers[http_constants.HttpHeaders.Accept] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.Accept] = _runtime_constants.MediaTypes.Json if partition_key_range_id is not None: headers[http_constants.HttpHeaders.PartitionKeyRangeID] = partition_key_range_id diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py index 6b6bdd086b62..93198b3f1d72 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py @@ -26,10 +26,10 @@ import six from six.moves import xrange -from . import partition +from . import _partition -class _ConsistentHashRing(object): +class ConsistentHashRing(object): """The ConsistentHashRing class implements a consistent hash ring using the hash generator specified. """ @@ -79,13 +79,13 @@ def _ConstructPartitions(self, collection_links, partitions_per_node): using the hashing algorithm and then finally sorting the partitions based on the hash value. """ collections_node_count = len(collection_links) - partitions = [partition._Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] + partitions = [_partition.Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] index = 0 for collection_node in collection_links: hash_value = self.hash_generator.ComputeHash(self._GetBytes(collection_node)) for _ in xrange(0, partitions_per_node): - partitions[index] = partition._Partition(hash_value, collection_node) + partitions[index] = _partition.Partition(hash_value, collection_node) index += 1 hash_value = self.hash_generator.ComputeHash(hash_value) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py index f7b2fe1cca57..6f9fe50a1c86 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py @@ -25,18 +25,18 @@ import six from typing import cast -from . import base +from . import _base as base from . import documents -from . import constants +from . import _constants as constants from . import http_constants -from . import query_iterable -from . import runtime_constants -from . import request_object -from . import synchronized_request -from . import global_endpoint_manager -from .routing import routing_map_provider as routing_map_provider -from . import session -from . import utils +from . import _query_iterable as query_iterable +from . import _runtime_constants as runtime_constants +from . import _request_object +from . import _synchronized_request as synchronized_request +from . import _global_endpoint_manager as global_endpoint_manager +from ._routing import routing_map_provider as routing_map_provider +from . import _session +from . import _utils from .partition_key import _Undefined, _Empty @@ -110,7 +110,7 @@ def __init__(self, http_constants.HttpHeaders.Version: http_constants.Versions.CurrentVersion, http_constants.HttpHeaders.UserAgent: - utils._get_user_agent(), + _utils.get_user_agent(), # For single partition query with aggregate functions we would try to accumulate the results on the SDK. # We need to set continuation as not expected. http_constants.HttpHeaders.IsContinuationExpected: False @@ -127,7 +127,7 @@ def __init__(self, '''create a session - this is maintained only if the default consistency level on the client is set to session, or if the user explicitly sets it as a property via setter''' - self.session = session.Session(self.url_connection) + self.session = _session.Session(self.url_connection) else: self.session = None @@ -150,7 +150,7 @@ def __init__(self, self._query_compatibility_mode = CosmosClientConnection._QueryCompatibilityMode.Default # Routing map provider - self._routing_map_provider = routing_map_provider._SmartRoutingMapProvider(self) + self._routing_map_provider = routing_map_provider.SmartRoutingMapProvider(self) database_account = self._global_endpoint_manager._GetDatabaseAccount() self._global_endpoint_manager.force_refresh(database_account) @@ -1932,7 +1932,7 @@ def ReadMedia(self, media_link): {}) # ReadMedia will always use WriteEndpoint since it's not replicated in readable Geo regions - request = request_object._RequestObject('media', documents._OperationType.Read) + request = _request_object.RequestObject('media', documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -1981,7 +1981,7 @@ def UpdateMedia(self, media_link, readable_stream, options=None): options) # UpdateMedia will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject('media', documents._OperationType.Update) + request = _request_object.RequestObject('media', documents._OperationType.Update) result, self.last_response_headers = self.__Put(path, request, readable_stream, @@ -2200,7 +2200,7 @@ def ExecuteStoredProcedure(self, sproc_link, params, options=None): options) # ExecuteStoredProcedure will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) + request = _request_object.RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) result, self.last_response_headers = self.__Post(path, request, params, @@ -2389,7 +2389,7 @@ def GetDatabaseAccount(self, url_connection=None): '', # type {}) - request = request_object._RequestObject('databaseaccount', documents._OperationType.Read, url_connection) + request = _request_object.RequestObject('databaseaccount', documents._OperationType.Read, url_connection) result, self.last_response_headers = self.__Get('', request, headers) @@ -2449,7 +2449,7 @@ def Create(self, body, path, type, id, initial_headers, options=None): options) # Create will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Create) + request = _request_object.RequestObject(type, documents._OperationType.Create) result, self.last_response_headers = self.__Post(path, request, body, @@ -2491,7 +2491,7 @@ def Upsert(self, body, path, type, id, initial_headers, options=None): headers[http_constants.HttpHeaders.IsUpsert] = True # Upsert will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Upsert) + request = _request_object.RequestObject(type, documents._OperationType.Upsert) result, self.last_response_headers = self.__Post(path, request, body, @@ -2529,7 +2529,7 @@ def Replace(self, resource, path, type, id, initial_headers, options=None): type, options) # Replace will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject(type, documents._OperationType.Replace) + request = _request_object.RequestObject(type, documents._OperationType.Replace) result, self.last_response_headers = self.__Put(path, request, resource, @@ -2567,7 +2567,7 @@ def Read(self, path, type, id, initial_headers, options=None): type, options) # Read will use ReadEndpoint since it uses GET operation - request = request_object._RequestObject(type, documents._OperationType.Read) + request = _request_object.RequestObject(type, documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -2601,7 +2601,7 @@ def DeleteResource(self, path, type, id, initial_headers, options=None): type, options) # Delete will use WriteEndpoint since it uses DELETE operation - request = request_object._RequestObject(type, documents._OperationType.Delete) + request = _request_object.RequestObject(type, documents._OperationType.Delete) result, self.last_response_headers = self.__Delete(path, request, headers) @@ -2783,7 +2783,7 @@ def __GetBodiesFromQueryResult(result): # Copy to make sure that default_headers won't be changed. if query is None: # Query operations will use ReadEndpoint even though it uses GET(for feed requests) - request = request_object._RequestObject(type, documents._OperationType.ReadFeed) + request = _request_object.RequestObject(type, documents._OperationType.ReadFeed) headers = base.GetHeaders(self, initial_headers, 'get', @@ -2811,7 +2811,7 @@ def __GetBodiesFromQueryResult(result): raise SystemError('Unexpected query compatibility mode.') # Query operations will use ReadEndpoint even though it uses POST(for regular query operations) - request = request_object._RequestObject(type, documents._OperationType.SqlQuery) + request = _request_object.RequestObject(type, documents._OperationType.SqlQuery) headers = base.GetHeaders(self, initial_headers, 'post', diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py index 1fc309c98302..8cb094c1552a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py @@ -23,7 +23,7 @@ """ from . import http_constants -class _DefaultRetryPolicy(object): +class DefaultRetryPolicy(object): error_codes = http_constants._ErrorCodes CONNECTION_ERROR_CODES = [ @@ -52,7 +52,7 @@ def __init__(self, *args): self.args = args def needsRetry(self, error_code): - if error_code in _DefaultRetryPolicy.CONNECTION_ERROR_CODES: + if error_code in DefaultRetryPolicy.CONNECTION_ERROR_CODES: if (len(self.args) > 0): if (self.args[4]['method'] == 'GET') or (http_constants.HttpHeaders.IsQuery in self.args[4]['headers']): return True diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py index dbc1e41f845f..d3158cd20035 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py @@ -33,7 +33,7 @@ logger.addHandler(log_handler) -class _EndpointDiscoveryRetryPolicy(object): +class EndpointDiscoveryRetryPolicy(object): """The endpoint discovery retry policy class used for geo-replicated database accounts to handle the write forbidden exceptions due to writable/readable location changes (say, after a failover). @@ -44,9 +44,9 @@ class _EndpointDiscoveryRetryPolicy(object): def __init__(self, connection_policy, global_endpoint_manager, *args): self.global_endpoint_manager = global_endpoint_manager - self._max_retry_attempt_count = _EndpointDiscoveryRetryPolicy.Max_retry_attempt_count + self._max_retry_attempt_count = EndpointDiscoveryRetryPolicy.Max_retry_attempt_count self.failover_retry_count = 0 - self.retry_after_in_milliseconds = _EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds + self.retry_after_in_milliseconds = EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds self.connection_policy = connection_policy self.request = args[0] if args else None #clear previous location-based routing directive diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py index 402acb514fbc..2a3ed76bce64 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py @@ -22,7 +22,7 @@ """Internal class for aggregation queries implementation in the Azure Cosmos database service. """ from abc import abstractmethod, ABCMeta -from azure.cosmos.execution_context.document_producer import _OrderByHelper +from azure.cosmos._execution_context.document_producer import _OrderByHelper class _Aggregator(object): 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 similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py index 42bd23269da2..e32fb2e95b28 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 @@ -23,9 +23,9 @@ """ from collections import deque -from .. import retry_utility +from .. import _retry_utility from .. import http_constants -from .. import base +from .. import _base class _QueryExecutionContextBase(object): """ @@ -140,7 +140,7 @@ def _fetch_items_helper_with_retries(self, fetch_function): def callback(): return self._fetch_items_helper_no_retries(fetch_function) - return retry_utility._Execute(self._client, self._client._global_endpoint_manager, callback) + return _retry_utility.Execute(self._client, self._client._global_endpoint_manager, callback) class _DefaultQueryExecutionContext(_QueryExecutionContextBase): @@ -208,8 +208,8 @@ def __init__(self, client, options, database_link, query, partition_key): raise ValueError("_collection_links_length is not greater than 0.") # Creating the QueryFeed for the first collection - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._current_collection_index += 1 @@ -241,8 +241,8 @@ def _fetch_next_block(self): # creating separate feed queries for each collection and fetching the items while not fetched_items: if self._collection_links and self._current_collection_index < self._collection_links_length: - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._continuation = None self._has_started = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py index c74a60e3bade..f6f7db7e911e 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py @@ -25,8 +25,8 @@ import six import numbers from collections import deque -from azure.cosmos import base -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos import _base +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext from six.moves import xrange class _DocumentProducer(object): @@ -51,8 +51,8 @@ def __init__(self, partition_key_target_range, client, collection_link, query, d self._cur_item = None # initiate execution context - path = base.GetPathFromLink(collection_link, 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + path = _base.GetPathFromLink(collection_link, 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) def fetch_fn(options): return self._client.QueryFeed(path, collection_id, diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py index 868a55464639..77dda8512b00 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py @@ -23,7 +23,7 @@ """ import numbers -from azure.cosmos.execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ +from azure.cosmos._execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ _MinAggregator, _SumAggregator diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py index 6f7740af4f43..acc7452da9ab 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py @@ -25,11 +25,11 @@ import json from six.moves import xrange from azure.cosmos.errors import HTTPFailure -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext -from azure.cosmos.execution_context.query_execution_info import _PartitionedQueryExecutionInfo -from azure.cosmos.execution_context import endpoint_component -from azure.cosmos.execution_context import multi_execution_aggregator +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos._execution_context.query_execution_info import _PartitionedQueryExecutionInfo +from azure.cosmos._execution_context import endpoint_component +from azure.cosmos._execution_context import multi_execution_aggregator from azure.cosmos.http_constants import StatusCodes, SubStatusCodes class _ProxyQueryExecutionContext(_QueryExecutionContextBase): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py index 63a2dfb3b706..f0bfb8887fd1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py @@ -23,9 +23,9 @@ """ import heapq -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context import document_producer -from azure.cosmos.routing import routing_range +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context import document_producer +from azure.cosmos._routing import routing_range class _MultiExecutionContextAggregator(_QueryExecutionContextBase): """This class is capable of queries which requires rewriting based on @@ -147,4 +147,4 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range def _get_target_parition_key_range(self): query_ranges = self._partitioned_query_ex_info.get_query_ranges() - return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range._Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) + return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py index 0d7ff3936b76..0c44a81a138a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py @@ -24,9 +24,9 @@ from six.moves.urllib.parse import urlparse import threading -from . import constants +from . import _constants as constants from . import errors -from .location_cache import LocationCache +from ._location_cache import LocationCache class _GlobalEndpointManager(object): """ diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py index 8b15926ec680..fca0cfe85d6f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py @@ -22,8 +22,8 @@ """Hash partition resolver implementation in the Azure Cosmos database service. """ -from . import murmur_hash -from . import consistent_hash_ring +from . import _murmur_hash +from . import _consistent_hash_ring class HashPartitionResolver(object): """HashPartitionResolver implements partitioning based on the value of a hash function, allowing you to evenly @@ -51,9 +51,9 @@ def __init__(self, partition_key_extractor, collection_links, default_number_of_ self.collection_links = collection_links if hash_generator is None: - hash_generator = murmur_hash._MurmurHash() + hash_generator = _murmur_hash.MurmurHash() - self.consistent_hash_ring = consistent_hash_ring._ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) + self.consistent_hash_ring = _consistent_hash_ring.ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) def ResolveForCreate(self, document): """Resolves the collection for creating the document based on the partition key. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py index 1534cef4f9ea..68f7cdb23a24 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py @@ -25,7 +25,6 @@ import collections import time -from . import base from . import documents from . import http_constants diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py index d94b5f39044b..0785b75096e6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py @@ -43,7 +43,7 @@ https://pypi.python.org/pypi/mmh3/2.0 ''' -class _MurmurHash(object): +class MurmurHash(object): """ The 32 bit x86 version of MurmurHash3 implementation. """ def ComputeHash(self, key): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/partition.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py index ffd931965bca..35f1611a21bc 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py @@ -24,7 +24,7 @@ from six.moves import xrange -class _Partition(object): +class Partition(object): """Represents a class that holds the hash value and node name for each partition. """ def __init__(self, hash_value = None, node = None): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py index ad2e8cd98d96..8abd73b4f8c1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py @@ -21,8 +21,8 @@ """Iterable query results in the Azure Cosmos database service. """ -from azure.cosmos.execution_context import execution_dispatcher -from azure.cosmos.execution_context import base_execution_context +from azure.cosmos._execution_context import execution_dispatcher +from azure.cosmos._execution_context import base_execution_context class QueryIterable(object): """Represents an iterable object of the query results. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py index db9ef786765f..fa882a0a0c54 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py @@ -21,7 +21,7 @@ """Represents a request object. """ -class _RequestObject(object): +class RequestObject(object): def __init__(self, resource_type, operation_type, endpoint_override = None): self.resource_type = resource_type self.operation_type = operation_type diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py index f3179a1902ef..57d32fd2b8e7 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py @@ -24,7 +24,7 @@ from . import http_constants -class _ResourceThrottleRetryPolicy(object): +class ResourceThrottleRetryPolicy(object): def __init__(self, max_retry_attempt_count, fixed_retry_interval_in_milliseconds, max_wait_time_in_seconds): self._max_retry_attempt_count = max_retry_attempt_count diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py similarity index 83% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py index 1daa9a1f8c26..95f611fe4f2d 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py @@ -25,13 +25,13 @@ import time from . import errors -from . import endpoint_discovery_retry_policy -from . import resource_throttle_retry_policy -from . import default_retry_policy -from . import session_retry_policy +from . import _endpoint_discovery_retry_policy +from . import _resource_throttle_retry_policy +from . import _default_retry_policy +from . import _session_retry_policy from .http_constants import HttpHeaders, StatusCodes, SubStatusCodes -def _Execute(client, global_endpoint_manager, function, *args, **kwargs): +def Execute(client, global_endpoint_manager, function, *args, **kwargs): """Exectutes the function with passed parameters applying all retry policies :param object client: @@ -45,20 +45,20 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): """ # instantiate all retry policies here to be applied for each request execution - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) - resourceThrottle_retry_policy = resource_throttle_retry_policy._ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, + resourceThrottle_retry_policy = _resource_throttle_retry_policy.ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, client.connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds, client.connection_policy.RetryOptions.MaxWaitTimeInSeconds) - defaultRetry_policy = default_retry_policy._DefaultRetryPolicy(*args) + defaultRetry_policy = _default_retry_policy.DefaultRetryPolicy(*args) - sessionRetry_policy = session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) + sessionRetry_policy = _session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) while True: try: if args: - result = _ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) + result = ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) else: - result = _ExecuteFunction(function, *args, **kwargs) + result = ExecuteFunction(function, *args, **kwargs) if not client.last_response_headers: client.last_response_headers = {} @@ -94,7 +94,7 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): # Wait for retry_after_in_milliseconds time before the next retry time.sleep(retry_policy.retry_after_in_milliseconds / 1000.0) -def _ExecuteFunction(function, *args, **kwargs): +def ExecuteFunction(function, *args, **kwargs): """ Stub method so that it can be used for mocking purposes as well. """ return function(*args, **kwargs) \ No newline at end of file diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py similarity index 79% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py index bb030c3fc223..d1f86eb05b89 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py @@ -23,11 +23,11 @@ """ import bisect -from azure.cosmos.routing import routing_range -from azure.cosmos.routing.routing_range import _PartitionKeyRange +from azure.cosmos._routing import routing_range +from azure.cosmos._routing.routing_range import PartitionKeyRange from six.moves import xrange -class _CollectionRoutingMap(object): +class CollectionRoutingMap(object): """Stores partition key ranges in an efficient way with some additional information and provides convenience methods for working with set of ranges. """ @@ -40,7 +40,7 @@ def __init__(self, range_by_id, range_by_info, ordered_partition_key_ranges, ord self._rangeByInfo = range_by_info self._orderedPartitionKeyRanges = ordered_partition_key_ranges - self._orderedRanges = [routing_range._Range(pkr[_PartitionKeyRange.MinInclusive], pkr[_PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] + self._orderedRanges = [routing_range.Range(pkr[PartitionKeyRange.MinInclusive], pkr[PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] self._orderedPartitionInfo = ordered_partition_info self._collectionUniqueId = collection_unique_id @@ -51,15 +51,15 @@ def CompleteRoutingMap(cls, partition_key_range_info_tupple_list, collection_uni sortedRanges = [] for r in partition_key_range_info_tupple_list: - rangeById[r[0][_PartitionKeyRange.Id]] = r + rangeById[r[0][PartitionKeyRange.Id]] = r rangeByInfo[r[1]] = r[0] sortedRanges.append(r) - sortedRanges.sort(key = lambda r: r[0][_PartitionKeyRange.MinInclusive]) + sortedRanges.sort(key = lambda r: r[0][PartitionKeyRange.MinInclusive]) partitionKeyOrderedRange = [r[0] for r in sortedRanges] orderedPartitionInfo = [r[1] for r in sortedRanges] - if not _CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None + if not CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None return cls(rangeById, rangeByInfo, partitionKeyOrderedRange, orderedPartitionInfo, collection_unique_id) def get_ordered_partition_key_ranges(self): @@ -80,10 +80,10 @@ def get_range_by_effective_partition_key(self, effective_partition_key_value): The partition key range. :rtype: dict """ - if _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: return self._orderedPartitionKeyRanges[0] - if _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: return None sortedLow = [(r.min, not r.isMinInclusive) for r in self._orderedRanges] @@ -118,7 +118,7 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): :rtype: list """ - if isinstance(provided_partition_key_ranges, routing_range._Range): + if isinstance(provided_partition_key_ranges, routing_range.Range): return self.get_overlapping_ranges([provided_partition_key_ranges]) minToPartitionRange = {} @@ -135,14 +135,14 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): maxIndex = maxIndex - 1 for i in xrange(minIndex, maxIndex + 1): - if routing_range._Range.overlaps(self._orderedRanges[i], providedRange): - minToPartitionRange[self._orderedPartitionKeyRanges[i][_PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] + if routing_range.Range.overlaps(self._orderedRanges[i], providedRange): + minToPartitionRange[self._orderedPartitionKeyRanges[i][PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] overlapping_partition_key_ranges = list(minToPartitionRange.values()) def getKey(r): - return r[_PartitionKeyRange.MinInclusive] + return r[PartitionKeyRange.MinInclusive] overlapping_partition_key_ranges.sort(key = getKey) return overlapping_partition_key_ranges @@ -153,16 +153,16 @@ def is_complete_set_of_range(ordered_partition_key_range_list): firstRange = ordered_partition_key_range_list[0] lastRange = ordered_partition_key_range_list[-1] - isComplete = (firstRange[_PartitionKeyRange.MinInclusive] == _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) - isComplete &= (lastRange[_PartitionKeyRange.MaxExclusive] == _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) + isComplete = (firstRange[PartitionKeyRange.MinInclusive] == CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) + isComplete &= (lastRange[PartitionKeyRange.MaxExclusive] == CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) for i in range(1, len(ordered_partition_key_range_list)): previousRange = ordered_partition_key_range_list[i - 1] currentRange = ordered_partition_key_range_list[i] - isComplete &= previousRange[_PartitionKeyRange.MaxExclusive] == currentRange[_PartitionKeyRange.MinInclusive] + isComplete &= previousRange[PartitionKeyRange.MaxExclusive] == currentRange[PartitionKeyRange.MinInclusive] if not isComplete: - if previousRange[_PartitionKeyRange.MaxExclusive] > currentRange[_PartitionKeyRange.MinInclusive]: + if previousRange[PartitionKeyRange.MaxExclusive] > currentRange[PartitionKeyRange.MinInclusive]: raise ValueError("Ranges overlap") break diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py similarity index 80% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py index 73c9ed56529d..7b371e97e2d3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py @@ -22,14 +22,14 @@ """Internal class for partition key range cache implementation in the Azure Cosmos database service. """ -from .. import base -from .collection_routing_map import _CollectionRoutingMap +from .. import _base +from .collection_routing_map import CollectionRoutingMap from . import routing_range -from .routing_range import _PartitionKeyRange +from .routing_range import PartitionKeyRange -class _PartitionKeyRangeCache(object): +class PartitionKeyRangeCache(object): ''' - _PartitionKeyRangeCache provides list of effective partition key ranges for a collection. + PartitionKeyRangeCache provides list of effective partition key ranges for a collection. This implementation loads and caches the collection routing map per collection on demand. ''' @@ -59,7 +59,7 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): ''' cl = self._documentClient - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) collection_routing_map = self._collection_routing_map_by_item.get(collection_id) if collection_routing_map is None: @@ -67,8 +67,8 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): # for large collections, a split may complete between the read partition key ranges query page responses, # causing the partitionKeyRanges to have both the children ranges and their parents. Therefore, we need # to discard the parent ranges to have a valid routing map. - collection_pk_ranges = _PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) + collection_pk_ranges = PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) self._collection_routing_map_by_item[collection_id] = collection_routing_map return collection_routing_map.get_overlapping_ranges(partition_key_ranges) @@ -76,17 +76,17 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): def _discard_parent_ranges(partitionKeyRanges): parentIds = set() for r in partitionKeyRanges: - if isinstance(r, dict) and _PartitionKeyRange.Parents in r: - for parentId in r[_PartitionKeyRange.Parents]: + if isinstance(r, dict) and PartitionKeyRange.Parents in r: + for parentId in r[PartitionKeyRange.Parents]: parentIds.add(parentId) - return (r for r in partitionKeyRanges if r[_PartitionKeyRange.Id] not in parentIds) + return (r for r in partitionKeyRanges if r[PartitionKeyRange.Id] not in parentIds) -class _SmartRoutingMapProvider(_PartitionKeyRangeCache): +class SmartRoutingMapProvider(PartitionKeyRangeCache): """ - Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of _CollectionRoutingMap.get_overlapping_ranges() + Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of CollectionRoutingMap.get_overlapping_ranges() """ def __init__(self, client): - super(_SmartRoutingMapProvider, self).__init__(client) + super(SmartRoutingMapProvider, self).__init__(client) def _second_range_is_after_first_range(self, range1, range2): @@ -112,20 +112,20 @@ def _subtract_range(self, r, partition_key_range): Evaluates and returns r - partition_key_range :param dict partition_key_range: Partition key range. - :param routing_range._Range r: query range. + :param routing_range.Range r: query range. :return: The subtract r - partition_key_range. - :rtype: routing_range._Range + :rtype: routing_range.Range """ - left = max(partition_key_range[routing_range._PartitionKeyRange.MaxExclusive], r.min) + left = max(partition_key_range[routing_range.PartitionKeyRange.MaxExclusive], r.min) if left == r.min: leftInclusive = r.isMinInclusive else: leftInclusive = False - queryRange = routing_range._Range(left, r.max, leftInclusive, + queryRange = routing_range.Range(left, r.max, leftInclusive, r.isMaxInclusive) return queryRange @@ -136,7 +136,7 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): :param str collection_link: The collection link. - :param (list of routing_range._Range) sorted_ranges: The sorted list of non-overlapping ranges. + :param (list of routing_range.Range) sorted_ranges: The sorted list of non-overlapping ranges. :return: List of partition key ranges. :rtype: list of dict @@ -163,11 +163,11 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): else: queryRange = currentProvidedRange - overlappingRanges = _PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) + overlappingRanges = PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) assert len(overlappingRanges), ("code bug: returned overlapping ranges for queryRange {} is empty".format(queryRange)) target_partition_key_ranges.extend(overlappingRanges) - lastKnownTargetRange = routing_range._Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) + lastKnownTargetRange = routing_range.Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) # the overlapping ranges must contain the requested range assert currentProvidedRange.max <= lastKnownTargetRange.max, "code bug: returned overlapping ranges {} does not contain the requested range {}".format(overlappingRanges, queryRange) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py similarity index 89% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py index f2ca0d76e148..fa0678f5b57c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py @@ -22,14 +22,14 @@ """Internal class for partition key range implementation in the Azure Cosmos database service. """ -class _PartitionKeyRange(object): +class PartitionKeyRange(object): """Partition Key Range Constants""" MinInclusive = 'minInclusive' MaxExclusive = 'maxExclusive' Id = 'id' Parents = 'parents' -class _Range(object): +class Range(object): """description of class""" MinPath = 'min' @@ -58,13 +58,13 @@ def contains(self, value): @classmethod def PartitionKeyRangeToRange(cls, partition_key_range): - self = cls(partition_key_range[_PartitionKeyRange.MinInclusive], partition_key_range[_PartitionKeyRange.MaxExclusive], + self = cls(partition_key_range[PartitionKeyRange.MinInclusive], partition_key_range[PartitionKeyRange.MaxExclusive], True, False) return self @classmethod def ParseFromDict(cls, range_as_dict): - self = cls(range_as_dict[_Range.MinPath], range_as_dict[_Range.MaxPath], range_as_dict[_Range.IsMinInclusivePath], range_as_dict[_Range.IsMaxInclusivePath]) + self = cls(range_as_dict[Range.MinPath], range_as_dict[Range.MaxPath], range_as_dict[Range.IsMinInclusivePath], range_as_dict[Range.IsMaxInclusivePath]) return self def isSingleValue(self): @@ -97,8 +97,8 @@ def overlaps(range1, range2): if range1 is None or range2 is None: return False if range1.isEmpty() or range2.isEmpty(): return False - cmp1 = _Range._compare_helper(range1.min, range2.max) - cmp2 = _Range._compare_helper(range2.min, range1.max) + cmp1 = Range._compare_helper(range1.min, range2.max) + cmp2 = Range._compare_helper(range2.min, range1.max) if (cmp1 <= 0 or cmp2 <= 0): if ((cmp1 == 0 and not(range1.isMinInclusive and range2.isMaxInclusive)) or (cmp2 == 0 and not(range2.isMinInclusive and range1.isMaxInclusive))): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session.py index 38eece56dec2..fe7c35cdf9d6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py @@ -25,9 +25,9 @@ import sys, traceback import threading -from . import base +from . import _base from . import http_constants -from .vector_session_token import VectorSessionToken +from ._vector_session_token import VectorSessionToken from .errors import HTTPFailure class SessionContainer(object): @@ -51,17 +51,17 @@ def get_session_token(self, resource_path): """ with self.session_lock: - is_name_based = base.IsNameBased(resource_path) + is_name_based = _base.IsNameBased(resource_path) collection_rid = '' session_token = '' try: if is_name_based: # get the collection name - collection_name = base.GetItemContainerLink(resource_path) + collection_name = _base.GetItemContainerLink(resource_path) collection_rid = self.collection_name_to_rid[collection_name] else: - collection_rid = base.GetItemContainerLink(resource_path) + collection_rid = _base.GetItemContainerLink(resource_path) if collection_rid in self.rid_to_session_token: token_dict = self.rid_to_session_token[collection_rid] @@ -112,7 +112,7 @@ def set_session_token(self, response_result, response_headers): response_result_id = response_result[response_result_id_key] else: return - collection_rid, collection_name = base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) + collection_rid, collection_name = _base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) except ValueError: return diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py index 9538a993580c..2ba8c1b2cdd8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py @@ -30,7 +30,7 @@ from . import documents from . import errors from . import http_constants -from . import retry_utility +from . import _retry_utility def _IsReadableStream(obj): """Checks whether obj is a file-like readable stream. @@ -224,5 +224,5 @@ def SynchronizedRequest(client, request_options['headers'][http_constants.HttpHeaders.ContentLength] = 0 # Pass _Request function with it's parameters to retry_utility's Execute method that wraps the call with retries - return retry_utility._Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) + return _retry_utility.Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py similarity index 86% rename from sdk/cosmos/azure-cosmos/azure/cosmos/utils.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py index e20216199ef5..8178ef426084 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py @@ -26,17 +26,17 @@ import re as re from . import http_constants -def _get_user_agent(): - os_name = _safe_user_agent_header(platform.system()) - os_version = _safe_user_agent_header(platform.release()) - python_version = _safe_user_agent_header(platform.python_version()) +def get_user_agent(): + os_name = safe_user_agent_header(platform.system()) + os_version = safe_user_agent_header(platform.release()) + python_version = safe_user_agent_header(platform.python_version()) user_agent = "{}/{} Python/{} {}/{}".format(os_name, os_version, python_version, http_constants.Versions.SDKName, http_constants.Versions.SDKVersion) return user_agent -def _safe_user_agent_header(s): +def safe_user_agent_header(s): if s is None: s = "unknown" # remove all white spaces diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py index 1dfee1974e6b..d2cd6920fc1c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py @@ -23,7 +23,6 @@ """ from . import errors -from . import base from .http_constants import StatusCodes class VectorSessionToken(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py index 8326d5224260..7d2b9fd35795 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py @@ -23,12 +23,12 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .errors import HTTPFailure from .http_constants import StatusCodes from .offer import Offer from .scripts import Scripts -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import NonePartitionKeyValue from typing import ( Any, @@ -222,7 +222,7 @@ def read_all_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: feed_options = {} # type: Dict[str, Any] @@ -264,7 +264,7 @@ def query_items_change_feed( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: @@ -317,7 +317,7 @@ def query_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). You can use any value for the container name in the FROM clause, but typically the container name is used. In the examples below, the container name is "products," and is aliased as "p" for easier referencing @@ -675,7 +675,7 @@ def read_all_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: @@ -712,7 +712,7 @@ def query_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py index f1de1976f98a..a4d5ff828734 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py @@ -23,10 +23,10 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .database import Database from .documents import ConnectionPolicy, DatabaseAccount -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, Callable, @@ -184,7 +184,7 @@ def read_all_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: @@ -231,7 +231,7 @@ def query_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py index 68ef288106e5..21df096ca050 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py @@ -23,13 +23,13 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .container import Container from .offer import Offer from .http_constants import StatusCodes from .errors import HTTPFailure from .user import User -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import PartitionKey from typing import ( @@ -332,7 +332,7 @@ def read_all_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). .. literalinclude:: ../../examples/examples.py :start-after: [START list_containers] @@ -385,7 +385,7 @@ def query_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). """ if not feed_options: @@ -503,7 +503,7 @@ def read_all_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: @@ -536,7 +536,7 @@ def query_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py index fc45f5157dfc..33be86d9004f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py @@ -22,7 +22,7 @@ """AzureDocument classes and enums for the Azure Cosmos database service. """ -from . import retry_options +from . import _retry_options class DatabaseAccount(object): """Database account. A DatabaseAccount is the container for databases. @@ -368,7 +368,7 @@ def __init__(self): self.ProxyConfiguration = None self.EnableEndpointDiscovery = True self.PreferredLocations = [] - self.RetryOptions = retry_options.RetryOptions() + self.RetryOptions = _retry_options.RetryOptions() self.DisableSSLVerification = False self.UseMultipleWriteLocations = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py index 7487c36a4d3b..52f9ccfdd6e3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py @@ -23,9 +23,9 @@ """ import six -from azure.cosmos.cosmos_client_connection import CosmosClientConnection +from azure.cosmos._cosmos_client_connection import CosmosClientConnection from .partition_key import NonePartitionKeyValue -from.query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, List, @@ -64,7 +64,7 @@ def list_stored_procedures( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -91,7 +91,7 @@ def query_stored_procedures( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -246,7 +246,7 @@ def list_triggers( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -273,7 +273,7 @@ def query_triggers( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -394,7 +394,7 @@ def list_user_defined_functions( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: @@ -421,7 +421,7 @@ def query_user_defined_functions( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py index f7c212c56c27..9b1eaf39236b 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py @@ -23,7 +23,7 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from typing import ( Any, List, @@ -99,7 +99,7 @@ def read_all_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: @@ -133,7 +133,7 @@ def query_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py index 52f31029be52..a714278dc71d 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py @@ -4,7 +4,6 @@ import json import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.base as base class ConflictWorker(object): def __init__(self, database_name, basic_collection_name, manual_collection_name, lww_collection_name, udp_collection_name): diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py index 8b36c27ba0fe..8b97f0899838 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py @@ -3,7 +3,7 @@ from Worker import Worker from multiprocessing.pool import ThreadPool import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection class MultiMasterScenario(object): def __init__(self): diff --git a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py index 2dd41a646231..cd0082c5582e 100644 --- a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -import azure.cosmos.base as base +import azure.cosmos._base as base pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/crud_tests.py b/sdk/cosmos/azure-cosmos/test/crud_tests.py index 12f1d53df464..77a20f52709c 100644 --- a/sdk/cosmos/azure-cosmos/test/crud_tests.py +++ b/sdk/cosmos/azure-cosmos/test/crud_tests.py @@ -41,18 +41,18 @@ import urllib.parse as urllib import uuid import pytest -import azure.cosmos.consistent_hash_ring as consistent_hash_ring +from azure.cosmos import _consistent_hash_ring import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.murmur_hash as murmur_hash +import azure.cosmos._murmur_hash as _murmur_hash import test_config -import azure.cosmos.base as base +import azure.cosmos._base as base import azure.cosmos.cosmos_client as cosmos_client from azure.cosmos.diagnostics import RecordDiagnostics from azure.cosmos.partition_key import PartitionKey import conftest -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -298,11 +298,11 @@ def test_partitioned_collection_partition_key_extraction(self): } } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["WA"]') del self.last_headers[:] @@ -315,11 +315,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present as a leaf level property but a dict created_document = created_collection1.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -331,11 +331,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address/state/city', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present in the document created_document = created_collection2.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -358,10 +358,10 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): "level' 1*()": {"le/vel2": 'val1'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction created_document = created_collection1.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val1"]') del self.last_headers[:] @@ -385,11 +385,11 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): 'level\" 1*()': {'le/vel2': 'val2'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection2.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val2"]') del self.last_headers[:] @@ -851,13 +851,13 @@ def test_murmur_hash(self): str = 'afdgdd' bytes = bytearray(str, encoding='utf-8') - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(1099701186, hash_value) num = 374.0 bytes = bytearray(pack('d', num)) - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(3717946798, hash_value) self._validate_bytes("", 0x1B873593, bytearray(b'\xEE\xA8\xA2\x67'), 1738713326) @@ -878,25 +878,25 @@ def test_murmur_hash(self): 3381504877) def _validate_bytes(self, str, seed, expected_hash_bytes, expected_value): - hash_value = murmur_hash._MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) bytes = bytearray(pack('I', hash_value)) self.assertEqual(expected_value, hash_value) self.assertEqual(expected_hash_bytes, bytes) def test_get_bytes(self): - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("documentdb") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("documentdb") expected_bytes = bytearray(b'\x64\x6F\x63\x75\x6D\x65\x6E\x74\x64\x62') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("azure") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("azure") expected_bytes = bytearray(b'\x61\x7A\x75\x72\x65') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("json") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("json") expected_bytes = bytearray(b'\x6A\x73\x6F\x6E') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("nosql") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("nosql") expected_bytes = bytearray(b'\x6E\x6F\x73\x71\x6C') self.assertEqual(expected_bytes, actual_bytes) diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py index c387000390d9..5c07812625bf 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py @@ -23,13 +23,13 @@ import json import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -132,7 +132,7 @@ def setUp(self): # Copying the original objects and functions before assigning the mock versions of them self.OriginalGetDatabaseAccountStub = global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub self.OriginalGlobalEndpointManager = global_endpoint_manager._GlobalEndpointManager - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction # Make azure-cosmos use the MockGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager = MockGlobalEndpointManager @@ -141,13 +141,13 @@ def tearDown(self): # Restoring the original objects and functions global_endpoint_manager._GlobalEndpointManager = self.OriginalGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.OriginalGetDatabaseAccountStub - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def MockExecuteFunction(self, function, *args, **kwargs): global location_changed if self.endpoint_discovery_retry_count == 2: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction return (json.dumps([{ 'id': 'mock database' }]), None) else: self.endpoint_discovery_retry_count += 1 @@ -158,8 +158,8 @@ def MockGetDatabaseAccountStub(self, endpoint): raise errors.HTTPFailure(StatusCodes.SERVICE_UNAVAILABLE, "Service unavailable") def MockCreateDatabase(self, client, database): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self.MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self.MockExecuteFunction client.CreateDatabase(database) def test_globaldb_endpoint_discovery_retry_policy(self): diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py index 5241118dbfa7..e0e8eb41db7e 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py @@ -26,12 +26,12 @@ import time import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos import _retry_utility from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes import test_config @@ -359,8 +359,8 @@ def test_globaldb_locational_endpoint_parser(self): def test_globaldb_endpoint_discovery_retry_policy_mock(self): client = cosmos_client_connection.CosmosClientConnection(Test_globaldb_tests.host, {'masterKey': Test_globaldb_tests.masterKey}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction self.OriginalGetDatabaseAccount = client.GetDatabaseAccount client.GetDatabaseAccount = self._MockGetDatabaseAccount @@ -368,8 +368,8 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): max_retry_attempt_count = 10 retry_after_in_milliseconds = 500 - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds document_definition = { 'id': 'doc', 'name': 'sample document', @@ -382,7 +382,7 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): self.test_coll['_self'], document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.FORBIDDEN, "Write Forbidden", {'x-ms-substatus' : SubStatusCodes.WRITE_FORBIDDEN}) diff --git a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py index 22e2689cded4..a2772ce270e8 100644 --- a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py +++ b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py @@ -4,13 +4,13 @@ from time import sleep from azure.cosmos.http_constants import ResourceType -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents -from azure.cosmos.request_object import _RequestObject -from azure.cosmos.location_cache import LocationCache +from azure.cosmos._request_object import RequestObject +from azure.cosmos._location_cache import LocationCache import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import six pytestmark = pytest.mark.cosmosEmulator @@ -74,8 +74,8 @@ def test_validate_retry_on_session_not_availabe_with_disable_multiple_write_loca def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self, is_preferred_locations_list_empty, use_multiple_write_locations, is_read_request): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled enable_endpoint_discovery = False @@ -95,7 +95,7 @@ def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): self.counter += 1 @@ -116,8 +116,8 @@ def test_validate_retry_on_session_not_availabe_with_endpoint_discovery_enabled( def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_empty, use_multiple_write_locations): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled @@ -136,7 +136,7 @@ def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_emp self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureTwice(self, function, *args, **kwargs): request = args[1] @@ -376,11 +376,11 @@ def validate_request_endpoint_resolution(self, use_multiple_write_locations, end def resolve_endpoint_for_read_request(self, master_resource_type): operation_type = documents._OperationType.Read resource_type = ResourceType.Database if master_resource_type else ResourceType.Document - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) return self.location_cache.resolve_service_endpoint(request) def resolve_endpoint_for_write_request(self, resource_type, use_alternate_write_endpoint): operation_type = documents._OperationType.Create - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) request.route_to_location_with_preferred_location_flag(1 if use_alternate_write_endpoint else 0, ResourceType.IsCollectionChild(resource_type)) return self.location_cache.resolve_service_endpoint(request) diff --git a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py index 8c0b5b24fa1a..11c740244dcc 100644 --- a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py +++ b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py @@ -2,9 +2,9 @@ import uuid import azure.cosmos.cosmos_client as cosmos_client import pytest -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config from azure.cosmos.partition_key import PartitionKey @@ -31,8 +31,8 @@ def test_tentative_writes_header_not_present(self): def _validate_tentative_write_headers(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction connectionPolicy = MultiMasterTests.connectionPolicy connectionPolicy.UseMultipleWriteLocations = True @@ -115,7 +115,7 @@ def _validate_tentative_write_headers(self): # Delete Database self.assertEqual(self.last_headers[10], is_allow_tentative_writes_set) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): self.counter += 1 diff --git a/sdk/cosmos/azure-cosmos/test/orderby_tests.py b/sdk/cosmos/azure-cosmos/test/orderby_tests.py index d8f85a49eb03..7b84ed856aaa 100644 --- a/sdk/cosmos/azure-cosmos/test/orderby_tests.py +++ b/sdk/cosmos/azure-cosmos/test/orderby_tests.py @@ -25,8 +25,8 @@ import azure.cosmos.documents as documents from azure.cosmos.partition_key import PartitionKey import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos import query_iterable -import azure.cosmos.base as base +from azure.cosmos import _query_iterable as query_iterable +import azure.cosmos._base as base from six.moves import xrange import test_config diff --git a/sdk/cosmos/azure-cosmos/test/proxy_tests.py b/sdk/cosmos/azure-cosmos/test/proxy_tests.py index c9144b8bec9e..552f76ee301c 100644 --- a/sdk/cosmos/azure-cosmos/test/proxy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/proxy_tests.py @@ -22,7 +22,7 @@ import unittest import pytest import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import test_config import six if six.PY2: diff --git a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py index 4a0ac5692459..f8138b6d5a8a 100644 --- a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py +++ b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py @@ -24,8 +24,8 @@ import pytest from six.moves import xrange import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.execution_context import base_execution_context as base_execution_context -import azure.cosmos.base as base +from azure.cosmos._execution_context import base_execution_context as base_execution_context +import azure.cosmos._base as base import test_config from azure.cosmos.partition_key import PartitionKey diff --git a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py index bffe7a194d0e..f25dfce77e78 100644 --- a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py @@ -25,9 +25,9 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.retry_options as retry_options +import azure.cosmos._retry_options as retry_options from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -78,9 +78,9 @@ def test_resource_throttle_retry_policy_default_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -94,15 +94,15 @@ def test_resource_throttle_retry_policy_default_retry_after(self): self.assertGreaterEqual( self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -117,15 +117,15 @@ def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy.RetryOptions.MaxRetryAttemptCount * connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_max_wait_time(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000, 3) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -138,7 +138,7 @@ def test_resource_throttle_retry_policy_max_wait_time(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxWaitTimeInSeconds * 1000) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_query(self): connection_policy = Test_retry_policy_tests.connectionPolicy @@ -150,9 +150,9 @@ def test_resource_throttle_retry_policy_query(self): self.created_collection.create_item(body=document_definition) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction try: list(self.created_collection.query_items( @@ -169,7 +169,7 @@ def test_resource_throttle_retry_policy_query(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_default_retry_policy_for_query(self): document_definition_1 = { 'id': 'doc1', @@ -183,9 +183,9 @@ def test_default_retry_policy_for_query(self): self.created_collection.create_item(body=document_definition_2) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf docs = self.created_collection.query_items(query="Select * from c", max_item_count=1, enable_cross_partition_query=True) @@ -194,7 +194,7 @@ def test_default_retry_policy_for_query(self): self.assertEqual(result_docs[1]['id'], 'doc2') self.assertEqual(mf.counter, 12) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=result_docs[0], partition_key=result_docs[0]['id']) self.created_collection.delete_item(item=result_docs[1], partition_key=result_docs[1]['id']) @@ -207,16 +207,16 @@ def test_default_retry_policy_for_read(self): created_document = self.created_collection.create_item(body=document_definition) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf doc = self.created_collection.read_item(item=created_document['id'], partition_key=created_document['id']) self.assertEqual(doc['id'], 'doc') self.assertEqual(mf.counter, 3) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=created_document, partition_key=created_document['id']) @@ -226,9 +226,9 @@ def test_default_retry_policy_for_create(self): 'key': 'value'} try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf created_document = {} try : @@ -241,7 +241,7 @@ def test_default_retry_policy_for_create(self): # 3 retries for readCollection. No retry for createDocument. self.assertEqual(mf.counter, 1) # TODO: The comment above implies that there should be a read in the test. But there isn't... finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.TOO_MANY_REQUESTS, "Request rate is too large", {HttpHeaders.RetryAfterInMilliseconds: self.retry_after_in_milliseconds}) diff --git a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py index ae5fa2c011af..c6cae9afd4ce 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py +++ b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.collection_routing_map import _CollectionRoutingMap -import azure.cosmos.routing.routing_range as routing_range -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache +from azure.cosmos._routing.collection_routing_map import CollectionRoutingMap +import azure.cosmos._routing.routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache pytestmark = pytest.mark.cosmosEmulator @@ -34,8 +34,8 @@ def test_advanced(self): partition_key_ranges = [{u'id': u'0', u'minInclusive': u'', u'maxExclusive': u'05C1C9CD673398'}, {u'id': u'1', u'minInclusive': u'05C1C9CD673398', u'maxExclusive': u'05C1D9CD673398'}, {u'id': u'2', u'minInclusive': u'05C1D9CD673398', u'maxExclusive': u'05C1E399CD6732'}, {u'id': u'3', u'minInclusive': u'05C1E399CD6732', u'maxExclusive': u'05C1E9CD673398'}, {u'id': u'4', u'minInclusive': u'05C1E9CD673398', u'maxExclusive': u'FF'}] partitionRangeWithInfo = [(r, True) for r in partition_key_ranges] - pkRange = routing_range._Range("", "FF", True, False) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + pkRange = routing_range.Range("", "FF", True, False) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') overlapping_partition_key_ranges = collection_routing_map.get_overlapping_ranges(pkRange) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) @@ -74,7 +74,7 @@ def get_range_id(r): return r[Id] # verify no thing is filtered out since there is no children ranges - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) self.assertEqual(['2', '0', '1', '3'], list(map(get_range_id, filteredRanges))) # add some children partition key ranges with parents Ids @@ -93,7 +93,7 @@ def get_range_id(r): Parents : ["0"]}) # verify the filtered range list has children ranges and the parent Ids are discarded - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) expectedRanges = ['2', '1', '3', '6', '7', '5'] self.assertEqual(expectedRanges, list(map(get_range_id, filteredRanges))) @@ -123,7 +123,7 @@ def test_collection_routing_map(self): 3) ] - crm = _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") + crm = CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") self.assertEqual("0", crm._orderedPartitionKeyRanges[0][Id]) self.assertEqual("1", crm._orderedPartitionKeyRanges[1][Id]) @@ -144,7 +144,7 @@ def test_collection_routing_map(self): self.assertEqual("0", crm.get_range_by_partition_key_range_id("0")[Id]) self.assertEqual("1", crm.get_range_by_partition_key_range_id("1")[Id]) - fullRangeMinToMaxRange = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) + fullRangeMinToMaxRange = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) overlappingRanges = crm.get_overlapping_ranges([fullRangeMinToMaxRange]) self.assertEqual(4, len(overlappingRanges)) @@ -154,18 +154,18 @@ def getKey(r): onlyParitionRanges.sort(key = getKey) self.assertEqual(overlappingRanges, onlyParitionRanges) - noPoint = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) + noPoint = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) self.assertEqual(0, len(crm.get_overlapping_ranges([noPoint]))) - onePoint = routing_range._Range("0000000040", "0000000040", True, True) + onePoint = routing_range.Range("0000000040", "0000000040", True, True) overlappingPartitionKeyRanges = crm.get_overlapping_ranges([onePoint]) self.assertEqual(1, len(overlappingPartitionKeyRanges)) self.assertEqual("1", overlappingPartitionKeyRanges[0][Id]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, True), - routing_range._Range("0000000045", "0000000046", True, True), - routing_range._Range("0000000046", "0000000050", True, True) + routing_range.Range("0000000040", "0000000045", True, True), + routing_range.Range("0000000045", "0000000046", True, True), + routing_range.Range("0000000046", "0000000050", True, True) ] overlappingPartitionKeyRanges = crm.get_overlapping_ranges(ranges) @@ -182,12 +182,12 @@ def test_invalid_routing_map(self): collectionUniqueId = "" def createRoutingMap(): - _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) + CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) self.assertRaises(ValueError, createRoutingMap) def test_incomplete_routing_map(self): - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "3", 'minInclusive' : "0000000031", 'maxExclusive' : "FF"}, 2), @@ -195,7 +195,7 @@ def test_incomplete_routing_map(self): , "") self.assertIsNone(crm) - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "2", 'minInclusive' : "0000000030", 'maxExclusive' : "FF"}, 2), diff --git a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py index 252c79e418d3..2601084c6fa4 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.routing_map_provider import _SmartRoutingMapProvider -from azure.cosmos.routing.routing_map_provider import _CollectionRoutingMap -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import SmartRoutingMapProvider +from azure.cosmos._routing.routing_map_provider import CollectionRoutingMap +from azure.cosmos._routing import routing_range as routing_range pytestmark = pytest.mark.cosmosEmulator @@ -43,27 +43,27 @@ def setUp(self): self.smart_routing_map_provider = self.instantiate_smart_routing_map_provider(self.partition_key_ranges) partitionRangeWithInfo = map(lambda r: (r, True), self.partition_key_ranges) - self.cached_collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + self.cached_collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') def instantiate_smart_routing_map_provider(self, partition_key_ranges): client = RoutingMapProviderTests.MockedCosmosClientConnection(partition_key_ranges) - return _SmartRoutingMapProvider(client) + return SmartRoutingMapProvider(client) def test_full_range(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) - pkRange = routing_range._Range("", "FF", False, False) + pkRange = routing_range.Range("", "FF", False, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) self.assertEqual(self.cached_collection_routing_map.get_overlapping_ranges([pkRange]), self.partition_key_ranges) def test_empty_ranges(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) @@ -73,17 +73,17 @@ def test_empty_ranges(self): self.assertEqual(len(overlapping_partition_key_ranges), 0) # validate the overlaping partition key ranges results for empty ranges is empty - empty_start_range = routing_range._Range("", "", False, True) - empty_end_range = routing_range._Range("FF", "FF", False, True) - empty_range = routing_range._Range("AA", "AA", False, True) + empty_start_range = routing_range.Range("", "", False, True) + empty_end_range = routing_range.Range("FF", "FF", False, True) + empty_range = routing_range.Range("AA", "AA", False, True) self.validate_empty_query_ranges([empty_range], [empty_start_range], [empty_end_range], [empty_start_range, empty_range], [empty_start_range, empty_end_range], [empty_range, empty_end_range], [empty_range, empty_range, empty_end_range]) def test_bad_overlapping_query_ranges(self): # they share AA point - r1 = routing_range._Range("", "AA", True, True) - r2 = routing_range._Range("AA", "FF", True, False) + r1 = routing_range.Range("", "AA", True, True) + r2 = routing_range.Range("AA", "FF", True, False) def func_one_point_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -91,16 +91,16 @@ def func_one_point_overlap(): self.assertRaises(ValueError, func_one_point_overlap) # overlapping range - r1 = routing_range._Range("", "AB", True, False) - r2 = routing_range._Range("AA", "FA", True, False) + r1 = routing_range.Range("", "AB", True, False) + r2 = routing_range.Range("AA", "FA", True, False) def func_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) self.assertRaises(ValueError, func_overlap) - r1 = routing_range._Range("AB", "AC", True, False) - r1 = routing_range._Range("AA", "AB", True, False) + r1 = routing_range.Range("AB", "AC", True, False) + r1 = routing_range.Range("AA", "AB", True, False) def func_non_sorted(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -108,31 +108,31 @@ def func_non_sorted(): self.assertRaises(ValueError, func_overlap) def test_empty_ranges_are_thrown_away(self): - e1 = routing_range._Range("", "", True, False) - r1 = routing_range._Range("", "AB", True, False) - e2 = routing_range._Range("AB", "AB", True, False) - r2 = routing_range._Range("AB", "AC", True, False) - e3 = routing_range._Range("AC", "AC", True, False) - e4 = routing_range._Range("AD", "AD", True, False) + e1 = routing_range.Range("", "", True, False) + r1 = routing_range.Range("", "AB", True, False) + e2 = routing_range.Range("AB", "AB", True, False) + r2 = routing_range.Range("AB", "AC", True, False) + e3 = routing_range.Range("AC", "AC", True, False) + e4 = routing_range.Range("AD", "AD", True, False) self.validate_overlapping_ranges_results([e1, r1, e2, r2, e3, e4], self.get_overlapping_ranges([r1, r2])) self.validate_against_cached_collection_results([e1, r1, e2, r2, e3, e4]) def test_simple(self): - r = routing_range._Range("AB", "AC", True, False) + r = routing_range.Range("AB", "AC", True, False) self.validate_against_cached_collection_results([r]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, False), - routing_range._Range("0000000045", "0000000046", True, False), - routing_range._Range("0000000046", "0000000050", True, False) + routing_range.Range("0000000040", "0000000045", True, False), + routing_range.Range("0000000045", "0000000046", True, False), + routing_range.Range("0000000046", "0000000050", True, False) ] self.validate_against_cached_collection_results(ranges) def test_simple_boundary(self): ranges = [ - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:2]) @@ -140,10 +140,10 @@ def test_simple_boundary(self): def test_two_adjacent_boundary(self): ranges = [ # self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), # self.partition_key_ranges[2] - routing_range._Range("05C1D9CD673398", "05C1D9CD673399", True, False), + routing_range.Range("05C1D9CD673398", "05C1D9CD673399", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:3]) @@ -151,8 +151,8 @@ def test_two_adjacent_boundary(self): def test_two_ranges_in_one_partition_key_range(self): # two ranges fall in the same partition key range ranges = [ - routing_range._Range("05C1C9CD673400", "05C1C9CD673401", True, False), - routing_range._Range("05C1C9CD673402", "05C1C9CD673403", True, False), + routing_range.Range("05C1C9CD673400", "05C1C9CD673401", True, False), + routing_range.Range("05C1C9CD673402", "05C1C9CD673403", True, False), ] self.validate_against_cached_collection_results(ranges) @@ -161,15 +161,15 @@ def test_two_ranges_in_one_partition_key_range(self): def test_complex(self): ranges = [ # all are covered by self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673391", True, False), - routing_range._Range("05C1D9CD673391", "05C1D9CD673392", True, False), - routing_range._Range("05C1D9CD673393", "05C1D9CD673395", True, False), - routing_range._Range("05C1D9CD673395", "05C1D9CD673395", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673391", True, False), + routing_range.Range("05C1D9CD673391", "05C1D9CD673392", True, False), + routing_range.Range("05C1D9CD673393", "05C1D9CD673395", True, False), + routing_range.Range("05C1D9CD673395", "05C1D9CD673395", True, False), # all are covered by self.partition_key_ranges[4]] - routing_range._Range("05C1E9CD673398", "05C1E9CD673401", True, False), - routing_range._Range("05C1E9CD673402", "05C1E9CD673403", True, False), + routing_range.Range("05C1E9CD673398", "05C1E9CD673401", True, False), + routing_range.Range("05C1E9CD673402", "05C1E9CD673403", True, False), # empty range - routing_range._Range("FF", "FF", True, False), + routing_range.Range("FF", "FF", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, [self.partition_key_ranges[1], self.partition_key_ranges[4]]) diff --git a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py index 48bbae7b173c..f2f396700be2 100644 --- a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py @@ -23,8 +23,8 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache +from azure.cosmos._routing import routing_range as routing_range import test_config pytestmark = pytest.mark.cosmosEmulator @@ -66,8 +66,8 @@ def test_read_partition_key_ranges(self): def test_routing_map_provider(self): partition_key_ranges = list(self.client.client_connection._ReadPartitionKeyRanges(self.collection_link)) - routing_mp = _PartitionKeyRangeCache(self.client.client_connection) - overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range._Range("", "FF", True, False)) + routing_mp = PartitionKeyRangeCache(self.client.client_connection) + overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range.Range("", "FF", True, False)) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, partition_key_ranges) diff --git a/sdk/cosmos/azure-cosmos/test/session_tests.py b/sdk/cosmos/azure-cosmos/test/session_tests.py index 03c28703615b..cdd0799dafd5 100644 --- a/sdk/cosmos/azure-cosmos/test/session_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_tests.py @@ -9,8 +9,8 @@ import test_config import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.synchronized_request as synchronized_request -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._synchronized_request as synchronized_request +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -62,8 +62,8 @@ def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): def test_clear_session_token(self): created_document = self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce try: self.created_collection.read_item(item=created_document['id'], partition_key='mypk') except errors.HTTPFailure as e: @@ -71,7 +71,7 @@ def test_clear_session_token(self): 'dbs/' + self.created_db.id + '/colls/' + self.created_collection.id), "") self.assertEqual(e.status_code, StatusCodes.NOT_FOUND) self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): response = {'_self':'dbs/90U1AA==/colls/90U1AJ4o6iA=/docs/90U1AJ4o6iABCT0AAAAABA==/', 'id':'1'} @@ -79,12 +79,12 @@ def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): return (response, headers) def test_internal_server_error_raised_for_invalid_session_token_received_from_server(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken try: self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) self.fail() except errors.HTTPFailure as e: self.assertEqual(e._http_error_message, "Could not parse the received session token: 2") self.assertEqual(e.status_code, StatusCodes.INTERNAL_SERVER_ERROR) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction diff --git a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py index ecdc2b1de238..76e9482ade4f 100644 --- a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -from azure.cosmos.vector_session_token import VectorSessionToken +from azure.cosmos._vector_session_token import VectorSessionToken from azure.cosmos.errors import CosmosError pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py index 4a594fed9e96..73ab656627b2 100644 --- a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py +++ b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py @@ -1,13 +1,13 @@ import unittest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -from azure.cosmos.request_object import _RequestObject -import azure.cosmos.global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos._request_object import RequestObject +import azure.cosmos._global_endpoint_manager as global_endpoint_manager import azure.cosmos.http_constants as http_constants pytestmark = pytest.mark.cosmosEmulator @@ -30,8 +30,8 @@ class TestStreamingFailover(unittest.TestCase): endpoint_sequence = [] def test_streaming_failover(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionEndpointDiscover + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionEndpointDiscover connection_policy = documents.ConnectionPolicy() connection_policy.PreferredLocations = self.preferred_regional_endpoints connection_policy.DisableSSLVerification = True @@ -62,7 +62,7 @@ def test_streaming_failover(self): self.assertEqual(self.endpoint_sequence[i], self.WRITE_ENDPOINT2) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def mock_get_database_account(self, url_connection = None): database_account = documents.DatabaseAccount() @@ -105,16 +105,16 @@ def test_retry_policy_does_not_mark_null_locations_unavailable(self): # these functions should not be called self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) diff --git a/sdk/cosmos/azure-cosmos/test/utils_tests.py b/sdk/cosmos/azure-cosmos/test/utils_tests.py index 0dc7d7b8315a..4349502fe854 100644 --- a/sdk/cosmos/azure-cosmos/test/utils_tests.py +++ b/sdk/cosmos/azure-cosmos/test/utils_tests.py @@ -21,7 +21,7 @@ import unittest import pytest -import azure.cosmos.utils as utils +import azure.cosmos._utils as _utils import platform import azure.cosmos.http_constants as http_constants @@ -33,7 +33,7 @@ class UtilsTests(unittest.TestCase): """ def test_user_agent(self): - user_agent = utils._get_user_agent() + user_agent = _utils.get_user_agent() expected_user_agent = "{}/{} Python/{} azure-cosmos/{}".format( platform.system(), platform.release(), platform.python_version(), From d3d96df297e159f6273cc55fee920d8e099fb768 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:17:51 -0700 Subject: [PATCH 11/32] Accept extension of JSON content-type (#6583) * Accept extension of JSON content-type * Adding text/something+json test * Support digit --- .../azure/core/pipeline/policies/universal.py | 9 ++++----- sdk/core/azure-core/tests/test_universal_pipeline.py | 12 ++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py index b9338950ff38..77ffd69c6a39 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -266,10 +266,9 @@ def on_response(self, request, response): class ContentDecodePolicy(SansIOHTTPPolicy): """Policy for decoding unstreamed response content. """ - JSON_MIMETYPES = [ - 'application/json', - 'text/json' # Because we're open minded people... - ] + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r'^(application|text)/([0-9a-z+.]+\+)?json$') + # Name used in context CONTEXT_NAME = "deserialized_data" @@ -301,7 +300,7 @@ def deserialize_from_text(cls, response, content_type=None): if content_type is None: return data - if content_type in cls.JSON_MIMETYPES: + if cls.JSON_REGEXP.match(content_type): try: return json.loads(data_as_str) except ValueError as err: diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index cc783b0d4c74..035a462d388a 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -160,6 +160,18 @@ def body(self): result = response.context["deserialized_data"] assert result["success"] is True + # Simple JSON with complex content_type + response = build_response(b'{"success": true}', content_type="application/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + + # Simple JSON with complex content_type, v2 + response = build_response(b'{"success": true}', content_type="text/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + # For compat, if no content-type, decode JSON response = build_response(b'"data"') raw_deserializer.on_response(None, response) From d2ed7d87997eac9b715ee9802c15349a12446b84 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 12/32] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +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 .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +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 ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.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 .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.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 ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +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 .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.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 DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +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 .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.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 DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.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 DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.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 DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.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 DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.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 DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.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 enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +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 FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.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 FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.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 Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.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 Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__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 .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +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.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - '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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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 self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/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 = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/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 -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB 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'), '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.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@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.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 92583cf40198031ad069646d5478965e108b7a3b Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 13/32] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.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 .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.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. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.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 msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.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. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.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 msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__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 .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + '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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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 self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.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. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/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 +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB 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'), '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.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@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.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 1d86ae8fd13752de13fe43e2db05ad57eb64093b Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 18:04:30 -0700 Subject: [PATCH 14/32] azure-core black/pylint/mypy (#6581) * Pylint/black happyness * mypy * Fix exceptiont tests * bad-continuation ignroe by defulat --- pylintrc | 3 ++- sdk/core/azure-core/azure/core/async_paging.py | 7 +++++-- sdk/core/azure-core/azure/core/exceptions.py | 8 ++++---- sdk/core/azure-core/azure/core/paging.py | 4 ++-- sdk/core/azure-core/azure/core/pipeline/__init__.py | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pylintrc b/pylintrc index 1547d565944f..b1b9d2d5e29e 100644 --- a/pylintrc +++ b/pylintrc @@ -7,7 +7,8 @@ reports=no # locally-disabled: Warning locally suppressed using disable-msg # cyclic-import: because of https://github.com/PyCQA/pylint/issues/850 # too-many-arguments: Due to the nature of the CLI many commands have large arguments set which reflect in large arguments set in corresponding methods. -disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods +# Let's black deal with bad-continuation +disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods,bad-continuation [FORMAT] max-line-length=120 diff --git a/sdk/core/azure-core/azure/core/async_paging.py b/sdk/core/azure-core/azure/core/async_paging.py index 8a61c5b00ddc..e013f41df7ee 100644 --- a/sdk/core/azure-core/azure/core/async_paging.py +++ b/sdk/core/azure-core/azure/core/async_paging.py @@ -64,7 +64,9 @@ async def __anext__(self) -> ReturnType: class AsyncPageIterator(AsyncIterator[AsyncIterator[ReturnType]]): def __init__( self, - get_next: Callable[[Optional[str]], Awaitable[ResponseType]], + get_next: Callable[ + [Optional[str]], Awaitable[ResponseType] + ], extract_data: Callable[ [ResponseType], Awaitable[Tuple[str, AsyncIterator[ReturnType]]] ], @@ -120,7 +122,8 @@ def __init__(self, *args, **kwargs) -> None: ) def by_page( - self, continuation_token: Optional[str] = None + self, + continuation_token: Optional[str] = None, ) -> AsyncIterator[AsyncIterator[ReturnType]]: """Get an async iterator of pages of objects, instead of an async iterator of objects. diff --git a/sdk/core/azure-core/azure/core/exceptions.py b/sdk/core/azure-core/azure/core/exceptions.py index b69912108a40..da90c32bdd4c 100644 --- a/sdk/core/azure-core/azure/core/exceptions.py +++ b/sdk/core/azure-core/azure/core/exceptions.py @@ -28,7 +28,7 @@ import logging import sys -from typing import Callable, Any, Dict, Optional, TYPE_CHECKING +from typing import Callable, Any, Dict, Optional, List, Union, TYPE_CHECKING _LOGGER = logging.getLogger(__name__) @@ -237,10 +237,10 @@ class ODataV4Error(HttpResponseError): _ERROR_FORMAT = ODataV4Format def __init__(self, response, **kwargs): - # type: (_HttpResponseBase, Dict[str, Any]) -> None + # type: (_HttpResponseBase, Any) -> None # Ensure field are declared, whatever can happen afterwards - self.odata_json = None # type: Optional[dict[str, Any]] + self.odata_json = None # type: Optional[Dict[str, Any]] try: self.odata_json = json.loads(response.text()) odata_message = self.odata_json.setdefault("error", {}).get("message") @@ -259,7 +259,7 @@ def __init__(self, response, **kwargs): super(ODataV4Error, self).__init__(response=response, **kwargs) - self._error_format = None + self._error_format = None # type: Optional[Union[str, ODataV4Format]] if self.odata_json: try: error_node = self.odata_json["error"] diff --git a/sdk/core/azure-core/azure/core/paging.py b/sdk/core/azure-core/azure/core/paging.py index 9f4089d02099..ca00c81cc356 100644 --- a/sdk/core/azure-core/azure/core/paging.py +++ b/sdk/core/azure-core/azure/core/paging.py @@ -24,14 +24,14 @@ # # -------------------------------------------------------------------------- import itertools -from typing import ( +from typing import ( # pylint: disable=unused-import Callable, Optional, TypeVar, Iterator, Iterable, Tuple, -) # pylint: disable=unused-import +) import logging diff --git a/sdk/core/azure-core/azure/core/pipeline/__init__.py b/sdk/core/azure-core/azure/core/pipeline/__init__.py index 2df1fbfea898..a4dad249a355 100644 --- a/sdk/core/azure-core/azure/core/pipeline/__init__.py +++ b/sdk/core/azure-core/azure/core/pipeline/__init__.py @@ -109,7 +109,7 @@ class PipelineRequest(object): :type context: ~azure.core.pipeline.PipelineContext """ def __init__(self, http_request, context): - # type: (HTTPRequestType, Optional[Any]) -> None + # type: (HTTPRequestType, PipelineContext) -> None self.http_request = http_request self.context = context From a08c25a79b42b123b7447d67d02d2ce2485ff14c Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Wed, 31 Jul 2019 18:15:13 -0700 Subject: [PATCH 15/32] adjusting to allow default omission of packages for CI. (#6595) --- scripts/devops_tasks/common_tasks.py | 16 +++++++++++++++- scripts/devops_tasks/setup_execute_tests.py | 2 -- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/scripts/devops_tasks/common_tasks.py b/scripts/devops_tasks/common_tasks.py index d797cc7f7f0c..f2840c951a9d 100644 --- a/scripts/devops_tasks/common_tasks.py +++ b/scripts/devops_tasks/common_tasks.py @@ -15,6 +15,7 @@ import sys DEFAULT_BUILD_PACKAGES = ['azure-keyvault', 'azure-servicebus'] +OMITTED_CI_PACKAGES = ['azure-mgmt-documentdb'] # this function is where a glob string gets translated to a list of packages # It is called by both BUILD (package) and TEST. In the future, this function will be the central location @@ -31,7 +32,20 @@ def process_glob_string(glob_string, target_root_dir): collected_top_level_directories.extend([os.path.dirname(p) for p in globbed]) # dedup, in case we have double coverage from the glob strings. Example: "azure-mgmt-keyvault,azure-mgmt-*" - return list(set(collected_top_level_directories)) + collected_directories = list(set(collected_top_level_directories)) + + # if we have individually queued this specific package, it's obvious that we want to build it specifically + # in this case, do not honor the omission list + if len(collected_directories) == 1: + return collected_directories + # however, if there are multiple packages being built, we should honor the omission list and NOT build the omitted + # packages + else : + return remove_omitted_packages(collected_directories) + +def remove_omitted_packages(collected_directories): + return [package_dir for package_dir in collected_directories if os.path.basename(package_dir) not in OMITTED_CI_PACKAGES] + def run_check_call(command_array, working_directory, acceptable_return_codes = [], run_as_shell = False): try: diff --git a/scripts/devops_tasks/setup_execute_tests.py b/scripts/devops_tasks/setup_execute_tests.py index 911d3a8d1a19..197020c65638 100644 --- a/scripts/devops_tasks/setup_execute_tests.py +++ b/scripts/devops_tasks/setup_execute_tests.py @@ -95,8 +95,6 @@ def run_tests(targeted_packages, python_version, test_res): else: target_dir = root_dir - print(args.glob_string); - targeted_packages = process_glob_string(args.glob_string, target_dir) test_results_arg = [] if args.test_results: From b0bd4372568d0e72b40a63cefdfde8f1a6d53ba0 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Wed, 31 Jul 2019 19:44:58 -0700 Subject: [PATCH 16/32] Synchronous device code credential (#6464) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 1 + .../identity/_internal/exception_wrapper.py | 25 +++++ .../identity/_internal/msal_credentials.py | 2 + .../azure/identity/browser_auth.py | 3 +- .../azure/identity/credentials.py | 91 ++++++++++++++++++- sdk/identity/azure-identity/setup.py | 2 +- .../azure-identity/tests/test_identity.py | 69 ++++++++++++-- .../tests/test_identity_async.py | 6 -- 9 files changed, 182 insertions(+), 19 deletions(-) create mode 100644 sdk/identity/azure-identity/azure/identity/_internal/exception_wrapper.py diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index 1df14dd617f5..5a9ccc7aad36 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -7,6 +7,7 @@ CertificateCredential, ChainedTokenCredential, ClientSecretCredential, + DeviceCodeCredential, EnvironmentCredential, ManagedIdentityCredential, UsernamePasswordCredential, @@ -35,6 +36,7 @@ def __init__(self, **kwargs): "ChainedTokenCredential", "ClientSecretCredential", "DefaultAzureCredential", + "DeviceCodeCredential", "EnvironmentCredential", "InteractiveBrowserCredential", "ManagedIdentityCredential", diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..dccfb9cf7e42 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -3,5 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from .auth_code_redirect_handler import AuthCodeRedirectServer +from .exception_wrapper import wrap_exceptions from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/azure/identity/_internal/exception_wrapper.py b/sdk/identity/azure-identity/azure/identity/_internal/exception_wrapper.py new file mode 100644 index 000000000000..2eca1e0a25ad --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_internal/exception_wrapper.py @@ -0,0 +1,25 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import functools + +from six import raise_from + +from azure.core.exceptions import ClientAuthenticationError + + +def wrap_exceptions(fn): + """Prevents leaking exceptions defined outside azure-core by raising ClientAuthenticationError from them.""" + + @functools.wraps(fn) + def wrapper(*args, **kwargs): + try: + return fn(*args, **kwargs) + except ClientAuthenticationError: + raise + except Exception as ex: + auth_error = ClientAuthenticationError(message="Authentication failed: {}".format(ex)) + raise_from(auth_error, ex) + + return wrapper 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 83906bf71c2e..165d7328d800 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py @@ -12,6 +12,7 @@ from azure.core.credentials import AccessToken from azure.core.exceptions import ClientAuthenticationError +from .exception_wrapper import wrap_exceptions from .msal_transport_adapter import MsalTransportAdapter try: @@ -75,6 +76,7 @@ def _create_app(self, cls): class ConfidentialClientCredential(MsalCredential): """Wraps an MSAL ConfidentialClientApplication with the TokenCredential API""" + @wrap_exceptions def get_token(self, *scopes): # type: (str) -> AccessToken diff --git a/sdk/identity/azure-identity/azure/identity/browser_auth.py b/sdk/identity/azure-identity/azure/identity/browser_auth.py index 82460513092d..921d70e635f2 100644 --- a/sdk/identity/azure-identity/azure/identity/browser_auth.py +++ b/sdk/identity/azure-identity/azure/identity/browser_auth.py @@ -18,7 +18,7 @@ from azure.core.credentials import AccessToken from azure.core.exceptions import ClientAuthenticationError -from ._internal import AuthCodeRedirectServer, ConfidentialClientCredential +from ._internal import AuthCodeRedirectServer, ConfidentialClientCredential, wrap_exceptions class InteractiveBrowserCredential(ConfidentialClientCredential): @@ -48,6 +48,7 @@ def __init__(self, client_id, client_secret, **kwargs): client_id=client_id, client_credential=client_secret, authority=authority, **kwargs ) + @wrap_exceptions def get_token(self, *scopes): # type: (str) -> AccessToken """ diff --git a/sdk/identity/azure-identity/azure/identity/credentials.py b/sdk/identity/azure-identity/azure/identity/credentials.py index 2e09a306aa71..5c96c0bf4dbc 100644 --- a/sdk/identity/azure-identity/azure/identity/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/credentials.py @@ -15,7 +15,7 @@ from ._authn_client import AuthnClient from ._base import ClientSecretCredentialBase, CertificateCredentialBase -from ._internal import PublicClientCredential +from ._internal import PublicClientCredential, wrap_exceptions from ._managed_identity import ImdsCredential, MsiCredential from .constants import Endpoints, EnvironmentVariables @@ -26,8 +26,9 @@ if TYPE_CHECKING: # pylint:disable=unused-import - from typing import Any, Dict, Mapping, Optional, Union + from typing import Any, Callable, Dict, Mapping, Optional, Union from azure.core.credentials import TokenCredential + EnvironmentCredentialTypes = Union["CertificateCredential", "ClientSecretCredential", "UsernamePasswordCredential"] # pylint:disable=too-few-public-methods @@ -249,6 +250,86 @@ def _get_error_message(history): return "No valid token received. {}".format(". ".join(attempts)) +class DeviceCodeCredential(PublicClientCredential): + """ + Authenticates users through the device code flow. When ``get_token`` is called, this credential acquires a + verification URL and code from Azure Active Directory. A user must browse to the URL, enter the code, and + authenticate with Directory. If the user authenticates successfully, the credential receives an access token. + + This credential doesn't cache tokens--each ``get_token`` call begins a new authentication flow. + + For more information about the device code flow, see Azure Active Directory documentation: + https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code + + :param str client_id: the application's ID + :param prompt_callback: (optional) A callback enabling control of how authentication instructions are presented. + If not provided, the credential will print instructions to stdout. + :type prompt_callback: A callable accepting arguments (``verification_uri``, ``user_code``, ``expires_in``): + - ``verification_uri`` (str) the URL the user must visit + - ``user_code`` (str) the code the user must enter there + - ``expires_in`` (int) the number of seconds the code will be valid + + **Keyword arguments:** + + - *tenant (str)* - tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant, which supports only Azure Active Directory work or school accounts. + + - *timeout (int)* - seconds to wait for the user to authenticate. Defaults to the validity period of the device code + as set by Azure Active Directory, which also prevails when ``timeout`` is longer. + + """ + + def __init__(self, client_id, prompt_callback=None, **kwargs): + # type: (str, Optional[Callable[[str, str], None]], Any) -> None + self._timeout = kwargs.pop("timeout", None) # type: Optional[int] + self._prompt_callback = prompt_callback + super(DeviceCodeCredential, self).__init__(client_id=client_id, **kwargs) + + @wrap_exceptions + def get_token(self, *scopes): + # type (*str) -> AccessToken + """ + Request an access token for `scopes`. This credential won't cache the token. Each call begins a new + authentication flow. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # MSAL requires scopes be a list + scopes = list(scopes) # type: ignore + now = int(time.time()) + + app = self._get_app() + flow = app.initiate_device_flow(scopes) + if "error" in flow: + raise ClientAuthenticationError( + message="Couldn't begin authentication: {}".format(flow.get("error_description") or flow.get("error")) + ) + + if self._prompt_callback: + self._prompt_callback(flow["verification_uri"], flow["user_code"], flow["expires_in"]) + else: + print(flow["message"]) + + if self._timeout is not None and self._timeout < flow["expires_in"]: + deadline = now + self._timeout + result = app.acquire_token_by_device_flow(flow, exit_condition=lambda flow: time.time() > deadline) + else: + result = app.acquire_token_by_device_flow(flow) + + if "access_token" not in result: + if result.get("error") == "authorization_pending": + message = "Timed out waiting for user to authenticate" + else: + message = "Authentication failed: {}".format(result.get("error_description") or result.get("error")) + raise ClientAuthenticationError(message=message) + + token = AccessToken(result["access_token"], now + int(result["expires_in"])) + return token + + class UsernamePasswordCredential(PublicClientCredential): """ Authenticates a user with a username and password. In general, Microsoft doesn't recommend this kind of @@ -267,8 +348,9 @@ class UsernamePasswordCredential(PublicClientCredential): **Keyword arguments:** - *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the - 'organizations' tenant. + - **tenant (str)** - a tenant ID or a domain associated with a tenant. If not provided, defaults to the + 'organizations' tenant. + """ def __init__(self, client_id, username, password, **kwargs): @@ -277,6 +359,7 @@ def __init__(self, client_id, username, password, **kwargs): self._username = username self._password = password + @wrap_exceptions def get_token(self, *scopes): # type (*str) -> AccessToken """ diff --git a/sdk/identity/azure-identity/setup.py b/sdk/identity/azure-identity/setup.py index ac671fd6e283..783ef669f72a 100644 --- a/sdk/identity/azure-identity/setup.py +++ b/sdk/identity/azure-identity/setup.py @@ -69,6 +69,6 @@ "azure", ] ), - install_requires=["azure-core<2.0.0,>=1.0.0b1", "cryptography>=2.1.4", "msal~=0.4.1"], + install_requires=["azure-core<2.0.0,>=1.0.0b1", "cryptography>=2.1.4", "msal~=0.4.1", "six>=1.6"], extras_require={":python_version<'3.0'": ["azure-nspkg"], ":python_version<'3.5'": ["typing"]}, ) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..e3cfc64544c0 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -13,20 +13,21 @@ except ImportError: # python < 3.3 from mock import Mock, patch -import pytest from azure.core.credentials import AccessToken from azure.core.exceptions import ClientAuthenticationError from azure.identity import ( + ChainedTokenCredential, ClientSecretCredential, DefaultAzureCredential, + DeviceCodeCredential, EnvironmentCredential, ManagedIdentityCredential, - ChainedTokenCredential, InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential from azure.identity.constants import EnvironmentVariables +import pytest from helpers import mock_response, Request, validating_transport @@ -123,11 +124,6 @@ def test_client_secret_environment_credential(monkeypatch): assert token.token == access_token -def test_environment_credential_error(): - with pytest.raises(ClientAuthenticationError): - EnvironmentCredential().get_token("scope") - - def test_credential_chain_error_message(): def raise_authn_error(message): raise ClientAuthenticationError(message) @@ -244,6 +240,65 @@ def test_default_credential(): DefaultAzureCredential() +def test_device_code_credential(): + expected_token = "access-token" + user_code = "user-code" + verification_uri = "verification-uri" + expires_in = 42 + + transport = validating_transport( + requests=[Request()] * 3, # not validating requests because they're formed by MSAL + responses=[ + # expected requests: discover tenant, start device code flow, poll for completion + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={"device_code": "_", "user_code": user_code, "verification_uri": verification_uri, "expires_in": expires_in} + ), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": expires_in, + "scope": "scope", + "token_type": "Bearer", + "refresh_token": "_", + } + ), + ], + ) + + callback = Mock() + credential = DeviceCodeCredential( + client_id="_", prompt_callback=callback, transport=transport, instance_discovery=False + ) + + token = credential.get_token("scope") + assert token.token == expected_token + + # prompt_callback should have been called as documented + assert callback.call_count == 1 + assert callback.call_args[0] == (verification_uri, user_code, expires_in) + + +def test_device_code_credential_timeout(): + transport = validating_transport( + requests=[Request()] * 3, # not validating requests because they're formed by MSAL + responses=[ + # expected requests: discover tenant, start device code flow, poll for completion + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response(json_payload={"device_code": "_", "user_code": "_", "verification_uri": "_"}), + mock_response(json_payload={"error": "authorization_pending"}), + ], + ) + + credential = DeviceCodeCredential( + client_id="_", prompt_callback=Mock(), transport=transport, timeout=0.1, instance_discovery=False + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + @patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser def test_interactive_credential(): oauth_state = "state" diff --git a/sdk/identity/azure-identity/tests/test_identity_async.py b/sdk/identity/azure-identity/tests/test_identity_async.py index 03b53db9eccd..06254dc898ba 100644 --- a/sdk/identity/azure-identity/tests/test_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_identity_async.py @@ -121,12 +121,6 @@ async def test_client_secret_environment_credential(monkeypatch): assert token.token == access_token -@pytest.mark.asyncio -async def test_environment_credential_error(): - with pytest.raises(ClientAuthenticationError): - await EnvironmentCredential().get_token("scope") - - @pytest.mark.asyncio async def test_credential_chain_error_message(): def raise_authn_error(message): From f700299c45cea44064d5156f2bfe3664284f6da4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 1 Aug 2019 00:13:11 -0700 Subject: [PATCH 17/32] [AutoPR alertsmanagement/resource-manager] fixing subscription id issue (#6574) * Generated from d6b1b67df4f4ddc0b8cb16095d1dd51305a078a5 fix subscriptionId * Generated from 10bf6ed3f7f87035d0c08c83742eba0a39602b39 undone reference change * added changelog, upgraded to rc2 * fixed code generation issues --- .../azure-mgmt-alertsmanagement/HISTORY.rst | 7 +++++++ .../alertsmanagement/_alerts_management_client.py | 10 +++------- .../azure/mgmt/alertsmanagement/_configuration.py | 11 ++--------- .../operations/_action_rules_operations.py | 12 ++++++------ .../operations/_alerts_operations.py | 10 +++++----- .../_smart_detector_alert_rules_operations.py | 12 ++++++------ .../operations/_smart_groups_operations.py | 8 ++++---- .../azure/mgmt/alertsmanagement/version.py | 2 +- 8 files changed, 34 insertions(+), 38 deletions(-) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst index 145999b84643..7e43b30a8b10 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst @@ -3,6 +3,13 @@ Release History =============== +0.2.0rc2 (2019-07-31) ++++++++++++++++++++++ + +**Bugfix** + +- Fixed autogenerated code problems + 0.2.0rc1 (2019-07-29) +++++++++++++++++++++ diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py index dea82c97209f..af7ad075b8c6 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py @@ -41,19 +41,15 @@ class AlertsManagementClient(SDKClient): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param subscription_id1: The Azure subscription id. - :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, subscription_id1, base_url=None): + self, credentials, subscription_id, base_url=None): - self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url) + self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url) super(AlertsManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py index cc778d8d1c6d..c42d0ce4b9cf 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py @@ -21,24 +21,18 @@ class AlertsManagementClientConfiguration(AzureConfiguration): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param subscription_id1: The Azure subscription id. - :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, subscription_id1, base_url=None): + self, credentials, subscription_id, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if subscription_id1 is None: - raise ValueError("Parameter 'subscription_id1' must not be None.") if not base_url: base_url = 'https://management.azure.com' @@ -52,4 +46,3 @@ def __init__( self.credentials = credentials self.subscription_id = subscription_id - self.subscription_id1 = subscription_id1 diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py index 4b988fecc8a6..d07e0fd19b74 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py @@ -93,7 +93,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -217,7 +217,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -309,7 +309,7 @@ def get_by_name( # Construct URL url = self.get_by_name.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') } @@ -380,7 +380,7 @@ def create_update( # Construct URL url = self.create_update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') } @@ -451,7 +451,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') } @@ -527,7 +527,7 @@ def update( # Construct URL url = self.update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') } diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py index 7d0a9fa6d063..da6c76c07ff5 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py @@ -191,7 +191,7 @@ def prepare_request(next_link=None): # Construct URL url = self.get_all.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -292,7 +292,7 @@ def get_by_id( # Construct URL url = self.get_by_id.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'alertId': self._serialize.url("alert_id", alert_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -352,7 +352,7 @@ def change_state( # Construct URL url = self.change_state.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'alertId': self._serialize.url("alert_id", alert_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -412,7 +412,7 @@ def get_history( # Construct URL url = self.get_history.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'alertId': self._serialize.url("alert_id", alert_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -522,7 +522,7 @@ def get_summary( # Construct URL url = self.get_summary.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py index 2cc0b1152ea4..8119e32986ff 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py @@ -62,7 +62,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -135,7 +135,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -208,7 +208,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') } @@ -272,7 +272,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') } @@ -341,7 +341,7 @@ def patch( # Construct URL url = self.patch.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') } @@ -404,7 +404,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') } diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py index bd4c0cfce5c1..c797322bad46 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py @@ -109,7 +109,7 @@ def prepare_request(next_link=None): # Construct URL url = self.get_all.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -198,7 +198,7 @@ def get_by_id( # Construct URL url = self.get_by_id.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -263,7 +263,7 @@ def change_state( # Construct URL url = self.change_state.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -327,7 +327,7 @@ def get_history( # Construct URL url = self.get_history.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py index fda99682a9d1..ab536c887f87 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0rc1" +VERSION = "0.2.0rc2" From 64b121ca8ec2a22f3d7d6c1ab01490e9f146dbe3 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Thu, 1 Aug 2019 08:52:38 -0700 Subject: [PATCH 18/32] Remove Configuration from public API (#6603) --- .../azure/identity/_authn_client.py | 4 +- .../_internal/msal_transport_adapter.py | 4 +- .../azure/identity/_managed_identity.py | 4 +- .../azure/identity/aio/_authn_client.py | 4 +- .../azure/identity/aio/_managed_identity.py | 4 +- .../azure/identity/aio/credentials.py | 39 +++---------------- .../azure/identity/credentials.py | 32 ++++----------- .../azure-identity/tests/test_identity.py | 2 +- .../tests/test_identity_async.py | 2 +- 9 files changed, 25 insertions(+), 70 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_authn_client.py b/sdk/identity/azure-identity/azure/identity/_authn_client.py index 09fc166d917e..65f61f090ccd 100644 --- a/sdk/identity/azure-identity/azure/identity/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/_authn_client.py @@ -119,7 +119,7 @@ class AuthnClient(AuthnClientBase): def __init__(self, auth_url, config=None, policies=None, transport=None, **kwargs): # type: (str, Optional[Configuration], Optional[Iterable[HTTPPolicy]], Optional[HttpTransport], Mapping[str, Any]) -> None - config = config or self.create_config(**kwargs) + config = config or self._create_config(**kwargs) policies = policies or [ContentDecodePolicy(), config.retry_policy, config.logging_policy, DistributedTracingPolicy()] if not transport: transport = RequestsTransport(**kwargs) @@ -135,7 +135,7 @@ def request_token(self, scopes, method="POST", headers=None, form_data=None, par return token @staticmethod - def create_config(**kwargs): + def _create_config(**kwargs): # type: (Mapping[str, Any]) -> Configuration config = Configuration(**kwargs) config.logging_policy = NetworkTraceLoggingPolicy(**kwargs) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/msal_transport_adapter.py b/sdk/identity/azure-identity/azure/identity/_internal/msal_transport_adapter.py index adcd12a33f09..8cdc72a4193c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/msal_transport_adapter.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/msal_transport_adapter.py @@ -50,7 +50,7 @@ def __init__(self, **kwargs): self._pipeline = self._build_pipeline(**kwargs) @staticmethod - def create_config(**kwargs): + def _create_config(**kwargs): # type: (Any) -> Configuration config = Configuration(**kwargs) config.logging_policy = NetworkTraceLoggingPolicy(**kwargs) @@ -58,7 +58,7 @@ def create_config(**kwargs): return config def _build_pipeline(self, config=None, policies=None, transport=None, **kwargs): - config = config or self.create_config(**kwargs) + config = config or self._create_config(**kwargs) policies = policies or [ContentDecodePolicy(), config.retry_policy, config.logging_policy] if not transport: transport = RequestsTransport(**kwargs) diff --git a/sdk/identity/azure-identity/azure/identity/_managed_identity.py b/sdk/identity/azure-identity/azure/identity/_managed_identity.py index 65fc42479101..9c3c0cd7d982 100644 --- a/sdk/identity/azure-identity/azure/identity/_managed_identity.py +++ b/sdk/identity/azure-identity/azure/identity/_managed_identity.py @@ -28,12 +28,12 @@ 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._client_id = client_id - config = config or self.create_config(**kwargs) + config = config or self._create_config(**kwargs) policies = [ContentDecodePolicy(), config.headers_policy, config.retry_policy, config.logging_policy] self._client = client_cls(endpoint, config, policies, **kwargs) @staticmethod - def create_config(**kwargs): + def _create_config(**kwargs): # type: (Mapping[str, Any]) -> Configuration """ Build a default configuration for the credential's HTTP pipeline. diff --git a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py index 4d75cd07b1a3..9c3e6c7bbc1f 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py @@ -27,7 +27,7 @@ def __init__( transport: Optional[AsyncHttpTransport] = None, **kwargs: Mapping[str, Any] ) -> None: - config = config or self.create_config(**kwargs) + config = config or self._create_config(**kwargs) policies = policies or [ ContentDecodePolicy(), config.retry_policy, @@ -55,7 +55,7 @@ async def request_token( return token @staticmethod - def create_config(**kwargs: Mapping[str, Any]) -> Configuration: + def _create_config(**kwargs: Mapping[str, Any]) -> Configuration: config = Configuration(**kwargs) config.logging_policy = NetworkTraceLoggingPolicy(**kwargs) config.retry_policy = AsyncRetryPolicy(**kwargs) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_managed_identity.py b/sdk/identity/azure-identity/azure/identity/aio/_managed_identity.py index ec698b52c98b..9d8eeb46a67c 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_managed_identity.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_managed_identity.py @@ -20,13 +20,13 @@ def __init__(self, endpoint: str, config: Optional[Configuration] = None, **kwar super().__init__(endpoint=endpoint, config=config, client_cls=AsyncAuthnClient, **kwargs) @staticmethod - def create_config(**kwargs: Any) -> Configuration: # type: ignore + def _create_config(**kwargs: Any) -> Configuration: # type: ignore """ Build a default configuration for the credential's HTTP pipeline. :rtype: :class:`azure.core.configuration` """ - return _ManagedIdentityBase.create_config(retry_policy=AsyncRetryPolicy, **kwargs) + return _ManagedIdentityBase._create_config(retry_policy=AsyncRetryPolicy, **kwargs) class ImdsCredential(_AsyncManagedIdentityBase): diff --git a/sdk/identity/azure-identity/azure/identity/aio/credentials.py b/sdk/identity/azure-identity/azure/identity/aio/credentials.py index c43dc917e518..fd80e2bc1051 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/aio/credentials.py @@ -29,20 +29,11 @@ class ClientSecretCredential(ClientSecretCredentialBase): :param str client_id: the service principal's client ID :param str secret: one of the service principal's client secrets :param str tenant_id: ID of the service principal's tenant. Also called its 'directory' ID. - :param config: optional configuration for the underlying HTTP pipeline - :type config: :class:`azure.core.configuration` """ - def __init__( - self, - client_id: str, - secret: str, - tenant_id: str, - config: Optional[Configuration] = None, - **kwargs: Mapping[str, Any] - ) -> None: + def __init__(self, client_id: str, secret: str, tenant_id: str, **kwargs: Mapping[str, Any]) -> None: super(ClientSecretCredential, self).__init__(client_id, secret, tenant_id, **kwargs) - self._client = AsyncAuthnClient(Endpoints.AAD_OAUTH2_V2_FORMAT.format(tenant_id), config, **kwargs) + self._client = AsyncAuthnClient(Endpoints.AAD_OAUTH2_V2_FORMAT.format(tenant_id), **kwargs) async def get_token(self, *scopes: str) -> AccessToken: """ @@ -66,20 +57,11 @@ class CertificateCredential(CertificateCredentialBase): :param str client_id: the service principal's client ID :param str tenant_id: ID of the service principal's tenant. Also called its 'directory' ID. :param str certificate_path: path to a PEM-encoded certificate file including the private key - :param config: optional configuration for the underlying HTTP pipeline - :type config: :class:`azure.core.configuration` """ - def __init__( - self, - client_id: str, - tenant_id: str, - certificate_path: str, - config: Optional[Configuration] = None, - **kwargs: Mapping[str, Any] - ) -> None: + def __init__(self, client_id: str, tenant_id: str, certificate_path: str, **kwargs: Mapping[str, Any]) -> None: super(CertificateCredential, self).__init__(client_id, tenant_id, certificate_path, **kwargs) - self._client = AsyncAuthnClient(Endpoints.AAD_OAUTH2_V2_FORMAT.format(tenant_id), config, **kwargs) + self._client = AsyncAuthnClient(Endpoints.AAD_OAUTH2_V2_FORMAT.format(tenant_id), **kwargs) async def get_token(self, *scopes: str) -> AccessToken: """ @@ -151,8 +133,6 @@ class ManagedIdentityCredential(object): Authenticates with a managed identity in an App Service, Azure VM or Cloud Shell environment. :param str client_id: Optional client ID of a user-assigned identity. Leave unspecified to use a system-assigned identity. - :param config: optional configuration for the underlying HTTP pipeline - :type config: :class:`azure.core.configuration` """ def __new__(cls, *args, **kwargs): @@ -162,18 +142,9 @@ def __new__(cls, *args, **kwargs): # the below methods are never called, because ManagedIdentityCredential can't be instantiated; # they exist so tooling gets accurate signatures for Imds- and MsiCredential - def __init__(self, client_id: Optional[str] = None, config: Optional[Configuration] = None, **kwargs: Any) -> None: + def __init__(self, client_id: Optional[str] = None, **kwargs: Any) -> None: pass - @staticmethod - def create_config(**kwargs: Dict[str, Any]) -> Configuration: - """ - Build a default configuration for the credential's HTTP pipeline. - - :rtype: :class:`azure.core.configuration` - """ - return Configuration(**kwargs) - async def get_token(self, *scopes: str) -> AccessToken: """ Asynchronously request an access token for `scopes`. diff --git a/sdk/identity/azure-identity/azure/identity/credentials.py b/sdk/identity/azure-identity/azure/identity/credentials.py index 5c96c0bf4dbc..2465198c53ac 100644 --- a/sdk/identity/azure-identity/azure/identity/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/credentials.py @@ -41,14 +41,12 @@ class ClientSecretCredential(ClientSecretCredentialBase): :param str client_id: the service principal's client ID :param str secret: one of the service principal's client secrets :param str tenant_id: ID of the service principal's tenant. Also called its 'directory' ID. - :param config: optional configuration for the underlying HTTP pipeline - :type config: :class:`azure.core.configuration` """ - def __init__(self, client_id, secret, tenant_id, config=None, **kwargs): - # type: (str, str, str, Optional[Configuration], Mapping[str, Any]) -> None + def __init__(self, client_id, secret, tenant_id, **kwargs): + # type: (str, str, str, Mapping[str, Any]) -> None super(ClientSecretCredential, self).__init__(client_id, secret, tenant_id, **kwargs) - self._client = AuthnClient(Endpoints.AAD_OAUTH2_V2_FORMAT.format(tenant_id), config, **kwargs) + self._client = AuthnClient(Endpoints.AAD_OAUTH2_V2_FORMAT.format(tenant_id), **kwargs) def get_token(self, *scopes): # type (*str) -> AccessToken @@ -73,13 +71,11 @@ class CertificateCredential(CertificateCredentialBase): :param str client_id: the service principal's client ID :param str tenant_id: ID of the service principal's tenant. Also called its 'directory' ID. :param str certificate_path: path to a PEM-encoded certificate file including the private key - :param config: optional configuration for the underlying HTTP pipeline - :type config: :class:`azure.core.configuration` """ - def __init__(self, client_id, tenant_id, certificate_path, config=None, **kwargs): - # type: (str, str, str, Optional[Configuration], Mapping[str, Any]) -> None - self._client = AuthnClient(Endpoints.AAD_OAUTH2_V2_FORMAT.format(tenant_id), config, **kwargs) + def __init__(self, client_id, tenant_id, certificate_path, **kwargs): + # type: (str, str, str, Mapping[str, Any]) -> None + self._client = AuthnClient(Endpoints.AAD_OAUTH2_V2_FORMAT.format(tenant_id), **kwargs) super(CertificateCredential, self).__init__(client_id, tenant_id, certificate_path, **kwargs) def get_token(self, *scopes): @@ -166,8 +162,6 @@ class ManagedIdentityCredential(object): Authenticates with a managed identity in an App Service, Azure VM or Cloud Shell environment. :param str client_id: Optional client ID of a user-assigned identity. Leave unspecified to use a system-assigned identity. - :param config: optional configuration for the underlying HTTP pipeline - :type config: :class:`azure.core.configuration` """ def __new__(cls, *args, **kwargs): @@ -177,20 +171,10 @@ def __new__(cls, *args, **kwargs): # the below methods are never called, because ManagedIdentityCredential can't be instantiated; # they exist so tooling gets accurate signatures for Imds- and MsiCredential - def __init__(self, client_id=None, config=None, **kwargs): - # type: (Optional[str], Optional[Configuration], Any) -> None + def __init__(self, client_id=None, **kwargs): + # type: (Optional[str], Any) -> None pass - @staticmethod - def create_config(**kwargs): - # type: (Dict[str, str]) -> Configuration - """ - Build a default configuration for the credential's HTTP pipeline. - - :rtype: :class:`azure.core.configuration` - """ - return Configuration(**kwargs) - def get_token(self, *scopes): # type (*str) -> AccessToken """ diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index e3cfc64544c0..0319e6a2938a 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -222,7 +222,7 @@ def test_imds_credential_retries(): ) mock_send = Mock(return_value=mock_response) - total_retries = ImdsCredential.create_config().retry_policy.total_retries + total_retries = ImdsCredential._create_config().retry_policy.total_retries for status_code in (404, 429, 500): mock_send.reset_mock() diff --git a/sdk/identity/azure-identity/tests/test_identity_async.py b/sdk/identity/azure-identity/tests/test_identity_async.py index 06254dc898ba..70d06ed7f8c7 100644 --- a/sdk/identity/azure-identity/tests/test_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_identity_async.py @@ -223,7 +223,7 @@ async def test_imds_credential_retries(): ) mock_send = Mock(return_value=mock_response) - total_retries = ImdsCredential.create_config().retry_policy.total_retries + total_retries = ImdsCredential._create_config().retry_policy.total_retries for status_code in (404, 429, 500): mock_send.reset_mock() From ccd73c15088f969b8adaaf10f26faf00387405d8 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 1 Aug 2019 10:03:31 -0700 Subject: [PATCH 19/32] [AutoPR] security/resource-manager (#5709) * Generated from 2b4c25b67ef444e5fb6df8a4a4d78bfa747b198a (#5704) chore: jsonfmt security Ran `jsonfmt -w "specification/security/**/*.json"` * [AutoPR security/resource-manager] Changes to the JIT API for Firewall Support (#6047) * Generated from 0a90b13aa3eeec05f438be7bbe0eb444a084e789 Update jitNetworkAccessPolicies.json * Generated from 77db60c613fff13703dc99ca4aaa81bfbd4900ef Update jitNetworkAccessPolicies.json * Generated from 77db60c613fff13703dc99ca4aaa81bfbd4900ef Update jitNetworkAccessPolicies.json * Packaging update of azure-mgmt-security * [AutoPR security/resource-manager] Improving Security Center pricing API documentation (#6289) * Generated from 149ce8a94fd12df4868cb641d0d47bf83472b659 Improving Security Center pricing API documentation * Generated from 149ce8a94fd12df4868cb641d0d47bf83472b659 Improving Security Center pricing API documentation * [AutoPR security/resource-manager] Add Microsoft.Security applicationWhitelistings API (#6262) * Generated from 0bc0b6465c2c93267a29e4eb0c39e2b12a8b623e add operation ID's * Generated from 56fe4277e879002f98abc961fc5fb3abf80cf32a remove location from example, add Executable to fileType * Generated from 6307743902cd21e4a200cca1cddc2383121ae216 add Whitelistings to custom-words * Generated from 01357ba2f4e4ca899217b4e65892b7bdf375d5bf (#6515) chore: jsonfmt security * [AutoPR security/resource-manager] Set IoTSecuritySolutions & IoTSecuritySolutionAnalytics API as stable (#6526) * Generated from 4d6fbc52713c0423aa04f74ae330867fac488b86 Set IoTSecuritySolutions & IoTSecuritySolutionAnalytics API as stable * Generated from e763a96421ef60d69bbae038d008c08002f16359 remove paging support from IoTSecurityDeviceRecommendationsList * Generated from dea80a5e1da4b383480342bba4eca97ba55c053b remove paging from IoTSecurityAlertedDevicesList * regenerated * history and version * general breaking changes info --- sdk/security/azure-mgmt-security/HISTORY.rst | 34 + sdk/security/azure-mgmt-security/README.rst | 2 +- .../azure/mgmt/security/__init__.py | 7 +- .../azure/mgmt/security/_configuration.py | 54 + .../azure/mgmt/security/_security_center.py | 201 + .../azure/mgmt/security/models/__init__.py | 449 ++- .../azure/mgmt/security/models/_models.py | 3439 +++++++++++++++++ .../azure/mgmt/security/models/_models_py3.py | 3439 +++++++++++++++++ .../mgmt/security/models/_paged_models.py | 300 ++ .../security/models/_security_center_enums.py | 156 + .../models/aad_connectivity_state1.py | 31 - .../models/aad_connectivity_state1_py3.py | 31 - .../models/aad_external_security_solution.py | 58 - .../aad_external_security_solution_py3.py | 58 - .../models/aad_solution_properties.py | 43 - .../models/aad_solution_properties_py3.py | 43 - .../advanced_threat_protection_setting.py | 47 - .../advanced_threat_protection_setting_py3.py | 47 - .../azure/mgmt/security/models/alert.py | 165 - .../models/alert_confidence_reason.py | 40 - .../models/alert_confidence_reason_py3.py | 40 - .../mgmt/security/models/alert_entity.py | 40 - .../mgmt/security/models/alert_entity_py3.py | 40 - .../azure/mgmt/security/models/alert_paged.py | 27 - .../azure/mgmt/security/models/alert_py3.py | 165 - .../models/allowed_connections_resource.py | 63 - .../allowed_connections_resource_paged.py | 27 - .../allowed_connections_resource_py3.py | 63 - .../mgmt/security/models/asc_location.py | 46 - .../security/models/asc_location_paged.py | 27 - .../mgmt/security/models/asc_location_py3.py | 46 - .../models/ata_external_security_solution.py | 57 - .../ata_external_security_solution_py3.py | 57 - .../models/ata_solution_properties.py | 41 - .../models/ata_solution_properties_py3.py | 41 - .../models/auto_provisioning_setting.py | 50 - .../models/auto_provisioning_setting_paged.py | 27 - .../models/auto_provisioning_setting_py3.py | 50 - .../models/cef_external_security_solution.py | 57 - .../cef_external_security_solution_py3.py | 57 - .../models/cef_solution_properties.py | 49 - .../models/cef_solution_properties_py3.py | 49 - .../azure/mgmt/security/models/compliance.py | 62 - .../mgmt/security/models/compliance_paged.py | 27 - .../mgmt/security/models/compliance_py3.py | 62 - .../security/models/compliance_segment.py | 41 - .../security/models/compliance_segment_py3.py | 41 - .../security/models/connectable_resource.py | 49 - .../models/connectable_resource_py3.py | 49 - .../security/models/connected_resource.py | 46 - .../security/models/connected_resource_py3.py | 46 - .../security/models/connected_workspace.py | 28 - .../models/connected_workspace_py3.py | 28 - .../security/models/data_export_setting.py | 55 - .../models/data_export_setting_py3.py | 55 - .../models/discovered_security_solution.py | 73 - .../discovered_security_solution_paged.py | 27 - .../discovered_security_solution_py3.py | 73 - .../models/external_security_solution.py | 67 - .../external_security_solution_kind1.py | 30 - .../external_security_solution_kind1_py3.py | 30 - .../external_security_solution_paged.py | 27 - .../external_security_solution_properties.py | 41 - ...ternal_security_solution_properties_py3.py | 41 - .../models/external_security_solution_py3.py | 67 - .../models/information_protection_keyword.py | 41 - .../information_protection_keyword_py3.py | 41 - .../models/information_protection_policy.py | 57 - .../information_protection_policy_paged.py | 27 - .../information_protection_policy_py3.py | 57 - .../mgmt/security/models/information_type.py | 50 - .../security/models/information_type_py3.py | 50 - .../models/jit_network_access_policy.py | 73 - ...jit_network_access_policy_initiate_port.py | 45 - ...network_access_policy_initiate_port_py3.py | 45 - ..._network_access_policy_initiate_request.py | 36 - ...work_access_policy_initiate_request_py3.py | 36 - ..._access_policy_initiate_virtual_machine.py | 41 - ...ess_policy_initiate_virtual_machine_py3.py | 41 - .../models/jit_network_access_policy_paged.py | 27 - .../models/jit_network_access_policy_py3.py | 73 - ...t_network_access_policy_virtual_machine.py | 40 - ...twork_access_policy_virtual_machine_py3.py | 40 - .../models/jit_network_access_port_rule.py | 57 - .../jit_network_access_port_rule_py3.py | 57 - .../models/jit_network_access_request.py | 46 - .../models/jit_network_access_request_port.py | 64 - .../jit_network_access_request_port_py3.py | 64 - .../models/jit_network_access_request_py3.py | 46 - ..._network_access_request_virtual_machine.py | 40 - ...work_access_request_virtual_machine_py3.py | 40 - .../azure/mgmt/security/models/kind.py | 28 - .../azure/mgmt/security/models/kind_py3.py | 28 - .../azure/mgmt/security/models/location.py | 35 - .../mgmt/security/models/location_py3.py | 35 - .../azure/mgmt/security/models/operation.py | 44 - .../mgmt/security/models/operation_display.py | 50 - .../security/models/operation_display_py3.py | 50 - .../mgmt/security/models/operation_paged.py | 27 - .../mgmt/security/models/operation_py3.py | 44 - .../azure/mgmt/security/models/pricing.py | 56 - .../mgmt/security/models/pricing_list.py | 34 - .../mgmt/security/models/pricing_list_py3.py | 34 - .../azure/mgmt/security/models/pricing_py3.py | 56 - .../azure/mgmt/security/models/resource.py | 45 - .../mgmt/security/models/resource_py3.py | 45 - .../security/models/security_center_enums.py | 98 - .../mgmt/security/models/security_contact.py | 67 - .../security/models/security_contact_paged.py | 27 - .../security/models/security_contact_py3.py | 67 - .../mgmt/security/models/security_task.py | 68 - .../security/models/security_task_paged.py | 27 - .../models/security_task_parameters.py | 41 - .../models/security_task_parameters_py3.py | 41 - .../mgmt/security/models/security_task_py3.py | 68 - .../mgmt/security/models/sensitivity_label.py | 36 - .../security/models/sensitivity_label_py3.py | 36 - .../azure/mgmt/security/models/setting.py | 50 - .../mgmt/security/models/setting_paged.py | 27 - .../azure/mgmt/security/models/setting_py3.py | 50 - .../mgmt/security/models/setting_resource.py | 51 - .../security/models/setting_resource_py3.py | 51 - .../mgmt/security/models/topology_resource.py | 63 - .../models/topology_resource_paged.py | 27 - .../security/models/topology_resource_py3.py | 63 - .../models/topology_single_resource.py | 76 - .../models/topology_single_resource_child.py | 36 - .../topology_single_resource_child_py3.py | 36 - .../models/topology_single_resource_parent.py | 36 - .../topology_single_resource_parent_py3.py | 36 - .../models/topology_single_resource_py3.py | 76 - .../mgmt/security/models/workspace_setting.py | 57 - .../models/workspace_setting_paged.py | 27 - .../security/models/workspace_setting_py3.py | 57 - .../mgmt/security/operations/__init__.py | 62 +- ...daptive_application_controls_operations.py | 228 ++ ..._advanced_threat_protection_operations.py} | 4 +- ...ts_operations.py => _alerts_operations.py} | 60 +- ....py => _allowed_connections_operations.py} | 31 +- ..._auto_provisioning_settings_operations.py} | 18 +- .../_compliance_results_operations.py | 171 + ...erations.py => _compliances_operations.py} | 17 +- ...scovered_security_solutions_operations.py} | 31 +- ...external_security_solutions_operations.py} | 31 +- ...rmation_protection_policies_operations.py} | 18 +- ...s_analytics_aggregated_alert_operations.py | 162 + ..._analytics_aggregated_alerts_operations.py | 117 + ...security_solutions_analytics_operations.py | 167 + ...ons_analytics_recommendation_operations.py | 108 + ...ns_analytics_recommendations_operations.py | 118 + .../_io_tsecurity_solutions_operations.py | 111 + ...ity_solutions_resource_group_operations.py | 115 + .../_iot_security_solution_operations.py | 297 ++ ...jit_network_access_policies_operations.py} | 61 +- ...operations.py => _locations_operations.py} | 17 +- .../{operations.py => _operations.py} | 16 +- ..._operations.py => _pricings_operations.py} | 27 +- ...atory_compliance_assessments_operations.py | 188 + ...gulatory_compliance_controls_operations.py | 178 + ...ulatory_compliance_standards_operations.py | 169 + ...ns.py => _security_contacts_operations.py} | 19 +- ...ver_vulnerability_assessment_operations.py | 315 ++ ..._operations.py => _settings_operations.py} | 18 +- ...sks_operations.py => _tasks_operations.py} | 46 +- ..._operations.py => _topology_operations.py} | 31 +- ...s.py => _workspace_settings_operations.py} | 19 +- .../azure/mgmt/security/security_center.py | 169 - .../azure/mgmt/security/version.py | 2 +- sdk/security/azure-mgmt-security/setup.py | 1 - 169 files changed, 10670 insertions(+), 6540 deletions(-) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{advanced_threat_protection_operations.py => _advanced_threat_protection_operations.py} (98%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{alerts_operations.py => _alerts_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{allowed_connections_operations.py => _allowed_connections_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{auto_provisioning_settings_operations.py => _auto_provisioning_settings_operations.py} (96%) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{compliances_operations.py => _compliances_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{discovered_security_solutions_operations.py => _discovered_security_solutions_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{external_security_solutions_operations.py => _external_security_solutions_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{information_protection_policies_operations.py => _information_protection_policies_operations.py} (96%) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{jit_network_access_policies_operations.py => _jit_network_access_policies_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{locations_operations.py => _locations_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{operations.py => _operations.py} (90%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{pricings_operations.py => _pricings_operations.py} (87%) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{security_contacts_operations.py => _security_contacts_operations.py} (97%) create mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{settings_operations.py => _settings_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{tasks_operations.py => _tasks_operations.py} (96%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{topology_operations.py => _topology_operations.py} (94%) rename sdk/security/azure-mgmt-security/azure/mgmt/security/operations/{workspace_settings_operations.py => _workspace_settings_operations.py} (97%) delete mode 100644 sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py diff --git a/sdk/security/azure-mgmt-security/HISTORY.rst b/sdk/security/azure-mgmt-security/HISTORY.rst index 557b6e935083..e8b3d3babd74 100644 --- a/sdk/security/azure-mgmt-security/HISTORY.rst +++ b/sdk/security/azure-mgmt-security/HISTORY.rst @@ -3,6 +3,40 @@ Release History =============== +0.3.0 (2019-08-01) +++++++++++++++++++ + +**Features** + +- Model JitNetworkAccessPolicyVirtualMachine has a new parameter public_ip_address +- Model JitNetworkAccessRequestPort has a new parameter mapped_port +- Added operation group RegulatoryComplianceControlsOperations +- Added operation group ComplianceResultsOperations +- Added operation group ServerVulnerabilityAssessmentOperations +- Added operation group IoTSecuritySolutionsResourceGroupOperations +- Added operation group AdaptiveApplicationControlsOperations +- Added operation group IoTSecuritySolutionsOperations +- Added operation group IotSecuritySolutionOperations +- Added operation group RegulatoryComplianceStandardsOperations +- Added operation group IoTSecuritySolutionsAnalyticsOperations +- Added operation group IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +- Added operation group IoTSecuritySolutionsAnalyticsRecommendationsOperations +- Added operation group RegulatoryComplianceAssessmentsOperations +- Added operation group IoTSecuritySolutionsAnalyticsRecommendationOperations +- Added operation group IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- SecurityCenter cannot be imported from `azure.mgmt.security.security_center` anymore (import from `azure.mgmt.security` works like before) +- SecurityCenterConfiguration import has been moved from `azure.mgmt.security.security_center` to `azure.mgmt.security` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.security.models.my_class` (import from `azure.mgmt.security.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.security.operations.my_class_operations` (import from `azure.mgmt.security.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.2.0 (2019-04-16) ++++++++++++++++++ diff --git a/sdk/security/azure-mgmt-security/README.rst b/sdk/security/azure-mgmt-security/README.rst index 0d810d257cf9..dc352b08abcb 100644 --- a/sdk/security/azure-mgmt-security/README.rst +++ b/sdk/security/azure-mgmt-security/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Security Center Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py index 4a59cad125c7..905fe754f6b2 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .security_center import SecurityCenter -from .version import VERSION +from ._configuration import SecurityCenterConfiguration +from ._security_center import SecurityCenter +__all__ = ['SecurityCenter', 'SecurityCenterConfiguration'] -__all__ = ['SecurityCenter'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py new file mode 100644 index 000000000000..9aa2b7aa11ce --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class SecurityCenterConfiguration(AzureConfiguration): + """Configuration for SecurityCenter + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID + :type subscription_id: str + :param asc_location: The location where ASC stores the data of the + subscription. can be retrieved from Get locations + :type asc_location: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, asc_location, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if asc_location is None: + raise ValueError("Parameter 'asc_location' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SecurityCenterConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-security/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.asc_location = asc_location diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py new file mode 100644 index 000000000000..342c5d61f0e1 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py @@ -0,0 +1,201 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 Serializer, Deserializer + +from ._configuration import SecurityCenterConfiguration +from .operations import ComplianceResultsOperations +from .operations import PricingsOperations +from .operations import AlertsOperations +from .operations import SettingsOperations +from .operations import IoTSecuritySolutionsOperations +from .operations import IoTSecuritySolutionsResourceGroupOperations +from .operations import IotSecuritySolutionOperations +from .operations import IoTSecuritySolutionsAnalyticsOperations +from .operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from .operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from .operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from .operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations +from .operations import AllowedConnectionsOperations +from .operations import DiscoveredSecuritySolutionsOperations +from .operations import ExternalSecuritySolutionsOperations +from .operations import JitNetworkAccessPoliciesOperations +from .operations import AdaptiveApplicationControlsOperations +from .operations import LocationsOperations +from .operations import Operations +from .operations import TasksOperations +from .operations import TopologyOperations +from .operations import AdvancedThreatProtectionOperations +from .operations import AutoProvisioningSettingsOperations +from .operations import CompliancesOperations +from .operations import InformationProtectionPoliciesOperations +from .operations import SecurityContactsOperations +from .operations import WorkspaceSettingsOperations +from .operations import RegulatoryComplianceStandardsOperations +from .operations import RegulatoryComplianceControlsOperations +from .operations import RegulatoryComplianceAssessmentsOperations +from .operations import ServerVulnerabilityAssessmentOperations +from . import models + + +class SecurityCenter(SDKClient): + """API spec for Microsoft.Security (Azure Security Center) resource provider + + :ivar config: Configuration for client. + :vartype config: SecurityCenterConfiguration + + :ivar compliance_results: ComplianceResults operations + :vartype compliance_results: azure.mgmt.security.operations.ComplianceResultsOperations + :ivar pricings: Pricings operations + :vartype pricings: azure.mgmt.security.operations.PricingsOperations + :ivar alerts: Alerts operations + :vartype alerts: azure.mgmt.security.operations.AlertsOperations + :ivar settings: Settings operations + :vartype settings: azure.mgmt.security.operations.SettingsOperations + :ivar io_tsecurity_solutions: IoTSecuritySolutions operations + :vartype io_tsecurity_solutions: azure.mgmt.security.operations.IoTSecuritySolutionsOperations + :ivar io_tsecurity_solutions_resource_group: IoTSecuritySolutionsResourceGroup operations + :vartype io_tsecurity_solutions_resource_group: azure.mgmt.security.operations.IoTSecuritySolutionsResourceGroupOperations + :ivar iot_security_solution: IotSecuritySolution operations + :vartype iot_security_solution: azure.mgmt.security.operations.IotSecuritySolutionOperations + :ivar io_tsecurity_solutions_analytics: IoTSecuritySolutionsAnalytics operations + :vartype io_tsecurity_solutions_analytics: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alerts: IoTSecuritySolutionsAnalyticsAggregatedAlerts operations + :vartype io_tsecurity_solutions_analytics_aggregated_alerts: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alert: IoTSecuritySolutionsAnalyticsAggregatedAlert operations + :vartype io_tsecurity_solutions_analytics_aggregated_alert: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertOperations + :ivar io_tsecurity_solutions_analytics_recommendation: IoTSecuritySolutionsAnalyticsRecommendation operations + :vartype io_tsecurity_solutions_analytics_recommendation: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationOperations + :ivar io_tsecurity_solutions_analytics_recommendations: IoTSecuritySolutionsAnalyticsRecommendations operations + :vartype io_tsecurity_solutions_analytics_recommendations: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationsOperations + :ivar allowed_connections: AllowedConnections operations + :vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations + :ivar discovered_security_solutions: DiscoveredSecuritySolutions operations + :vartype discovered_security_solutions: azure.mgmt.security.operations.DiscoveredSecuritySolutionsOperations + :ivar external_security_solutions: ExternalSecuritySolutions operations + :vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations + :ivar jit_network_access_policies: JitNetworkAccessPolicies operations + :vartype jit_network_access_policies: azure.mgmt.security.operations.JitNetworkAccessPoliciesOperations + :ivar adaptive_application_controls: AdaptiveApplicationControls operations + :vartype adaptive_application_controls: azure.mgmt.security.operations.AdaptiveApplicationControlsOperations + :ivar locations: Locations operations + :vartype locations: azure.mgmt.security.operations.LocationsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.security.operations.Operations + :ivar tasks: Tasks operations + :vartype tasks: azure.mgmt.security.operations.TasksOperations + :ivar topology: Topology operations + :vartype topology: azure.mgmt.security.operations.TopologyOperations + :ivar advanced_threat_protection: AdvancedThreatProtection operations + :vartype advanced_threat_protection: azure.mgmt.security.operations.AdvancedThreatProtectionOperations + :ivar auto_provisioning_settings: AutoProvisioningSettings operations + :vartype auto_provisioning_settings: azure.mgmt.security.operations.AutoProvisioningSettingsOperations + :ivar compliances: Compliances operations + :vartype compliances: azure.mgmt.security.operations.CompliancesOperations + :ivar information_protection_policies: InformationProtectionPolicies operations + :vartype information_protection_policies: azure.mgmt.security.operations.InformationProtectionPoliciesOperations + :ivar security_contacts: SecurityContacts operations + :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations + :ivar workspace_settings: WorkspaceSettings operations + :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations + :ivar regulatory_compliance_standards: RegulatoryComplianceStandards operations + :vartype regulatory_compliance_standards: azure.mgmt.security.operations.RegulatoryComplianceStandardsOperations + :ivar regulatory_compliance_controls: RegulatoryComplianceControls operations + :vartype regulatory_compliance_controls: azure.mgmt.security.operations.RegulatoryComplianceControlsOperations + :ivar regulatory_compliance_assessments: RegulatoryComplianceAssessments operations + :vartype regulatory_compliance_assessments: azure.mgmt.security.operations.RegulatoryComplianceAssessmentsOperations + :ivar server_vulnerability_assessment: ServerVulnerabilityAssessment operations + :vartype server_vulnerability_assessment: azure.mgmt.security.operations.ServerVulnerabilityAssessmentOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID + :type subscription_id: str + :param asc_location: The location where ASC stores the data of the + subscription. can be retrieved from Get locations + :type asc_location: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, asc_location, base_url=None): + + self.config = SecurityCenterConfiguration(credentials, subscription_id, asc_location, base_url) + super(SecurityCenter, self).__init__(self.config.credentials, self.config) + + 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.compliance_results = ComplianceResultsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.pricings = PricingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.alerts = AlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.settings = SettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions = IoTSecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_resource_group = IoTSecuritySolutionsResourceGroupOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_security_solution = IotSecuritySolutionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics = IoTSecuritySolutionsAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alerts = IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alert = IoTSecuritySolutionsAnalyticsAggregatedAlertOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendation = IoTSecuritySolutionsAnalyticsRecommendationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendations = IoTSecuritySolutionsAnalyticsRecommendationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.allowed_connections = AllowedConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.external_security_solutions = ExternalSecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.jit_network_access_policies = JitNetworkAccessPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.adaptive_application_controls = AdaptiveApplicationControlsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.locations = LocationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.tasks = TasksOperations( + self._client, self.config, self._serialize, self._deserialize) + self.topology = TopologyOperations( + self._client, self.config, self._serialize, self._deserialize) + self.advanced_threat_protection = AdvancedThreatProtectionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.auto_provisioning_settings = AutoProvisioningSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.compliances = CompliancesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.information_protection_policies = InformationProtectionPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.security_contacts = SecurityContactsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_settings = WorkspaceSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_standards = RegulatoryComplianceStandardsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_controls = RegulatoryComplianceControlsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_assessments = RegulatoryComplianceAssessmentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.server_vulnerability_assessment = ServerVulnerabilityAssessmentOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py index 791f6ade36e2..b09be32d96b1 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -10,134 +10,209 @@ # -------------------------------------------------------------------------- try: - from .pricing_py3 import Pricing - from .pricing_list_py3 import PricingList - from .asc_location_py3 import AscLocation - from .resource_py3 import Resource - from .alert_entity_py3 import AlertEntity - from .alert_confidence_reason_py3 import AlertConfidenceReason - from .alert_py3 import Alert - from .setting_py3 import Setting - from .data_export_setting_py3 import DataExportSetting - from .setting_resource_py3 import SettingResource - from .connected_resource_py3 import ConnectedResource - from .connectable_resource_py3 import ConnectableResource - from .allowed_connections_resource_py3 import AllowedConnectionsResource - from .location_py3 import Location - from .discovered_security_solution_py3 import DiscoveredSecuritySolution - from .external_security_solution_py3 import ExternalSecuritySolution - from .cef_solution_properties_py3 import CefSolutionProperties - from .cef_external_security_solution_py3 import CefExternalSecuritySolution - from .ata_solution_properties_py3 import AtaSolutionProperties - from .ata_external_security_solution_py3 import AtaExternalSecuritySolution - from .connected_workspace_py3 import ConnectedWorkspace - from .aad_solution_properties_py3 import AadSolutionProperties - from .aad_external_security_solution_py3 import AadExternalSecuritySolution - from .external_security_solution_kind1_py3 import ExternalSecuritySolutionKind1 - from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties - from .aad_connectivity_state1_py3 import AadConnectivityState1 - from .jit_network_access_port_rule_py3 import JitNetworkAccessPortRule - from .jit_network_access_policy_virtual_machine_py3 import JitNetworkAccessPolicyVirtualMachine - from .jit_network_access_request_port_py3 import JitNetworkAccessRequestPort - from .jit_network_access_request_virtual_machine_py3 import JitNetworkAccessRequestVirtualMachine - from .jit_network_access_request_py3 import JitNetworkAccessRequest - from .jit_network_access_policy_py3 import JitNetworkAccessPolicy - from .jit_network_access_policy_initiate_port_py3 import JitNetworkAccessPolicyInitiatePort - from .jit_network_access_policy_initiate_virtual_machine_py3 import JitNetworkAccessPolicyInitiateVirtualMachine - from .jit_network_access_policy_initiate_request_py3 import JitNetworkAccessPolicyInitiateRequest - from .kind_py3 import Kind - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .security_task_parameters_py3 import SecurityTaskParameters - from .security_task_py3 import SecurityTask - from .topology_single_resource_parent_py3 import TopologySingleResourceParent - from .topology_single_resource_child_py3 import TopologySingleResourceChild - from .topology_single_resource_py3 import TopologySingleResource - from .topology_resource_py3 import TopologyResource - from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting - from .auto_provisioning_setting_py3 import AutoProvisioningSetting - from .compliance_segment_py3 import ComplianceSegment - from .compliance_py3 import Compliance - from .sensitivity_label_py3 import SensitivityLabel - from .information_protection_keyword_py3 import InformationProtectionKeyword - from .information_type_py3 import InformationType - from .information_protection_policy_py3 import InformationProtectionPolicy - from .security_contact_py3 import SecurityContact - from .workspace_setting_py3 import WorkspaceSetting + from ._models_py3 import AadConnectivityState1 + from ._models_py3 import AadExternalSecuritySolution + from ._models_py3 import AadSolutionProperties + from ._models_py3 import AdvancedThreatProtectionSetting + from ._models_py3 import Alert + from ._models_py3 import AlertConfidenceReason + from ._models_py3 import AlertEntity + from ._models_py3 import AllowedConnectionsResource + from ._models_py3 import AppWhitelistingGroup + from ._models_py3 import AppWhitelistingGroups + from ._models_py3 import AppWhitelistingIssueSummary + from ._models_py3 import AppWhitelistingPutGroupData + from ._models_py3 import AscLocation + from ._models_py3 import AtaExternalSecuritySolution + from ._models_py3 import AtaSolutionProperties + from ._models_py3 import AutoProvisioningSetting + from ._models_py3 import CefExternalSecuritySolution + from ._models_py3 import CefSolutionProperties + from ._models_py3 import Compliance + from ._models_py3 import ComplianceResult + from ._models_py3 import ComplianceSegment + from ._models_py3 import ConnectableResource + from ._models_py3 import ConnectedResource + from ._models_py3 import ConnectedWorkspace + from ._models_py3 import DataExportSetting + from ._models_py3 import DiscoveredSecuritySolution + from ._models_py3 import ExternalSecuritySolution + from ._models_py3 import ExternalSecuritySolutionKind1 + from ._models_py3 import ExternalSecuritySolutionProperties + from ._models_py3 import InformationProtectionKeyword + from ._models_py3 import InformationProtectionPolicy + from ._models_py3 import InformationType + from ._models_py3 import IoTSecurityAggregatedAlert + from ._models_py3 import IoTSecurityAggregatedRecommendation + from ._models_py3 import IoTSecurityAlertedDevice + from ._models_py3 import IoTSecurityAlertedDevicesList + from ._models_py3 import IoTSecurityDeviceAlert + from ._models_py3 import IoTSecurityDeviceAlertsList + from ._models_py3 import IoTSecurityDeviceRecommendation + from ._models_py3 import IoTSecurityDeviceRecommendationsList + from ._models_py3 import IoTSecuritySolutionAnalyticsModel + from ._models_py3 import IoTSecuritySolutionAnalyticsModelList + from ._models_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from ._models_py3 import IoTSecuritySolutionModel + from ._models_py3 import IoTSeverityMetrics + from ._models_py3 import JitNetworkAccessPolicy + from ._models_py3 import JitNetworkAccessPolicyInitiatePort + from ._models_py3 import JitNetworkAccessPolicyInitiateRequest + from ._models_py3 import JitNetworkAccessPolicyInitiateVirtualMachine + from ._models_py3 import JitNetworkAccessPolicyVirtualMachine + from ._models_py3 import JitNetworkAccessPortRule + from ._models_py3 import JitNetworkAccessRequest + from ._models_py3 import JitNetworkAccessRequestPort + from ._models_py3 import JitNetworkAccessRequestVirtualMachine + from ._models_py3 import Kind + from ._models_py3 import Location + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PathRecommendation + from ._models_py3 import Pricing + from ._models_py3 import PricingList + from ._models_py3 import PublisherInfo + from ._models_py3 import RecommendationConfigurationProperties + from ._models_py3 import RegulatoryComplianceAssessment + from ._models_py3 import RegulatoryComplianceControl + from ._models_py3 import RegulatoryComplianceStandard + from ._models_py3 import Resource + from ._models_py3 import SecurityContact + from ._models_py3 import SecurityTask + from ._models_py3 import SecurityTaskParameters + from ._models_py3 import SensitivityLabel + from ._models_py3 import ServerVulnerabilityAssessment + from ._models_py3 import ServerVulnerabilityAssessmentsList + from ._models_py3 import Setting + from ._models_py3 import SettingResource + from ._models_py3 import TagsResource + from ._models_py3 import TopologyResource + from ._models_py3 import TopologySingleResource + from ._models_py3 import TopologySingleResourceChild + from ._models_py3 import TopologySingleResourceParent + from ._models_py3 import UpdateIotSecuritySolutionData + from ._models_py3 import UserDefinedResourcesProperties + from ._models_py3 import UserRecommendation + from ._models_py3 import VmRecommendation + from ._models_py3 import WorkspaceSetting except (SyntaxError, ImportError): - from .pricing import Pricing - from .pricing_list import PricingList - from .asc_location import AscLocation - from .resource import Resource - from .alert_entity import AlertEntity - from .alert_confidence_reason import AlertConfidenceReason - from .alert import Alert - from .setting import Setting - from .data_export_setting import DataExportSetting - from .setting_resource import SettingResource - from .connected_resource import ConnectedResource - from .connectable_resource import ConnectableResource - from .allowed_connections_resource import AllowedConnectionsResource - from .location import Location - from .discovered_security_solution import DiscoveredSecuritySolution - from .external_security_solution import ExternalSecuritySolution - from .cef_solution_properties import CefSolutionProperties - from .cef_external_security_solution import CefExternalSecuritySolution - from .ata_solution_properties import AtaSolutionProperties - from .ata_external_security_solution import AtaExternalSecuritySolution - from .connected_workspace import ConnectedWorkspace - from .aad_solution_properties import AadSolutionProperties - from .aad_external_security_solution import AadExternalSecuritySolution - from .external_security_solution_kind1 import ExternalSecuritySolutionKind1 - from .external_security_solution_properties import ExternalSecuritySolutionProperties - from .aad_connectivity_state1 import AadConnectivityState1 - from .jit_network_access_port_rule import JitNetworkAccessPortRule - from .jit_network_access_policy_virtual_machine import JitNetworkAccessPolicyVirtualMachine - from .jit_network_access_request_port import JitNetworkAccessRequestPort - from .jit_network_access_request_virtual_machine import JitNetworkAccessRequestVirtualMachine - from .jit_network_access_request import JitNetworkAccessRequest - from .jit_network_access_policy import JitNetworkAccessPolicy - from .jit_network_access_policy_initiate_port import JitNetworkAccessPolicyInitiatePort - from .jit_network_access_policy_initiate_virtual_machine import JitNetworkAccessPolicyInitiateVirtualMachine - from .jit_network_access_policy_initiate_request import JitNetworkAccessPolicyInitiateRequest - from .kind import Kind - from .operation_display import OperationDisplay - from .operation import Operation - from .security_task_parameters import SecurityTaskParameters - from .security_task import SecurityTask - from .topology_single_resource_parent import TopologySingleResourceParent - from .topology_single_resource_child import TopologySingleResourceChild - from .topology_single_resource import TopologySingleResource - from .topology_resource import TopologyResource - from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting - from .auto_provisioning_setting import AutoProvisioningSetting - from .compliance_segment import ComplianceSegment - from .compliance import Compliance - from .sensitivity_label import SensitivityLabel - from .information_protection_keyword import InformationProtectionKeyword - from .information_type import InformationType - from .information_protection_policy import InformationProtectionPolicy - from .security_contact import SecurityContact - from .workspace_setting import WorkspaceSetting -from .alert_paged import AlertPaged -from .setting_paged import SettingPaged -from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged -from .discovered_security_solution_paged import DiscoveredSecuritySolutionPaged -from .external_security_solution_paged import ExternalSecuritySolutionPaged -from .jit_network_access_policy_paged import JitNetworkAccessPolicyPaged -from .asc_location_paged import AscLocationPaged -from .operation_paged import OperationPaged -from .security_task_paged import SecurityTaskPaged -from .topology_resource_paged import TopologyResourcePaged -from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged -from .compliance_paged import CompliancePaged -from .information_protection_policy_paged import InformationProtectionPolicyPaged -from .security_contact_paged import SecurityContactPaged -from .workspace_setting_paged import WorkspaceSettingPaged -from .security_center_enums import ( + from ._models import AadConnectivityState1 + from ._models import AadExternalSecuritySolution + from ._models import AadSolutionProperties + from ._models import AdvancedThreatProtectionSetting + from ._models import Alert + from ._models import AlertConfidenceReason + from ._models import AlertEntity + from ._models import AllowedConnectionsResource + from ._models import AppWhitelistingGroup + from ._models import AppWhitelistingGroups + from ._models import AppWhitelistingIssueSummary + from ._models import AppWhitelistingPutGroupData + from ._models import AscLocation + from ._models import AtaExternalSecuritySolution + from ._models import AtaSolutionProperties + from ._models import AutoProvisioningSetting + from ._models import CefExternalSecuritySolution + from ._models import CefSolutionProperties + from ._models import Compliance + from ._models import ComplianceResult + from ._models import ComplianceSegment + from ._models import ConnectableResource + from ._models import ConnectedResource + from ._models import ConnectedWorkspace + from ._models import DataExportSetting + from ._models import DiscoveredSecuritySolution + from ._models import ExternalSecuritySolution + from ._models import ExternalSecuritySolutionKind1 + from ._models import ExternalSecuritySolutionProperties + from ._models import InformationProtectionKeyword + from ._models import InformationProtectionPolicy + from ._models import InformationType + from ._models import IoTSecurityAggregatedAlert + from ._models import IoTSecurityAggregatedRecommendation + from ._models import IoTSecurityAlertedDevice + from ._models import IoTSecurityAlertedDevicesList + from ._models import IoTSecurityDeviceAlert + from ._models import IoTSecurityDeviceAlertsList + from ._models import IoTSecurityDeviceRecommendation + from ._models import IoTSecurityDeviceRecommendationsList + from ._models import IoTSecuritySolutionAnalyticsModel + from ._models import IoTSecuritySolutionAnalyticsModelList + from ._models import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from ._models import IoTSecuritySolutionModel + from ._models import IoTSeverityMetrics + from ._models import JitNetworkAccessPolicy + from ._models import JitNetworkAccessPolicyInitiatePort + from ._models import JitNetworkAccessPolicyInitiateRequest + from ._models import JitNetworkAccessPolicyInitiateVirtualMachine + from ._models import JitNetworkAccessPolicyVirtualMachine + from ._models import JitNetworkAccessPortRule + from ._models import JitNetworkAccessRequest + from ._models import JitNetworkAccessRequestPort + from ._models import JitNetworkAccessRequestVirtualMachine + from ._models import Kind + from ._models import Location + from ._models import Operation + from ._models import OperationDisplay + from ._models import PathRecommendation + from ._models import Pricing + from ._models import PricingList + from ._models import PublisherInfo + from ._models import RecommendationConfigurationProperties + from ._models import RegulatoryComplianceAssessment + from ._models import RegulatoryComplianceControl + from ._models import RegulatoryComplianceStandard + from ._models import Resource + from ._models import SecurityContact + from ._models import SecurityTask + from ._models import SecurityTaskParameters + from ._models import SensitivityLabel + from ._models import ServerVulnerabilityAssessment + from ._models import ServerVulnerabilityAssessmentsList + from ._models import Setting + from ._models import SettingResource + from ._models import TagsResource + from ._models import TopologyResource + from ._models import TopologySingleResource + from ._models import TopologySingleResourceChild + from ._models import TopologySingleResourceParent + from ._models import UpdateIotSecuritySolutionData + from ._models import UserDefinedResourcesProperties + from ._models import UserRecommendation + from ._models import VmRecommendation + from ._models import WorkspaceSetting +from ._paged_models import AlertPaged +from ._paged_models import AllowedConnectionsResourcePaged +from ._paged_models import AscLocationPaged +from ._paged_models import AutoProvisioningSettingPaged +from ._paged_models import CompliancePaged +from ._paged_models import ComplianceResultPaged +from ._paged_models import DiscoveredSecuritySolutionPaged +from ._paged_models import ExternalSecuritySolutionPaged +from ._paged_models import InformationProtectionPolicyPaged +from ._paged_models import IoTSecurityAggregatedAlertPaged +from ._paged_models import IoTSecurityAggregatedRecommendationPaged +from ._paged_models import IoTSecuritySolutionModelPaged +from ._paged_models import JitNetworkAccessPolicyPaged +from ._paged_models import OperationPaged +from ._paged_models import RegulatoryComplianceAssessmentPaged +from ._paged_models import RegulatoryComplianceControlPaged +from ._paged_models import RegulatoryComplianceStandardPaged +from ._paged_models import SecurityContactPaged +from ._paged_models import SecurityTaskPaged +from ._paged_models import SettingPaged +from ._paged_models import TopologyResourcePaged +from ._paged_models import WorkspaceSettingPaged +from ._security_center_enums import ( + ResourceStatus, PricingTier, ReportedSeverity, SettingKind, + SecuritySolutionStatus, + ExportData, + DataSource, + RecommendationType, + RecommendationConfigStatus, SecurityFamily, AadConnectivityState, ExternalSecuritySolutionKind, @@ -147,66 +222,102 @@ AutoProvision, AlertNotifications, AlertsToAdmins, + State, ConnectionType, ) __all__ = [ - 'Pricing', - 'PricingList', - 'AscLocation', - 'Resource', - 'AlertEntity', - 'AlertConfidenceReason', + 'AadConnectivityState1', + 'AadExternalSecuritySolution', + 'AadSolutionProperties', + 'AdvancedThreatProtectionSetting', 'Alert', - 'Setting', - 'DataExportSetting', - 'SettingResource', - 'ConnectedResource', - 'ConnectableResource', + 'AlertConfidenceReason', + 'AlertEntity', 'AllowedConnectionsResource', - 'Location', - 'DiscoveredSecuritySolution', - 'ExternalSecuritySolution', - 'CefSolutionProperties', - 'CefExternalSecuritySolution', - 'AtaSolutionProperties', + 'AppWhitelistingGroup', + 'AppWhitelistingGroups', + 'AppWhitelistingIssueSummary', + 'AppWhitelistingPutGroupData', + 'AscLocation', 'AtaExternalSecuritySolution', + 'AtaSolutionProperties', + 'AutoProvisioningSetting', + 'CefExternalSecuritySolution', + 'CefSolutionProperties', + 'Compliance', + 'ComplianceResult', + 'ComplianceSegment', + 'ConnectableResource', + 'ConnectedResource', 'ConnectedWorkspace', - 'AadSolutionProperties', - 'AadExternalSecuritySolution', + 'DataExportSetting', + 'DiscoveredSecuritySolution', + 'ExternalSecuritySolution', 'ExternalSecuritySolutionKind1', 'ExternalSecuritySolutionProperties', - 'AadConnectivityState1', - 'JitNetworkAccessPortRule', - 'JitNetworkAccessPolicyVirtualMachine', - 'JitNetworkAccessRequestPort', - 'JitNetworkAccessRequestVirtualMachine', - 'JitNetworkAccessRequest', + 'InformationProtectionKeyword', + 'InformationProtectionPolicy', + 'InformationType', + 'IoTSecurityAggregatedAlert', + 'IoTSecurityAggregatedRecommendation', + 'IoTSecurityAlertedDevice', + 'IoTSecurityAlertedDevicesList', + 'IoTSecurityDeviceAlert', + 'IoTSecurityDeviceAlertsList', + 'IoTSecurityDeviceRecommendation', + 'IoTSecurityDeviceRecommendationsList', + 'IoTSecuritySolutionAnalyticsModel', + 'IoTSecuritySolutionAnalyticsModelList', + 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', + 'IoTSecuritySolutionModel', + 'IoTSeverityMetrics', 'JitNetworkAccessPolicy', 'JitNetworkAccessPolicyInitiatePort', - 'JitNetworkAccessPolicyInitiateVirtualMachine', 'JitNetworkAccessPolicyInitiateRequest', + 'JitNetworkAccessPolicyInitiateVirtualMachine', + 'JitNetworkAccessPolicyVirtualMachine', + 'JitNetworkAccessPortRule', + 'JitNetworkAccessRequest', + 'JitNetworkAccessRequestPort', + 'JitNetworkAccessRequestVirtualMachine', 'Kind', - 'OperationDisplay', + 'Location', 'Operation', - 'SecurityTaskParameters', + 'OperationDisplay', + 'PathRecommendation', + 'Pricing', + 'PricingList', + 'PublisherInfo', + 'RecommendationConfigurationProperties', + 'RegulatoryComplianceAssessment', + 'RegulatoryComplianceControl', + 'RegulatoryComplianceStandard', + 'Resource', + 'SecurityContact', 'SecurityTask', - 'TopologySingleResourceParent', - 'TopologySingleResourceChild', - 'TopologySingleResource', - 'TopologyResource', - 'AdvancedThreatProtectionSetting', - 'AutoProvisioningSetting', - 'ComplianceSegment', - 'Compliance', + 'SecurityTaskParameters', 'SensitivityLabel', - 'InformationProtectionKeyword', - 'InformationType', - 'InformationProtectionPolicy', - 'SecurityContact', + 'ServerVulnerabilityAssessment', + 'ServerVulnerabilityAssessmentsList', + 'Setting', + 'SettingResource', + 'TagsResource', + 'TopologyResource', + 'TopologySingleResource', + 'TopologySingleResourceChild', + 'TopologySingleResourceParent', + 'UpdateIotSecuritySolutionData', + 'UserDefinedResourcesProperties', + 'UserRecommendation', + 'VmRecommendation', 'WorkspaceSetting', + 'ComplianceResultPaged', 'AlertPaged', 'SettingPaged', + 'IoTSecuritySolutionModelPaged', + 'IoTSecurityAggregatedAlertPaged', + 'IoTSecurityAggregatedRecommendationPaged', 'AllowedConnectionsResourcePaged', 'DiscoveredSecuritySolutionPaged', 'ExternalSecuritySolutionPaged', @@ -220,9 +331,18 @@ 'InformationProtectionPolicyPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', + 'RegulatoryComplianceStandardPaged', + 'RegulatoryComplianceControlPaged', + 'RegulatoryComplianceAssessmentPaged', + 'ResourceStatus', 'PricingTier', 'ReportedSeverity', 'SettingKind', + 'SecuritySolutionStatus', + 'ExportData', + 'DataSource', + 'RecommendationType', + 'RecommendationConfigStatus', 'SecurityFamily', 'AadConnectivityState', 'ExternalSecuritySolutionKind', @@ -232,5 +352,6 @@ 'AutoProvision', 'AlertNotifications', 'AlertsToAdmins', + 'State', 'ConnectionType', ] diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py new file mode 100644 index 000000000000..814deff5ee6b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py @@ -0,0 +1,3439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 +from msrest.exceptions import HttpOperationError + + +class AadConnectivityState1(Model): + """Describes an Azure resource with kind. + + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AadConnectivityState1, self).__init__(**kwargs) + self.connectivity_state = kwargs.get('connectivity_state', None) + + +class ExternalSecuritySolution(Model): + """Represents a security solution external to Azure Security Center which + sends information to an OMS workspace and whose data is displayed by Azure + Security Center. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, + AadExternalSecuritySolution + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} + } + + def __init__(self, **kwargs): + super(ExternalSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.kind = None + + +class AadExternalSecuritySolution(ExternalSecuritySolution): + """Represents an AAD identity protection solution which sends logs to an OMS + workspace. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AadSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, + } + + def __init__(self, **kwargs): + super(AadExternalSecuritySolution, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'AAD' + + +class AadSolutionProperties(Model): + """The external security solution properties for AAD solutions. + + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AadSolutionProperties, self).__init__(**kwargs) + self.device_vendor = kwargs.get('device_vendor', None) + self.device_type = kwargs.get('device_type', None) + self.workspace = kwargs.get('workspace', None) + self.connectivity_state = kwargs.get('connectivity_state', None) + + +class Resource(Model): + """Describes an Azure 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: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AdvancedThreatProtectionSetting(Resource): + """The Advanced Threat Protection 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: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param is_enabled: Indicates whether Advanced Threat Protection is + enabled. + :type is_enabled: bool + """ + + _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'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + + +class Alert(Resource): + """Security alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar state: State of the alert (Active, Dismissed etc.) + :vartype state: str + :ivar reported_time_utc: The time the incident was reported to + Microsoft.Security in UTC + :vartype reported_time_utc: datetime + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar alert_name: Name of the alert type + :vartype alert_name: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar detected_time_utc: The time the incident was detected by the vendor + :vartype detected_time_utc: datetime + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar remediation_steps: Recommended steps to reradiate the incident + :vartype remediation_steps: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar compromised_entity: The entity that the incident happened on + :vartype compromised_entity: str + :ivar associated_resource: Azure resource ID of the associated resource + :vartype associated_resource: str + :param extended_properties: + :type extended_properties: dict[str, object] + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar can_be_investigated: Whether this alert can be investigated with + Azure Security Center + :vartype can_be_investigated: bool + :ivar is_incident: Whether this alert is for incident type or not + (otherwise - single alert) + :vartype is_incident: bool + :param entities: objects that are related to this alerts + :type entities: list[~azure.mgmt.security.models.AlertEntity] + :ivar confidence_score: level of confidence we have on the alert + :vartype confidence_score: float + :param confidence_reasons: reasons the alert got the confidenceScore value + :type confidence_reasons: + list[~azure.mgmt.security.models.AlertConfidenceReason] + :ivar subscription_id: Azure subscription ID of the resource that had the + security alert or the subscription ID of the workspace that this resource + reports to + :vartype subscription_id: str + :ivar instance_id: Instance ID of the alert. + :vartype instance_id: str + :ivar workspace_arm_id: Azure resource ID of the workspace that the alert + was reported to. + :vartype workspace_arm_id: str + :ivar correlation_key: Alerts with the same CorrelationKey will be grouped + together in Ibiza. + :vartype correlation_key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'reported_time_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'alert_name': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'detected_time_utc': {'readonly': True}, + 'description': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'compromised_entity': {'readonly': True}, + 'associated_resource': {'readonly': True}, + 'system_source': {'readonly': True}, + 'can_be_investigated': {'readonly': True}, + 'is_incident': {'readonly': True}, + 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, + 'subscription_id': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'workspace_arm_id': {'readonly': True}, + 'correlation_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, + 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, + 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, + 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, + 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, + 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, + 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.state = None + self.reported_time_utc = None + self.vendor_name = None + self.alert_name = None + self.alert_display_name = None + self.detected_time_utc = None + self.description = None + self.remediation_steps = None + self.action_taken = None + self.reported_severity = None + self.compromised_entity = None + self.associated_resource = None + self.extended_properties = kwargs.get('extended_properties', None) + self.system_source = None + self.can_be_investigated = None + self.is_incident = None + self.entities = kwargs.get('entities', None) + self.confidence_score = None + self.confidence_reasons = kwargs.get('confidence_reasons', None) + self.subscription_id = None + self.instance_id = None + self.workspace_arm_id = None + self.correlation_key = None + + +class AlertConfidenceReason(Model): + """Factors that increase our confidence that the alert is a true positive. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Type of confidence factor + :vartype type: str + :ivar reason: description of the confidence reason + :vartype reason: str + """ + + _validation = { + 'type': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertConfidenceReason, self).__init__(**kwargs) + self.type = None + self.reason = None + + +class AlertEntity(Model): + """Changing set of properties depending on the entity type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: Type of entity + :vartype type: str + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertEntity, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = None + + +class AllowedConnectionsResource(Model): + """The resource whose properties describes the allowed traffic between Azure + resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the allowed connections + resource was calculated + :vartype calculated_date_time: datetime + :ivar connectable_resources: List of connectable resources + :vartype connectable_resources: + list[~azure.mgmt.security.models.ConnectableResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'connectable_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, + } + + def __init__(self, **kwargs): + super(AllowedConnectionsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.connectable_resources = None + + +class AppWhitelistingGroup(Model): + """AppWhitelistingGroup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_status: Possible values include: 'Recommended', + 'NotRecommended', 'NotAvailable', 'NoStatus' + :type recommendation_status: str or ~azure.mgmt.security.models.enum + :param issues: + :type issues: + list[~azure.mgmt.security.models.AppWhitelistingIssueSummary] + :param source_system: Possible values include: 'Azure_AppLocker', + 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' + :type source_system: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'enforcement_mode': {'key': 'properties.enforcementMode', 'type': 'str'}, + 'configuration_status': {'key': 'properties.configurationStatus', 'type': 'str'}, + 'recommendation_status': {'key': 'properties.recommendationStatus', 'type': 'str'}, + 'issues': {'key': 'properties.issues', 'type': '[AppWhitelistingIssueSummary]'}, + 'source_system': {'key': 'properties.sourceSystem', 'type': 'str'}, + 'vm_recommendations': {'key': 'properties.vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, **kwargs): + super(AppWhitelistingGroup, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.enforcement_mode = kwargs.get('enforcement_mode', None) + self.configuration_status = kwargs.get('configuration_status', None) + self.recommendation_status = kwargs.get('recommendation_status', None) + self.issues = kwargs.get('issues', None) + self.source_system = kwargs.get('source_system', None) + self.vm_recommendations = kwargs.get('vm_recommendations', None) + self.path_recommendations = kwargs.get('path_recommendations', None) + + +class AppWhitelistingGroups(Model): + """Represents a list of VM/server groups and set of rules that are Recommended + by Azure Security Center to be allowed. + + :param value: + :type value: list[~azure.mgmt.security.models.AppWhitelistingGroup] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppWhitelistingGroup]'}, + } + + def __init__(self, **kwargs): + super(AppWhitelistingGroups, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class AppWhitelistingIssueSummary(Model): + """Represents a summary of the alerts of the VM/server group. + + :param issue: Possible values include: 'ViolationsAudited', + 'ViolationsBlocked', 'MsiAndScriptViolationsAudited', + 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', + 'RulesViolatedManually' + :type issue: str or ~azure.mgmt.security.models.enum + :param number_of_vms: The number of machines in the VM/server group that + have this alert + :type number_of_vms: float + """ + + _attribute_map = { + 'issue': {'key': 'issue', 'type': 'str'}, + 'number_of_vms': {'key': 'numberOfVms', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(AppWhitelistingIssueSummary, self).__init__(**kwargs) + self.issue = kwargs.get('issue', None) + self.number_of_vms = kwargs.get('number_of_vms', None) + + +class AppWhitelistingPutGroupData(Model): + """The altered data of the recommended VM/server group policy. + + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + 'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, **kwargs): + super(AppWhitelistingPutGroupData, self).__init__(**kwargs) + self.enforcement_mode = kwargs.get('enforcement_mode', None) + self.vm_recommendations = kwargs.get('vm_recommendations', None) + self.path_recommendations = kwargs.get('path_recommendations', None) + + +class AscLocation(Resource): + """The ASC location of the subscription is in the "name" field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param properties: + :type properties: object + """ + + _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': 'object'}, + } + + def __init__(self, **kwargs): + super(AscLocation, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AtaExternalSecuritySolution(ExternalSecuritySolution): + """Represents an ATA security solution which sends logs to an OMS workspace. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AtaSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, + } + + def __init__(self, **kwargs): + super(AtaExternalSecuritySolution, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'ATA' + + +class ExternalSecuritySolutionProperties(Model): + """The solution properties (correspond to the solution kind). + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + } + + def __init__(self, **kwargs): + super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.device_vendor = kwargs.get('device_vendor', None) + self.device_type = kwargs.get('device_type', None) + self.workspace = kwargs.get('workspace', None) + + +class AtaSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for ATA solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AtaSolutionProperties, self).__init__(**kwargs) + self.last_event_received = kwargs.get('last_event_received', None) + + +class AutoProvisioningSetting(Resource): + """Auto provisioning setting. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param auto_provision: Required. Describes what kind of security agent + provisioning action to take. Possible values include: 'On', 'Off' + :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'auto_provision': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoProvisioningSetting, self).__init__(**kwargs) + self.auto_provision = kwargs.get('auto_provision', None) + + +class CefExternalSecuritySolution(ExternalSecuritySolution): + """Represents a security solution which sends CEF logs to an OMS workspace. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.CefSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, + } + + def __init__(self, **kwargs): + super(CefExternalSecuritySolution, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'CEF' + + +class CefSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for CEF solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param hostname: + :type hostname: str + :param agent: + :type agent: str + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + 'agent': {'key': 'agent', 'type': 'str'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CefSolutionProperties, self).__init__(**kwargs) + self.hostname = kwargs.get('hostname', None) + self.agent = kwargs.get('agent', None) + self.last_event_received = kwargs.get('last_event_received', None) + + +class CloudError(Model): + """Error response structure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for + display in a user interface. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class Compliance(Resource): + """Compliance of a scope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar assessment_timestamp_utc_date: The timestamp when the Compliance + calculation was conducted. + :vartype assessment_timestamp_utc_date: datetime + :ivar resource_count: The resource count of the given subscription for + which the Compliance calculation was conducted (needed for Management + Group Compliance calculation). + :vartype resource_count: int + :ivar assessment_result: An array of segment, which is the actually the + compliance assessment. + :vartype assessment_result: + list[~azure.mgmt.security.models.ComplianceSegment] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'assessment_timestamp_utc_date': {'readonly': True}, + 'resource_count': {'readonly': True}, + 'assessment_result': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, + 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, + 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, + } + + def __init__(self, **kwargs): + super(Compliance, self).__init__(**kwargs) + self.assessment_timestamp_utc_date = None + self.resource_count = None + self.assessment_result = None + + +class ComplianceResult(Resource): + """a compliance result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar resource_status: The status of the resource regarding a single + assessment. Possible values include: 'Healthy', 'NotApplicable', + 'OffByPolicy', 'NotHealthy' + :vartype resource_status: str or + ~azure.mgmt.security.models.ResourceStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_status': {'key': 'properties.resourceStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComplianceResult, self).__init__(**kwargs) + self.resource_status = None + + +class ComplianceSegment(Model): + """A segment of a compliance assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar segment_type: The segment type, e.g. compliant, non-compliance, + insufficient coverage, N/A, etc. + :vartype segment_type: str + :ivar percentage: The size (%) of the segment. + :vartype percentage: float + """ + + _validation = { + 'segment_type': {'readonly': True}, + 'percentage': {'readonly': True}, + } + + _attribute_map = { + 'segment_type': {'key': 'segmentType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ComplianceSegment, self).__init__(**kwargs) + self.segment_type = None + self.percentage = None + + +class ConnectableResource(Model): + """Describes the allowed inbound and outbound traffic of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The Azure resource id + :vartype id: str + :ivar inbound_connected_resources: The list of Azure resources that the + resource has inbound allowed connection from + :vartype inbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + :ivar outbound_connected_resources: The list of Azure resources that the + resource has outbound allowed connection to + :vartype outbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'inbound_connected_resources': {'readonly': True}, + 'outbound_connected_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, + 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, + } + + def __init__(self, **kwargs): + super(ConnectableResource, self).__init__(**kwargs) + self.id = None + self.inbound_connected_resources = None + self.outbound_connected_resources = None + + +class ConnectedResource(Model): + """Describes properties of a connected resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connected_resource_id: The Azure resource id of the connected + resource + :vartype connected_resource_id: str + :ivar tcp_ports: The allowed tcp ports + :vartype tcp_ports: str + :ivar udp_ports: The allowed udp ports + :vartype udp_ports: str + """ + + _validation = { + 'connected_resource_id': {'readonly': True}, + 'tcp_ports': {'readonly': True}, + 'udp_ports': {'readonly': True}, + } + + _attribute_map = { + 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, + 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, + 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedResource, self).__init__(**kwargs) + self.connected_resource_id = None + self.tcp_ports = None + self.udp_ports = None + + +class ConnectedWorkspace(Model): + """Represents an OMS workspace to which the solution is connected. + + :param id: Azure resource ID of the connected OMS workspace + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedWorkspace, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class SettingResource(Resource): + """The kind of the security setting. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SettingResource, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class Setting(SettingResource): + """Represents a security setting in Azure Security Center. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Setting, self).__init__(**kwargs) + + +class DataExportSetting(Setting): + """Represents a data export setting. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + :param enabled: Required. Is the data export setting is enabled + :type enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DataExportSetting, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + +class DiscoveredSecuritySolution(Model): + """DiscoveredSecuritySolution. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param security_family: Required. The security family of the discovered + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param offer: Required. The security solutions' image offer + :type offer: str + :param publisher: Required. The security solutions' image publisher + :type publisher: str + :param sku: Required. The security solutions' image sku + :type sku: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'offer': {'required': True}, + 'publisher': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, + 'offer': {'key': 'properties.offer', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiscoveredSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = kwargs.get('security_family', None) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + + +class ExternalSecuritySolutionKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the external solution. Possible values include: + 'CEF', 'ATA', 'AAD' + :type kind: str or + ~azure.mgmt.security.models.ExternalSecuritySolutionKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class InformationProtectionKeyword(Model): + """The information type keyword. + + :param pattern: The keyword pattern. + :type pattern: str + :param custom: Indicates whether the keyword is custom or not. + :type custom: bool + :param can_be_numeric: Indicates whether the keyword can be applied on + numeric types or not. + :type can_be_numeric: bool + :param excluded: Indicates whether the keyword is excluded or not. + :type excluded: bool + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, + 'excluded': {'key': 'excluded', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(InformationProtectionKeyword, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) + self.custom = kwargs.get('custom', None) + self.can_be_numeric = kwargs.get('can_be_numeric', None) + self.excluded = kwargs.get('excluded', None) + + +class InformationProtectionPolicy(Resource): + """Information protection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar last_modified_utc: Describes the last UTC time the policy was + modified. + :vartype last_modified_utc: datetime + :param labels: Dictionary of sensitivity labels. + :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] + :param information_types: The sensitivity information types. + :type information_types: dict[str, + ~azure.mgmt.security.models.InformationType] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_utc': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, + 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, + 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, + } + + def __init__(self, **kwargs): + super(InformationProtectionPolicy, self).__init__(**kwargs) + self.last_modified_utc = None + self.labels = kwargs.get('labels', None) + self.information_types = kwargs.get('information_types', None) + + +class InformationType(Model): + """The information type. + + :param display_name: The name of the information type. + :type display_name: str + :param order: The order of the information type. + :type order: float + :param recommended_label_id: The recommended label id to be associated + with this information type. + :type recommended_label_id: str + :param enabled: Indicates whether the information type is enabled or not. + :type enabled: bool + :param custom: Indicates whether the information type is custom or not. + :type custom: bool + :param keywords: The information type keywords. + :type keywords: + list[~azure.mgmt.security.models.InformationProtectionKeyword] + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, + } + + def __init__(self, **kwargs): + super(InformationType, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.order = kwargs.get('order', None) + self.recommended_label_id = kwargs.get('recommended_label_id', None) + self.enabled = kwargs.get('enabled', None) + self.custom = kwargs.get('custom', None) + self.keywords = kwargs.get('keywords', None) + + +class IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar aggregated_date_utc: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.recommendation_name = kwargs.get('recommendation_name', None) + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None + + +class IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + 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 value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None + + +class IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = kwargs.get('top_alerted_devices', None) + self.most_prevalent_device_alerts = kwargs.get('most_prevalent_device_alerts', None) + self.most_prevalent_device_recommendations = kwargs.get('most_prevalent_device_recommendations', None) + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + 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 value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.devices_metrics = kwargs.get('devices_metrics', None) + + +class IoTSecuritySolutionModel(Model): + """Security Solution. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'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'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionModel, 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.workspace = kwargs.get('workspace', None) + self.display_name = kwargs.get('display_name', None) + self.status = kwargs.get('status', "Enabled") + self.export = kwargs.get('export', None) + self.disabled_data_sources = kwargs.get('disabled_data_sources', None) + self.iot_hubs = kwargs.get('iot_hubs', None) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.auto_discovered_resources = None + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) + + +class IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = kwargs.get('high', None) + self.medium = kwargs.get('medium', None) + self.low = kwargs.get('low', None) + + +class JitNetworkAccessPolicy(Model): + """JitNetworkAccessPolicy. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Kind of the resource + :type kind: str + :ivar location: Location where the resource is stored + :vartype location: str + :param virtual_machines: Required. Configurations for + Microsoft.Compute/virtualMachines resource type. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] + :param requests: + :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] + :ivar provisioning_state: Gets the provisioning state of the Just-in-Time + policy. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'virtual_machines': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, + 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicy, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kwargs.get('kind', None) + self.location = None + self.virtual_machines = kwargs.get('virtual_machines', None) + self.requests = kwargs.get('requests', None) + self.provisioning_state = None + + +class JitNetworkAccessPolicyInitiatePort(Model): + """JitNetworkAccessPolicyInitiatePort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Source of the allowed traffic. If + omitted, the request will be for the source IP address of the initiate + request. + :type allowed_source_address_prefix: str + :param end_time_utc: Required. The time to close the request in UTC + :type end_time_utc: datetime + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) + self.number = kwargs.get('number', None) + self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) + self.end_time_utc = kwargs.get('end_time_utc', None) + + +class JitNetworkAccessPolicyInitiateRequest(Model): + """JitNetworkAccessPolicyInitiateRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. A list of virtual machines & ports to + open access for + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] + """ + + _validation = { + 'virtual_machines': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) + self.virtual_machines = kwargs.get('virtual_machines', None) + + +class JitNetworkAccessPolicyInitiateVirtualMachine(Model): + """JitNetworkAccessPolicyInitiateVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports to open for the resource with the `id` + :type ports: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ports = kwargs.get('ports', None) + + +class JitNetworkAccessPolicyVirtualMachine(Model): + """JitNetworkAccessPolicyVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. Port configurations for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] + :param public_ip_address: Public IP address of the Azure Firewall that is + linked to this policy, if applicable + :type public_ip_address: str + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ports = kwargs.get('ports', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + + +class JitNetworkAccessPortRule(Model): + """JitNetworkAccessPortRule. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' + :type protocol: str or ~azure.mgmt.security.models.Protocol + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param max_request_access_duration: Required. Maximum duration requests + can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 + day + :type max_request_access_duration: str + """ + + _validation = { + 'number': {'required': True}, + 'protocol': {'required': True}, + 'max_request_access_duration': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPortRule, self).__init__(**kwargs) + self.number = kwargs.get('number', None) + self.protocol = kwargs.get('protocol', None) + self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) + self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) + self.max_request_access_duration = kwargs.get('max_request_access_duration', None) + + +class JitNetworkAccessRequest(Model): + """JitNetworkAccessRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] + :param start_time_utc: Required. The start time of the request in UTC + :type start_time_utc: datetime + :param requestor: Required. The identity of the person who made the + request + :type requestor: str + """ + + _validation = { + 'virtual_machines': {'required': True}, + 'start_time_utc': {'required': True}, + 'requestor': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, + 'requestor': {'key': 'requestor', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessRequest, self).__init__(**kwargs) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.start_time_utc = kwargs.get('start_time_utc', None) + self.requestor = kwargs.get('requestor', None) + + +class JitNetworkAccessRequestPort(Model): + """JitNetworkAccessRequestPort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param end_time_utc: Required. The date & time at which the request ends + in UTC + :type end_time_utc: datetime + :param status: Required. The status of the port. Possible values include: + 'Revoked', 'Initiated' + :type status: str or ~azure.mgmt.security.models.Status + :param status_reason: Required. A description of why the `status` has its + value. Possible values include: 'Expired', 'UserRequested', + 'NewerRequestInitiated' + :type status_reason: str or ~azure.mgmt.security.models.StatusReason + :param mapped_port: The port which is mapped to this port's `number` in + the Azure Firewall, if applicable + :type mapped_port: int + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + 'status': {'required': True}, + 'status_reason': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_reason': {'key': 'statusReason', 'type': 'str'}, + 'mapped_port': {'key': 'mappedPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessRequestPort, self).__init__(**kwargs) + self.number = kwargs.get('number', None) + self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) + self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) + self.end_time_utc = kwargs.get('end_time_utc', None) + self.status = kwargs.get('status', None) + self.status_reason = kwargs.get('status_reason', None) + self.mapped_port = kwargs.get('mapped_port', None) + + +class JitNetworkAccessRequestVirtualMachine(Model): + """JitNetworkAccessRequestVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports that were opened for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ports = kwargs.get('ports', None) + + +class Kind(Model): + """Describes an Azure resource with kind. + + :param kind: Kind of the resource + :type kind: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Kind, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class Location(Model): + """Describes an Azure resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location where the resource is stored + :vartype location: str + """ + + _validation = { + 'location': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Location, self).__init__(**kwargs) + self.location = None + + +class Operation(Model): + """Possible operation in the REST API of Microsoft.Security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation + :vartype name: str + :ivar origin: Where the operation is originated + :vartype origin: str + :param display: + :type display: ~azure.mgmt.security.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Security operation display. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar operation: The display name of the security operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _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(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PathRecommendation(Model): + """Represents a path that is recommended to be allowed and its properties. + + :param path: The full path to whitelist + :type path: str + :param action: Possible values include: 'Recommended', 'Add', 'Remove' + :type action: str or ~azure.mgmt.security.models.enum + :param type: Possible values include: 'File', 'FileHash', + 'PublisherSignature', 'ProductSignature', 'BinarySignature', + 'VersionAndAboveSignature' + :type type: str or ~azure.mgmt.security.models.enum + :param publisher_info: + :type publisher_info: ~azure.mgmt.security.models.PublisherInfo + :param common: Whether the path is commonly run on the machine + :type common: bool + :param user_sids: + :type user_sids: list[str] + :param usernames: + :type usernames: list[~azure.mgmt.security.models.UserRecommendation] + :param file_type: Possible values include: 'Exe', 'Dll', 'Msi', 'Script', + 'Executable', 'Unknown' + :type file_type: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publisher_info': {'key': 'publisherInfo', 'type': 'PublisherInfo'}, + 'common': {'key': 'common', 'type': 'bool'}, + 'user_sids': {'key': 'userSids', 'type': '[str]'}, + 'usernames': {'key': 'usernames', 'type': '[UserRecommendation]'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PathRecommendation, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.action = kwargs.get('action', None) + self.type = kwargs.get('type', None) + self.publisher_info = kwargs.get('publisher_info', None) + self.common = kwargs.get('common', None) + self.user_sids = kwargs.get('user_sids', None) + self.usernames = kwargs.get('usernames', None) + self.file_type = kwargs.get('file_type', None) + self.configuration_status = kwargs.get('configuration_status', None) + + +class Pricing(Resource): + """Pricing tier will be applied for the scope based on the resource ID. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' + :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier + :ivar free_trial_remaining_time: The duration left for the subscriptions + free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). + :vartype free_trial_remaining_time: timedelta + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'pricing_tier': {'required': True}, + 'free_trial_remaining_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, + 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(Pricing, self).__init__(**kwargs) + self.pricing_tier = kwargs.get('pricing_tier', None) + self.free_trial_remaining_time = None + + +class PricingList(Model): + """List of pricing configurations response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pricing configurations + :type value: list[~azure.mgmt.security.models.Pricing] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Pricing]'}, + } + + def __init__(self, **kwargs): + super(PricingList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PublisherInfo(Model): + """Represents the publisher information of a process/rule. + + :param publisher_name: The Subject field of the x.509 certificate used to + sign the code, using the following fields - O = Organization, L = + Locality, S = State or Province, and C = Country + :type publisher_name: str + :param product_name: The product name taken from the file's version + resource + :type product_name: str + :param binary_name: The "OriginalName" field taken from the file's version + resource + :type binary_name: str + :param version: The binary file version taken from the file's version + resource + :type version: str + """ + + _attribute_map = { + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'product_name': {'key': 'productName', 'type': 'str'}, + 'binary_name': {'key': 'binaryName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PublisherInfo, self).__init__(**kwargs) + self.publisher_name = kwargs.get('publisher_name', None) + self.product_name = kwargs.get('product_name', None) + self.binary_name = kwargs.get('binary_name', None) + self.version = kwargs.get('version', None) + + +class RecommendationConfigurationProperties(Model): + """Recommendation configuration. + + 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 recommendation_type: Required. The recommendation type. Possible + values include: 'IoT_ACRAuthentication', + 'IoT_AgentSendsUnutilizedMessages', 'IoT_Baseline', + 'IoT_EdgeHubMemOptimize', 'IoT_EdgeLoggingOptions', + 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', + 'IoT_IPFilter_DenyAll', 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', + 'IoT_PermissiveFirewallPolicy', 'IoT_PermissiveInputFirewallRules', + 'IoT_PermissiveOutputFirewallRules', 'IoT_PrivilegedDockerOptions', + 'IoT_SharedCredentials', 'IoT_VulnerableTLSCipherSuite' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar name: + :vartype name: str + :param status: Required. Recommendation status. The recommendation is not + generated when the status is disabled. Possible values include: + 'Disabled', 'Enabled'. Default value: "Enabled" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'name': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = kwargs.get('recommendation_type', None) + self.name = None + self.status = kwargs.get('status', "Enabled") + + +class RegulatoryComplianceAssessment(Resource): + """Regulatory compliance assessment details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance assessment + :vartype description: str + :ivar assessment_type: The expected type of assessment contained in the + AssessmentDetailsLink + :vartype assessment_type: str + :ivar assessment_details_link: Link to more detailed assessment results + data. The response type will be according to the assessmentType field + :vartype assessment_details_link: str + :param state: Aggregative state based on the assessment's scanned + resources states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_resources: The given assessment's related resources count + with passed state. + :vartype passed_resources: int + :ivar failed_resources: The given assessment's related resources count + with failed state. + :vartype failed_resources: int + :ivar skipped_resources: The given assessment's related resources count + with skipped state. + :vartype skipped_resources: int + :ivar unsupported_resources: The given assessment's related resources + count with unsupported state. + :vartype unsupported_resources: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'assessment_type': {'readonly': True}, + 'assessment_details_link': {'readonly': True}, + 'passed_resources': {'readonly': True}, + 'failed_resources': {'readonly': True}, + 'skipped_resources': {'readonly': True}, + 'unsupported_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, + 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, + 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, + 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceAssessment, self).__init__(**kwargs) + self.description = None + self.assessment_type = None + self.assessment_details_link = None + self.state = kwargs.get('state', None) + self.passed_resources = None + self.failed_resources = None + self.skipped_resources = None + self.unsupported_resources = None + + +class RegulatoryComplianceControl(Resource): + """Regulatory compliance control details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance control + :vartype description: str + :param state: Aggregative state based on the control's supported + assessments states. Possible values include: 'Passed', 'Failed', + 'Skipped', 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_assessments: The number of supported regulatory compliance + assessments of the given control with a passed state + :vartype passed_assessments: int + :ivar failed_assessments: The number of supported regulatory compliance + assessments of the given control with a failed state + :vartype failed_assessments: int + :ivar skipped_assessments: The number of supported regulatory compliance + assessments of the given control with a skipped state + :vartype skipped_assessments: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'passed_assessments': {'readonly': True}, + 'failed_assessments': {'readonly': True}, + 'skipped_assessments': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, + 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, + 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceControl, self).__init__(**kwargs) + self.description = None + self.state = kwargs.get('state', None) + self.passed_assessments = None + self.failed_assessments = None + self.skipped_assessments = None + + +class RegulatoryComplianceStandard(Resource): + """Regulatory compliance standard details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param state: Aggregative state based on the standard's supported controls + states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_controls: The number of supported regulatory compliance + controls of the given standard with a passed state + :vartype passed_controls: int + :ivar failed_controls: The number of supported regulatory compliance + controls of the given standard with a failed state + :vartype failed_controls: int + :ivar skipped_controls: The number of supported regulatory compliance + controls of the given standard with a skipped state + :vartype skipped_controls: int + :ivar unsupported_controls: The number of regulatory compliance controls + of the given standard which are unsupported by automated assessments + :vartype unsupported_controls: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'passed_controls': {'readonly': True}, + 'failed_controls': {'readonly': True}, + 'skipped_controls': {'readonly': True}, + 'unsupported_controls': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, + 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, + 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, + 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceStandard, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.passed_controls = None + self.failed_controls = None + self.skipped_controls = None + self.unsupported_controls = None + + +class SecurityContact(Resource): + """Contact details for security issues. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param email: Required. The email of this security contact + :type email: str + :param phone: The phone number of this security contact + :type phone: str + :param alert_notifications: Required. Whether to send security alerts + notifications to the security contact. Possible values include: 'On', + 'Off' + :type alert_notifications: str or + ~azure.mgmt.security.models.AlertNotifications + :param alerts_to_admins: Required. Whether to send security alerts + notifications to subscription admins. Possible values include: 'On', 'Off' + :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'email': {'required': True}, + 'alert_notifications': {'required': True}, + 'alerts_to_admins': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'phone': {'key': 'properties.phone', 'type': 'str'}, + 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, + 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecurityContact, self).__init__(**kwargs) + self.email = kwargs.get('email', None) + self.phone = kwargs.get('phone', None) + self.alert_notifications = kwargs.get('alert_notifications', None) + self.alerts_to_admins = kwargs.get('alerts_to_admins', None) + + +class SecurityTask(Resource): + """Security task that we recommend to do in order to strengthen security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar state: State of the task (Active, Resolved etc.) + :vartype state: str + :ivar creation_time_utc: The time this task was discovered in UTC + :vartype creation_time_utc: datetime + :param security_task_parameters: + :type security_task_parameters: + ~azure.mgmt.security.models.SecurityTaskParameters + :ivar last_state_change_time_utc: The time this task's details were last + changed in UTC + :vartype last_state_change_time_utc: datetime + :ivar sub_state: Additional data on the state of the task + :vartype sub_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time_utc': {'readonly': True}, + 'last_state_change_time_utc': {'readonly': True}, + 'sub_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, + 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, + 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, + 'sub_state': {'key': 'properties.subState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecurityTask, self).__init__(**kwargs) + self.state = None + self.creation_time_utc = None + self.security_task_parameters = kwargs.get('security_task_parameters', None) + self.last_state_change_time_utc = None + self.sub_state = None + + +class SecurityTaskParameters(Model): + """Changing set of properties, depending on the task type that is derived from + the name field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar name: Name of the task type + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecurityTaskParameters, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.name = None + + +class SensitivityLabel(Model): + """The sensitivity label. + + :param display_name: The name of the sensitivity label. + :type display_name: str + :param order: The order of the sensitivity label. + :type order: float + :param enabled: Indicates whether the label is enabled or not. + :type enabled: bool + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabel, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.order = kwargs.get('order', None) + self.enabled = kwargs.get('enabled', None) + + +class ServerVulnerabilityAssessment(Resource): + """Describes the server vulnerability assessment details on a 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: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar provisioning_state: The provisioningState of the vulnerability + assessment capability on the VM. Possible values include: 'Succeeded', + 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + :vartype provisioning_state: str or ~azure.mgmt.security.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.provisioning_state = None + + +class ServerVulnerabilityAssessmentsList(Model): + """List of server vulnerability assessments. + + :param value: + :type value: + list[~azure.mgmt.security.models.ServerVulnerabilityAssessment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessmentsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class TopologyResource(Model): + """TopologyResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the topology was + calculated + :vartype calculated_date_time: datetime + :ivar topology_resources: Azure resources which are part of this topology + resource + :vartype topology_resources: + list[~azure.mgmt.security.models.TopologySingleResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'topology_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, + } + + def __init__(self, **kwargs): + super(TopologyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.topology_resources = None + + +class TopologySingleResource(Model): + """TopologySingleResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id + :vartype resource_id: str + :ivar severity: The security severity of the resource + :vartype severity: str + :ivar recommendations_exist: Indicates if the resource has security + recommendations + :vartype recommendations_exist: bool + :ivar network_zones: Indicates the resource connectivity level to the + Internet (InternetFacing, Internal ,etc.) + :vartype network_zones: str + :ivar topology_score: Score of the resource based on its security severity + :vartype topology_score: int + :ivar location: The location of this resource + :vartype location: str + :ivar parents: Azure resources connected to this resource which are in + higher level in the topology view + :vartype parents: + list[~azure.mgmt.security.models.TopologySingleResourceParent] + :ivar children: Azure resources connected to this resource which are in + lower level in the topology view + :vartype children: + list[~azure.mgmt.security.models.TopologySingleResourceChild] + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'severity': {'readonly': True}, + 'recommendations_exist': {'readonly': True}, + 'network_zones': {'readonly': True}, + 'topology_score': {'readonly': True}, + 'location': {'readonly': True}, + 'parents': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, + 'network_zones': {'key': 'networkZones', 'type': 'str'}, + 'topology_score': {'key': 'topologyScore', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'}, + 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, + 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, + } + + def __init__(self, **kwargs): + super(TopologySingleResource, self).__init__(**kwargs) + self.resource_id = None + self.severity = None + self.recommendations_exist = None + self.network_zones = None + self.topology_score = None + self.location = None + self.parents = None + self.children = None + + +class TopologySingleResourceChild(Model): + """TopologySingleResourceChild. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as child resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TopologySingleResourceChild, self).__init__(**kwargs) + self.resource_id = None + + +class TopologySingleResourceParent(Model): + """TopologySingleResourceParent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as parent resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TopologySingleResourceParent, self).__init__(**kwargs) + self.resource_id = None + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(UpdateIotSecuritySolutionData, self).__init__(**kwargs) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.query_subscriptions = kwargs.get('query_subscriptions', None) + + +class UserRecommendation(Model): + """Represents a user that is recommended to be allowed for a certain rule. + + :param username: Represents a user that is recommended to be allowed for a + certain rule + :type username: str + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserRecommendation, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.recommendation_action = kwargs.get('recommendation_action', None) + + +class VmRecommendation(Model): + """Represents a machine that is part of a VM/server group. + + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + :param resource_id: + :type resource_id: str + """ + + _attribute_map = { + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VmRecommendation, self).__init__(**kwargs) + self.configuration_status = kwargs.get('configuration_status', None) + self.recommendation_action = kwargs.get('recommendation_action', None) + self.resource_id = kwargs.get('resource_id', None) + + +class WorkspaceSetting(Resource): + """Configures where to store the OMS agent data for workspaces under a scope. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param workspace_id: Required. The full Azure ID of the workspace to save + the data in + :type workspace_id: str + :param scope: Required. All the VMs in this scope will send their security + data to the mentioned workspace unless overridden by a setting with more + specific scope + :type scope: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace_id': {'required': True}, + 'scope': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceSetting, self).__init__(**kwargs) + self.workspace_id = kwargs.get('workspace_id', None) + self.scope = kwargs.get('scope', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py new file mode 100644 index 000000000000..55592fee92b4 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py @@ -0,0 +1,3439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 +from msrest.exceptions import HttpOperationError + + +class AadConnectivityState1(Model): + """Describes an Azure resource with kind. + + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, *, connectivity_state=None, **kwargs) -> None: + super(AadConnectivityState1, self).__init__(**kwargs) + self.connectivity_state = connectivity_state + + +class ExternalSecuritySolution(Model): + """Represents a security solution external to Azure Security Center which + sends information to an OMS workspace and whose data is displayed by Azure + Security Center. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, + AadExternalSecuritySolution + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} + } + + def __init__(self, **kwargs) -> None: + super(ExternalSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.kind = None + + +class AadExternalSecuritySolution(ExternalSecuritySolution): + """Represents an AAD identity protection solution which sends logs to an OMS + workspace. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AadSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AadExternalSecuritySolution, self).__init__(**kwargs) + self.properties = properties + self.kind = 'AAD' + + +class AadSolutionProperties(Model): + """The external security solution properties for AAD solutions. + + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, *, device_vendor: str=None, device_type: str=None, workspace=None, connectivity_state=None, **kwargs) -> None: + super(AadSolutionProperties, self).__init__(**kwargs) + self.device_vendor = device_vendor + self.device_type = device_type + self.workspace = workspace + self.connectivity_state = connectivity_state + + +class Resource(Model): + """Describes an Azure 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: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AdvancedThreatProtectionSetting(Resource): + """The Advanced Threat Protection 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: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param is_enabled: Indicates whether Advanced Threat Protection is + enabled. + :type is_enabled: bool + """ + + _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'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, is_enabled: bool=None, **kwargs) -> None: + super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) + self.is_enabled = is_enabled + + +class Alert(Resource): + """Security alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar state: State of the alert (Active, Dismissed etc.) + :vartype state: str + :ivar reported_time_utc: The time the incident was reported to + Microsoft.Security in UTC + :vartype reported_time_utc: datetime + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar alert_name: Name of the alert type + :vartype alert_name: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar detected_time_utc: The time the incident was detected by the vendor + :vartype detected_time_utc: datetime + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar remediation_steps: Recommended steps to reradiate the incident + :vartype remediation_steps: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar compromised_entity: The entity that the incident happened on + :vartype compromised_entity: str + :ivar associated_resource: Azure resource ID of the associated resource + :vartype associated_resource: str + :param extended_properties: + :type extended_properties: dict[str, object] + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar can_be_investigated: Whether this alert can be investigated with + Azure Security Center + :vartype can_be_investigated: bool + :ivar is_incident: Whether this alert is for incident type or not + (otherwise - single alert) + :vartype is_incident: bool + :param entities: objects that are related to this alerts + :type entities: list[~azure.mgmt.security.models.AlertEntity] + :ivar confidence_score: level of confidence we have on the alert + :vartype confidence_score: float + :param confidence_reasons: reasons the alert got the confidenceScore value + :type confidence_reasons: + list[~azure.mgmt.security.models.AlertConfidenceReason] + :ivar subscription_id: Azure subscription ID of the resource that had the + security alert or the subscription ID of the workspace that this resource + reports to + :vartype subscription_id: str + :ivar instance_id: Instance ID of the alert. + :vartype instance_id: str + :ivar workspace_arm_id: Azure resource ID of the workspace that the alert + was reported to. + :vartype workspace_arm_id: str + :ivar correlation_key: Alerts with the same CorrelationKey will be grouped + together in Ibiza. + :vartype correlation_key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'reported_time_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'alert_name': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'detected_time_utc': {'readonly': True}, + 'description': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'compromised_entity': {'readonly': True}, + 'associated_resource': {'readonly': True}, + 'system_source': {'readonly': True}, + 'can_be_investigated': {'readonly': True}, + 'is_incident': {'readonly': True}, + 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, + 'subscription_id': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'workspace_arm_id': {'readonly': True}, + 'correlation_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, + 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, + 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, + 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, + 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, + 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, + 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, + } + + def __init__(self, *, extended_properties=None, entities=None, confidence_reasons=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.state = None + self.reported_time_utc = None + self.vendor_name = None + self.alert_name = None + self.alert_display_name = None + self.detected_time_utc = None + self.description = None + self.remediation_steps = None + self.action_taken = None + self.reported_severity = None + self.compromised_entity = None + self.associated_resource = None + self.extended_properties = extended_properties + self.system_source = None + self.can_be_investigated = None + self.is_incident = None + self.entities = entities + self.confidence_score = None + self.confidence_reasons = confidence_reasons + self.subscription_id = None + self.instance_id = None + self.workspace_arm_id = None + self.correlation_key = None + + +class AlertConfidenceReason(Model): + """Factors that increase our confidence that the alert is a true positive. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Type of confidence factor + :vartype type: str + :ivar reason: description of the confidence reason + :vartype reason: str + """ + + _validation = { + 'type': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AlertConfidenceReason, self).__init__(**kwargs) + self.type = None + self.reason = None + + +class AlertEntity(Model): + """Changing set of properties depending on the entity type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: Type of entity + :vartype type: str + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(AlertEntity, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = None + + +class AllowedConnectionsResource(Model): + """The resource whose properties describes the allowed traffic between Azure + resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the allowed connections + resource was calculated + :vartype calculated_date_time: datetime + :ivar connectable_resources: List of connectable resources + :vartype connectable_resources: + list[~azure.mgmt.security.models.ConnectableResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'connectable_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(AllowedConnectionsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.connectable_resources = None + + +class AppWhitelistingGroup(Model): + """AppWhitelistingGroup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_status: Possible values include: 'Recommended', + 'NotRecommended', 'NotAvailable', 'NoStatus' + :type recommendation_status: str or ~azure.mgmt.security.models.enum + :param issues: + :type issues: + list[~azure.mgmt.security.models.AppWhitelistingIssueSummary] + :param source_system: Possible values include: 'Azure_AppLocker', + 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' + :type source_system: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'enforcement_mode': {'key': 'properties.enforcementMode', 'type': 'str'}, + 'configuration_status': {'key': 'properties.configurationStatus', 'type': 'str'}, + 'recommendation_status': {'key': 'properties.recommendationStatus', 'type': 'str'}, + 'issues': {'key': 'properties.issues', 'type': '[AppWhitelistingIssueSummary]'}, + 'source_system': {'key': 'properties.sourceSystem', 'type': 'str'}, + 'vm_recommendations': {'key': 'properties.vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, *, enforcement_mode=None, configuration_status=None, recommendation_status=None, issues=None, source_system=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + super(AppWhitelistingGroup, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.enforcement_mode = enforcement_mode + self.configuration_status = configuration_status + self.recommendation_status = recommendation_status + self.issues = issues + self.source_system = source_system + self.vm_recommendations = vm_recommendations + self.path_recommendations = path_recommendations + + +class AppWhitelistingGroups(Model): + """Represents a list of VM/server groups and set of rules that are Recommended + by Azure Security Center to be allowed. + + :param value: + :type value: list[~azure.mgmt.security.models.AppWhitelistingGroup] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppWhitelistingGroup]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(AppWhitelistingGroups, self).__init__(**kwargs) + self.value = value + + +class AppWhitelistingIssueSummary(Model): + """Represents a summary of the alerts of the VM/server group. + + :param issue: Possible values include: 'ViolationsAudited', + 'ViolationsBlocked', 'MsiAndScriptViolationsAudited', + 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', + 'RulesViolatedManually' + :type issue: str or ~azure.mgmt.security.models.enum + :param number_of_vms: The number of machines in the VM/server group that + have this alert + :type number_of_vms: float + """ + + _attribute_map = { + 'issue': {'key': 'issue', 'type': 'str'}, + 'number_of_vms': {'key': 'numberOfVms', 'type': 'float'}, + } + + def __init__(self, *, issue=None, number_of_vms: float=None, **kwargs) -> None: + super(AppWhitelistingIssueSummary, self).__init__(**kwargs) + self.issue = issue + self.number_of_vms = number_of_vms + + +class AppWhitelistingPutGroupData(Model): + """The altered data of the recommended VM/server group policy. + + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + 'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, *, enforcement_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + super(AppWhitelistingPutGroupData, self).__init__(**kwargs) + self.enforcement_mode = enforcement_mode + self.vm_recommendations = vm_recommendations + self.path_recommendations = path_recommendations + + +class AscLocation(Resource): + """The ASC location of the subscription is in the "name" field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param properties: + :type properties: object + """ + + _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': 'object'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AscLocation, self).__init__(**kwargs) + self.properties = properties + + +class AtaExternalSecuritySolution(ExternalSecuritySolution): + """Represents an ATA security solution which sends logs to an OMS workspace. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AtaSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AtaExternalSecuritySolution, self).__init__(**kwargs) + self.properties = properties + self.kind = 'ATA' + + +class ExternalSecuritySolutionProperties(Model): + """The solution properties (correspond to the solution kind). + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + } + + def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, **kwargs) -> None: + super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.device_vendor = device_vendor + self.device_type = device_type + self.workspace = workspace + + +class AtaSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for ATA solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, last_event_received: str=None, **kwargs) -> None: + super(AtaSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) + self.last_event_received = last_event_received + + +class AutoProvisioningSetting(Resource): + """Auto provisioning setting. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param auto_provision: Required. Describes what kind of security agent + provisioning action to take. Possible values include: 'On', 'Off' + :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'auto_provision': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, + } + + def __init__(self, *, auto_provision, **kwargs) -> None: + super(AutoProvisioningSetting, self).__init__(**kwargs) + self.auto_provision = auto_provision + + +class CefExternalSecuritySolution(ExternalSecuritySolution): + """Represents a security solution which sends CEF logs to an OMS workspace. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.CefSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CefExternalSecuritySolution, self).__init__(**kwargs) + self.properties = properties + self.kind = 'CEF' + + +class CefSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for CEF solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param hostname: + :type hostname: str + :param agent: + :type agent: str + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + 'agent': {'key': 'agent', 'type': 'str'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, hostname: str=None, agent: str=None, last_event_received: str=None, **kwargs) -> None: + super(CefSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) + self.hostname = hostname + self.agent = agent + self.last_event_received = last_event_received + + +class CloudError(Model): + """Error response structure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for + display in a user interface. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class Compliance(Resource): + """Compliance of a scope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar assessment_timestamp_utc_date: The timestamp when the Compliance + calculation was conducted. + :vartype assessment_timestamp_utc_date: datetime + :ivar resource_count: The resource count of the given subscription for + which the Compliance calculation was conducted (needed for Management + Group Compliance calculation). + :vartype resource_count: int + :ivar assessment_result: An array of segment, which is the actually the + compliance assessment. + :vartype assessment_result: + list[~azure.mgmt.security.models.ComplianceSegment] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'assessment_timestamp_utc_date': {'readonly': True}, + 'resource_count': {'readonly': True}, + 'assessment_result': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, + 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, + 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, + } + + def __init__(self, **kwargs) -> None: + super(Compliance, self).__init__(**kwargs) + self.assessment_timestamp_utc_date = None + self.resource_count = None + self.assessment_result = None + + +class ComplianceResult(Resource): + """a compliance result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar resource_status: The status of the resource regarding a single + assessment. Possible values include: 'Healthy', 'NotApplicable', + 'OffByPolicy', 'NotHealthy' + :vartype resource_status: str or + ~azure.mgmt.security.models.ResourceStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_status': {'key': 'properties.resourceStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComplianceResult, self).__init__(**kwargs) + self.resource_status = None + + +class ComplianceSegment(Model): + """A segment of a compliance assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar segment_type: The segment type, e.g. compliant, non-compliance, + insufficient coverage, N/A, etc. + :vartype segment_type: str + :ivar percentage: The size (%) of the segment. + :vartype percentage: float + """ + + _validation = { + 'segment_type': {'readonly': True}, + 'percentage': {'readonly': True}, + } + + _attribute_map = { + 'segment_type': {'key': 'segmentType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(ComplianceSegment, self).__init__(**kwargs) + self.segment_type = None + self.percentage = None + + +class ConnectableResource(Model): + """Describes the allowed inbound and outbound traffic of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The Azure resource id + :vartype id: str + :ivar inbound_connected_resources: The list of Azure resources that the + resource has inbound allowed connection from + :vartype inbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + :ivar outbound_connected_resources: The list of Azure resources that the + resource has outbound allowed connection to + :vartype outbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'inbound_connected_resources': {'readonly': True}, + 'outbound_connected_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, + 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectableResource, self).__init__(**kwargs) + self.id = None + self.inbound_connected_resources = None + self.outbound_connected_resources = None + + +class ConnectedResource(Model): + """Describes properties of a connected resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connected_resource_id: The Azure resource id of the connected + resource + :vartype connected_resource_id: str + :ivar tcp_ports: The allowed tcp ports + :vartype tcp_ports: str + :ivar udp_ports: The allowed udp ports + :vartype udp_ports: str + """ + + _validation = { + 'connected_resource_id': {'readonly': True}, + 'tcp_ports': {'readonly': True}, + 'udp_ports': {'readonly': True}, + } + + _attribute_map = { + 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, + 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, + 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectedResource, self).__init__(**kwargs) + self.connected_resource_id = None + self.tcp_ports = None + self.udp_ports = None + + +class ConnectedWorkspace(Model): + """Represents an OMS workspace to which the solution is connected. + + :param id: Azure resource ID of the connected OMS workspace + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ConnectedWorkspace, self).__init__(**kwargs) + self.id = id + + +class SettingResource(Resource): + """The kind of the security setting. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind, **kwargs) -> None: + super(SettingResource, self).__init__(**kwargs) + self.kind = kind + + +class Setting(SettingResource): + """Represents a security setting in Azure Security Center. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind, **kwargs) -> None: + super(Setting, self).__init__(kind=kind, **kwargs) + + +class DataExportSetting(Setting): + """Represents a data export setting. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + :param enabled: Required. Is the data export setting is enabled + :type enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, kind, enabled: bool, **kwargs) -> None: + super(DataExportSetting, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + + +class DiscoveredSecuritySolution(Model): + """DiscoveredSecuritySolution. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param security_family: Required. The security family of the discovered + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param offer: Required. The security solutions' image offer + :type offer: str + :param publisher: Required. The security solutions' image publisher + :type publisher: str + :param sku: Required. The security solutions' image sku + :type sku: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'offer': {'required': True}, + 'publisher': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, + 'offer': {'key': 'properties.offer', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, *, security_family, offer: str, publisher: str, sku: str, **kwargs) -> None: + super(DiscoveredSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = security_family + self.offer = offer + self.publisher = publisher + self.sku = sku + + +class ExternalSecuritySolutionKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the external solution. Possible values include: + 'CEF', 'ATA', 'AAD' + :type kind: str or + ~azure.mgmt.security.models.ExternalSecuritySolutionKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) + self.kind = kind + + +class InformationProtectionKeyword(Model): + """The information type keyword. + + :param pattern: The keyword pattern. + :type pattern: str + :param custom: Indicates whether the keyword is custom or not. + :type custom: bool + :param can_be_numeric: Indicates whether the keyword can be applied on + numeric types or not. + :type can_be_numeric: bool + :param excluded: Indicates whether the keyword is excluded or not. + :type excluded: bool + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, + 'excluded': {'key': 'excluded', 'type': 'bool'}, + } + + def __init__(self, *, pattern: str=None, custom: bool=None, can_be_numeric: bool=None, excluded: bool=None, **kwargs) -> None: + super(InformationProtectionKeyword, self).__init__(**kwargs) + self.pattern = pattern + self.custom = custom + self.can_be_numeric = can_be_numeric + self.excluded = excluded + + +class InformationProtectionPolicy(Resource): + """Information protection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar last_modified_utc: Describes the last UTC time the policy was + modified. + :vartype last_modified_utc: datetime + :param labels: Dictionary of sensitivity labels. + :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] + :param information_types: The sensitivity information types. + :type information_types: dict[str, + ~azure.mgmt.security.models.InformationType] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_utc': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, + 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, + 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, + } + + def __init__(self, *, labels=None, information_types=None, **kwargs) -> None: + super(InformationProtectionPolicy, self).__init__(**kwargs) + self.last_modified_utc = None + self.labels = labels + self.information_types = information_types + + +class InformationType(Model): + """The information type. + + :param display_name: The name of the information type. + :type display_name: str + :param order: The order of the information type. + :type order: float + :param recommended_label_id: The recommended label id to be associated + with this information type. + :type recommended_label_id: str + :param enabled: Indicates whether the information type is enabled or not. + :type enabled: bool + :param custom: Indicates whether the information type is custom or not. + :type custom: bool + :param keywords: The information type keywords. + :type keywords: + list[~azure.mgmt.security.models.InformationProtectionKeyword] + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, + } + + def __init__(self, *, display_name: str=None, order: float=None, recommended_label_id: str=None, enabled: bool=None, custom: bool=None, keywords=None, **kwargs) -> None: + super(InformationType, self).__init__(**kwargs) + self.display_name = display_name + self.order = order + self.recommended_label_id = recommended_label_id + self.enabled = enabled + self.custom = custom + self.keywords = keywords + + +class IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar aggregated_date_utc: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, recommendation_name: str=None, **kwargs) -> None: + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.recommendation_name = recommendation_name + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None + + +class IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = value + + +class IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + 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 value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None + + +class IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = value + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, *, top_alerted_devices=None, most_prevalent_device_alerts=None, most_prevalent_device_recommendations=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = top_alerted_devices + self.most_prevalent_device_alerts = most_prevalent_device_alerts + self.most_prevalent_device_recommendations = most_prevalent_device_recommendations + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + 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 value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, *, date_property=None, devices_metrics=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = date_property + self.devices_metrics = devices_metrics + + +class IoTSecuritySolutionModel(Model): + """Security Solution. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'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'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, workspace: str, display_name: str, iot_hubs, tags=None, location: str=None, status="Enabled", export=None, disabled_data_sources=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.location = location + self.workspace = workspace + self.display_name = display_name + self.status = status + self.export = export + self.disabled_data_sources = disabled_data_sources + self.iot_hubs = iot_hubs + self.user_defined_resources = user_defined_resources + self.auto_discovered_resources = None + self.recommendations_configuration = recommendations_configuration + + +class IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, *, high: int=None, medium: int=None, low: int=None, **kwargs) -> None: + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = high + self.medium = medium + self.low = low + + +class JitNetworkAccessPolicy(Model): + """JitNetworkAccessPolicy. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Kind of the resource + :type kind: str + :ivar location: Location where the resource is stored + :vartype location: str + :param virtual_machines: Required. Configurations for + Microsoft.Compute/virtualMachines resource type. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] + :param requests: + :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] + :ivar provisioning_state: Gets the provisioning state of the Just-in-Time + policy. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'virtual_machines': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, + 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, virtual_machines, kind: str=None, requests=None, **kwargs) -> None: + super(JitNetworkAccessPolicy, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kind + self.location = None + self.virtual_machines = virtual_machines + self.requests = requests + self.provisioning_state = None + + +class JitNetworkAccessPolicyInitiatePort(Model): + """JitNetworkAccessPolicyInitiatePort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Source of the allowed traffic. If + omitted, the request will be for the source IP address of the initiate + request. + :type allowed_source_address_prefix: str + :param end_time_utc: Required. The time to close the request in UTC + :type end_time_utc: datetime + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, number: int, end_time_utc, allowed_source_address_prefix: str=None, **kwargs) -> None: + super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) + self.number = number + self.allowed_source_address_prefix = allowed_source_address_prefix + self.end_time_utc = end_time_utc + + +class JitNetworkAccessPolicyInitiateRequest(Model): + """JitNetworkAccessPolicyInitiateRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. A list of virtual machines & ports to + open access for + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] + """ + + _validation = { + 'virtual_machines': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, + } + + def __init__(self, *, virtual_machines, **kwargs) -> None: + super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) + self.virtual_machines = virtual_machines + + +class JitNetworkAccessPolicyInitiateVirtualMachine(Model): + """JitNetworkAccessPolicyInitiateVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports to open for the resource with the `id` + :type ports: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, + } + + def __init__(self, *, id: str, ports, **kwargs) -> None: + super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) + self.id = id + self.ports = ports + + +class JitNetworkAccessPolicyVirtualMachine(Model): + """JitNetworkAccessPolicyVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. Port configurations for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] + :param public_ip_address: Public IP address of the Azure Firewall that is + linked to this policy, if applicable + :type public_ip_address: str + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + } + + def __init__(self, *, id: str, ports, public_ip_address: str=None, **kwargs) -> None: + super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) + self.id = id + self.ports = ports + self.public_ip_address = public_ip_address + + +class JitNetworkAccessPortRule(Model): + """JitNetworkAccessPortRule. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' + :type protocol: str or ~azure.mgmt.security.models.Protocol + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param max_request_access_duration: Required. Maximum duration requests + can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 + day + :type max_request_access_duration: str + """ + + _validation = { + 'number': {'required': True}, + 'protocol': {'required': True}, + 'max_request_access_duration': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, + } + + def __init__(self, *, number: int, protocol, max_request_access_duration: str, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, **kwargs) -> None: + super(JitNetworkAccessPortRule, self).__init__(**kwargs) + self.number = number + self.protocol = protocol + self.allowed_source_address_prefix = allowed_source_address_prefix + self.allowed_source_address_prefixes = allowed_source_address_prefixes + self.max_request_access_duration = max_request_access_duration + + +class JitNetworkAccessRequest(Model): + """JitNetworkAccessRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] + :param start_time_utc: Required. The start time of the request in UTC + :type start_time_utc: datetime + :param requestor: Required. The identity of the person who made the + request + :type requestor: str + """ + + _validation = { + 'virtual_machines': {'required': True}, + 'start_time_utc': {'required': True}, + 'requestor': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, + 'requestor': {'key': 'requestor', 'type': 'str'}, + } + + def __init__(self, *, virtual_machines, start_time_utc, requestor: str, **kwargs) -> None: + super(JitNetworkAccessRequest, self).__init__(**kwargs) + self.virtual_machines = virtual_machines + self.start_time_utc = start_time_utc + self.requestor = requestor + + +class JitNetworkAccessRequestPort(Model): + """JitNetworkAccessRequestPort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param end_time_utc: Required. The date & time at which the request ends + in UTC + :type end_time_utc: datetime + :param status: Required. The status of the port. Possible values include: + 'Revoked', 'Initiated' + :type status: str or ~azure.mgmt.security.models.Status + :param status_reason: Required. A description of why the `status` has its + value. Possible values include: 'Expired', 'UserRequested', + 'NewerRequestInitiated' + :type status_reason: str or ~azure.mgmt.security.models.StatusReason + :param mapped_port: The port which is mapped to this port's `number` in + the Azure Firewall, if applicable + :type mapped_port: int + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + 'status': {'required': True}, + 'status_reason': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_reason': {'key': 'statusReason', 'type': 'str'}, + 'mapped_port': {'key': 'mappedPort', 'type': 'int'}, + } + + def __init__(self, *, number: int, end_time_utc, status, status_reason, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, mapped_port: int=None, **kwargs) -> None: + super(JitNetworkAccessRequestPort, self).__init__(**kwargs) + self.number = number + self.allowed_source_address_prefix = allowed_source_address_prefix + self.allowed_source_address_prefixes = allowed_source_address_prefixes + self.end_time_utc = end_time_utc + self.status = status + self.status_reason = status_reason + self.mapped_port = mapped_port + + +class JitNetworkAccessRequestVirtualMachine(Model): + """JitNetworkAccessRequestVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports that were opened for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, + } + + def __init__(self, *, id: str, ports, **kwargs) -> None: + super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) + self.id = id + self.ports = ports + + +class Kind(Model): + """Describes an Azure resource with kind. + + :param kind: Kind of the resource + :type kind: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(Kind, self).__init__(**kwargs) + self.kind = kind + + +class Location(Model): + """Describes an Azure resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location where the resource is stored + :vartype location: str + """ + + _validation = { + 'location': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Location, self).__init__(**kwargs) + self.location = None + + +class Operation(Model): + """Possible operation in the REST API of Microsoft.Security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation + :vartype name: str + :ivar origin: Where the operation is originated + :vartype origin: str + :param display: + :type display: ~azure.mgmt.security.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = display + + +class OperationDisplay(Model): + """Security operation display. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar operation: The display name of the security operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _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) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PathRecommendation(Model): + """Represents a path that is recommended to be allowed and its properties. + + :param path: The full path to whitelist + :type path: str + :param action: Possible values include: 'Recommended', 'Add', 'Remove' + :type action: str or ~azure.mgmt.security.models.enum + :param type: Possible values include: 'File', 'FileHash', + 'PublisherSignature', 'ProductSignature', 'BinarySignature', + 'VersionAndAboveSignature' + :type type: str or ~azure.mgmt.security.models.enum + :param publisher_info: + :type publisher_info: ~azure.mgmt.security.models.PublisherInfo + :param common: Whether the path is commonly run on the machine + :type common: bool + :param user_sids: + :type user_sids: list[str] + :param usernames: + :type usernames: list[~azure.mgmt.security.models.UserRecommendation] + :param file_type: Possible values include: 'Exe', 'Dll', 'Msi', 'Script', + 'Executable', 'Unknown' + :type file_type: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publisher_info': {'key': 'publisherInfo', 'type': 'PublisherInfo'}, + 'common': {'key': 'common', 'type': 'bool'}, + 'user_sids': {'key': 'userSids', 'type': '[str]'}, + 'usernames': {'key': 'usernames', 'type': '[UserRecommendation]'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, action=None, type=None, publisher_info=None, common: bool=None, user_sids=None, usernames=None, file_type=None, configuration_status=None, **kwargs) -> None: + super(PathRecommendation, self).__init__(**kwargs) + self.path = path + self.action = action + self.type = type + self.publisher_info = publisher_info + self.common = common + self.user_sids = user_sids + self.usernames = usernames + self.file_type = file_type + self.configuration_status = configuration_status + + +class Pricing(Resource): + """Pricing tier will be applied for the scope based on the resource ID. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' + :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier + :ivar free_trial_remaining_time: The duration left for the subscriptions + free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). + :vartype free_trial_remaining_time: timedelta + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'pricing_tier': {'required': True}, + 'free_trial_remaining_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, + 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, + } + + def __init__(self, *, pricing_tier, **kwargs) -> None: + super(Pricing, self).__init__(**kwargs) + self.pricing_tier = pricing_tier + self.free_trial_remaining_time = None + + +class PricingList(Model): + """List of pricing configurations response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pricing configurations + :type value: list[~azure.mgmt.security.models.Pricing] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Pricing]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(PricingList, self).__init__(**kwargs) + self.value = value + + +class PublisherInfo(Model): + """Represents the publisher information of a process/rule. + + :param publisher_name: The Subject field of the x.509 certificate used to + sign the code, using the following fields - O = Organization, L = + Locality, S = State or Province, and C = Country + :type publisher_name: str + :param product_name: The product name taken from the file's version + resource + :type product_name: str + :param binary_name: The "OriginalName" field taken from the file's version + resource + :type binary_name: str + :param version: The binary file version taken from the file's version + resource + :type version: str + """ + + _attribute_map = { + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'product_name': {'key': 'productName', 'type': 'str'}, + 'binary_name': {'key': 'binaryName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, publisher_name: str=None, product_name: str=None, binary_name: str=None, version: str=None, **kwargs) -> None: + super(PublisherInfo, self).__init__(**kwargs) + self.publisher_name = publisher_name + self.product_name = product_name + self.binary_name = binary_name + self.version = version + + +class RecommendationConfigurationProperties(Model): + """Recommendation configuration. + + 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 recommendation_type: Required. The recommendation type. Possible + values include: 'IoT_ACRAuthentication', + 'IoT_AgentSendsUnutilizedMessages', 'IoT_Baseline', + 'IoT_EdgeHubMemOptimize', 'IoT_EdgeLoggingOptions', + 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', + 'IoT_IPFilter_DenyAll', 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', + 'IoT_PermissiveFirewallPolicy', 'IoT_PermissiveInputFirewallRules', + 'IoT_PermissiveOutputFirewallRules', 'IoT_PrivilegedDockerOptions', + 'IoT_SharedCredentials', 'IoT_VulnerableTLSCipherSuite' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar name: + :vartype name: str + :param status: Required. Recommendation status. The recommendation is not + generated when the status is disabled. Possible values include: + 'Disabled', 'Enabled'. Default value: "Enabled" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'name': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, recommendation_type, status="Enabled", **kwargs) -> None: + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = recommendation_type + self.name = None + self.status = status + + +class RegulatoryComplianceAssessment(Resource): + """Regulatory compliance assessment details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance assessment + :vartype description: str + :ivar assessment_type: The expected type of assessment contained in the + AssessmentDetailsLink + :vartype assessment_type: str + :ivar assessment_details_link: Link to more detailed assessment results + data. The response type will be according to the assessmentType field + :vartype assessment_details_link: str + :param state: Aggregative state based on the assessment's scanned + resources states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_resources: The given assessment's related resources count + with passed state. + :vartype passed_resources: int + :ivar failed_resources: The given assessment's related resources count + with failed state. + :vartype failed_resources: int + :ivar skipped_resources: The given assessment's related resources count + with skipped state. + :vartype skipped_resources: int + :ivar unsupported_resources: The given assessment's related resources + count with unsupported state. + :vartype unsupported_resources: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'assessment_type': {'readonly': True}, + 'assessment_details_link': {'readonly': True}, + 'passed_resources': {'readonly': True}, + 'failed_resources': {'readonly': True}, + 'skipped_resources': {'readonly': True}, + 'unsupported_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, + 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, + 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, + 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceAssessment, self).__init__(**kwargs) + self.description = None + self.assessment_type = None + self.assessment_details_link = None + self.state = state + self.passed_resources = None + self.failed_resources = None + self.skipped_resources = None + self.unsupported_resources = None + + +class RegulatoryComplianceControl(Resource): + """Regulatory compliance control details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance control + :vartype description: str + :param state: Aggregative state based on the control's supported + assessments states. Possible values include: 'Passed', 'Failed', + 'Skipped', 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_assessments: The number of supported regulatory compliance + assessments of the given control with a passed state + :vartype passed_assessments: int + :ivar failed_assessments: The number of supported regulatory compliance + assessments of the given control with a failed state + :vartype failed_assessments: int + :ivar skipped_assessments: The number of supported regulatory compliance + assessments of the given control with a skipped state + :vartype skipped_assessments: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'passed_assessments': {'readonly': True}, + 'failed_assessments': {'readonly': True}, + 'skipped_assessments': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, + 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, + 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceControl, self).__init__(**kwargs) + self.description = None + self.state = state + self.passed_assessments = None + self.failed_assessments = None + self.skipped_assessments = None + + +class RegulatoryComplianceStandard(Resource): + """Regulatory compliance standard details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param state: Aggregative state based on the standard's supported controls + states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_controls: The number of supported regulatory compliance + controls of the given standard with a passed state + :vartype passed_controls: int + :ivar failed_controls: The number of supported regulatory compliance + controls of the given standard with a failed state + :vartype failed_controls: int + :ivar skipped_controls: The number of supported regulatory compliance + controls of the given standard with a skipped state + :vartype skipped_controls: int + :ivar unsupported_controls: The number of regulatory compliance controls + of the given standard which are unsupported by automated assessments + :vartype unsupported_controls: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'passed_controls': {'readonly': True}, + 'failed_controls': {'readonly': True}, + 'skipped_controls': {'readonly': True}, + 'unsupported_controls': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, + 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, + 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, + 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceStandard, self).__init__(**kwargs) + self.state = state + self.passed_controls = None + self.failed_controls = None + self.skipped_controls = None + self.unsupported_controls = None + + +class SecurityContact(Resource): + """Contact details for security issues. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param email: Required. The email of this security contact + :type email: str + :param phone: The phone number of this security contact + :type phone: str + :param alert_notifications: Required. Whether to send security alerts + notifications to the security contact. Possible values include: 'On', + 'Off' + :type alert_notifications: str or + ~azure.mgmt.security.models.AlertNotifications + :param alerts_to_admins: Required. Whether to send security alerts + notifications to subscription admins. Possible values include: 'On', 'Off' + :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'email': {'required': True}, + 'alert_notifications': {'required': True}, + 'alerts_to_admins': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'phone': {'key': 'properties.phone', 'type': 'str'}, + 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, + 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, + } + + def __init__(self, *, email: str, alert_notifications, alerts_to_admins, phone: str=None, **kwargs) -> None: + super(SecurityContact, self).__init__(**kwargs) + self.email = email + self.phone = phone + self.alert_notifications = alert_notifications + self.alerts_to_admins = alerts_to_admins + + +class SecurityTask(Resource): + """Security task that we recommend to do in order to strengthen security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar state: State of the task (Active, Resolved etc.) + :vartype state: str + :ivar creation_time_utc: The time this task was discovered in UTC + :vartype creation_time_utc: datetime + :param security_task_parameters: + :type security_task_parameters: + ~azure.mgmt.security.models.SecurityTaskParameters + :ivar last_state_change_time_utc: The time this task's details were last + changed in UTC + :vartype last_state_change_time_utc: datetime + :ivar sub_state: Additional data on the state of the task + :vartype sub_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time_utc': {'readonly': True}, + 'last_state_change_time_utc': {'readonly': True}, + 'sub_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, + 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, + 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, + 'sub_state': {'key': 'properties.subState', 'type': 'str'}, + } + + def __init__(self, *, security_task_parameters=None, **kwargs) -> None: + super(SecurityTask, self).__init__(**kwargs) + self.state = None + self.creation_time_utc = None + self.security_task_parameters = security_task_parameters + self.last_state_change_time_utc = None + self.sub_state = None + + +class SecurityTaskParameters(Model): + """Changing set of properties, depending on the task type that is derived from + the name field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar name: Name of the task type + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(SecurityTaskParameters, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.name = None + + +class SensitivityLabel(Model): + """The sensitivity label. + + :param display_name: The name of the sensitivity label. + :type display_name: str + :param order: The order of the sensitivity label. + :type order: float + :param enabled: Indicates whether the label is enabled or not. + :type enabled: bool + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, display_name: str=None, order: float=None, enabled: bool=None, **kwargs) -> None: + super(SensitivityLabel, self).__init__(**kwargs) + self.display_name = display_name + self.order = order + self.enabled = enabled + + +class ServerVulnerabilityAssessment(Resource): + """Describes the server vulnerability assessment details on a 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: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar provisioning_state: The provisioningState of the vulnerability + assessment capability on the VM. Possible values include: 'Succeeded', + 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + :vartype provisioning_state: str or ~azure.mgmt.security.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.provisioning_state = None + + +class ServerVulnerabilityAssessmentsList(Model): + """List of server vulnerability assessments. + + :param value: + :type value: + list[~azure.mgmt.security.models.ServerVulnerabilityAssessment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ServerVulnerabilityAssessmentsList, self).__init__(**kwargs) + self.value = value + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.tags = tags + + +class TopologyResource(Model): + """TopologyResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the topology was + calculated + :vartype calculated_date_time: datetime + :ivar topology_resources: Azure resources which are part of this topology + resource + :vartype topology_resources: + list[~azure.mgmt.security.models.TopologySingleResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'topology_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.topology_resources = None + + +class TopologySingleResource(Model): + """TopologySingleResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id + :vartype resource_id: str + :ivar severity: The security severity of the resource + :vartype severity: str + :ivar recommendations_exist: Indicates if the resource has security + recommendations + :vartype recommendations_exist: bool + :ivar network_zones: Indicates the resource connectivity level to the + Internet (InternetFacing, Internal ,etc.) + :vartype network_zones: str + :ivar topology_score: Score of the resource based on its security severity + :vartype topology_score: int + :ivar location: The location of this resource + :vartype location: str + :ivar parents: Azure resources connected to this resource which are in + higher level in the topology view + :vartype parents: + list[~azure.mgmt.security.models.TopologySingleResourceParent] + :ivar children: Azure resources connected to this resource which are in + lower level in the topology view + :vartype children: + list[~azure.mgmt.security.models.TopologySingleResourceChild] + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'severity': {'readonly': True}, + 'recommendations_exist': {'readonly': True}, + 'network_zones': {'readonly': True}, + 'topology_score': {'readonly': True}, + 'location': {'readonly': True}, + 'parents': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, + 'network_zones': {'key': 'networkZones', 'type': 'str'}, + 'topology_score': {'key': 'topologyScore', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'}, + 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, + 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologySingleResource, self).__init__(**kwargs) + self.resource_id = None + self.severity = None + self.recommendations_exist = None + self.network_zones = None + self.topology_score = None + self.location = None + self.parents = None + self.children = None + + +class TopologySingleResourceChild(Model): + """TopologySingleResourceChild. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as child resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologySingleResourceChild, self).__init__(**kwargs) + self.resource_id = None + + +class TopologySingleResourceParent(Model): + """TopologySingleResourceParent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as parent resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologySingleResourceParent, self).__init__(**kwargs) + self.resource_id = None + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, tags=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(UpdateIotSecuritySolutionData, self).__init__(tags=tags, **kwargs) + self.user_defined_resources = user_defined_resources + self.recommendations_configuration = recommendations_configuration + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, *, query: str, query_subscriptions, **kwargs) -> None: + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = query + self.query_subscriptions = query_subscriptions + + +class UserRecommendation(Model): + """Represents a user that is recommended to be allowed for a certain rule. + + :param username: Represents a user that is recommended to be allowed for a + certain rule + :type username: str + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + } + + def __init__(self, *, username: str=None, recommendation_action=None, **kwargs) -> None: + super(UserRecommendation, self).__init__(**kwargs) + self.username = username + self.recommendation_action = recommendation_action + + +class VmRecommendation(Model): + """Represents a machine that is part of a VM/server group. + + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + :param resource_id: + :type resource_id: str + """ + + _attribute_map = { + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, *, configuration_status=None, recommendation_action=None, resource_id: str=None, **kwargs) -> None: + super(VmRecommendation, self).__init__(**kwargs) + self.configuration_status = configuration_status + self.recommendation_action = recommendation_action + self.resource_id = resource_id + + +class WorkspaceSetting(Resource): + """Configures where to store the OMS agent data for workspaces under a scope. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param workspace_id: Required. The full Azure ID of the workspace to save + the data in + :type workspace_id: str + :param scope: Required. All the VMs in this scope will send their security + data to the mentioned workspace unless overridden by a setting with more + specific scope + :type scope: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace_id': {'required': True}, + 'scope': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + } + + def __init__(self, *, workspace_id: str, scope: str, **kwargs) -> None: + super(WorkspaceSetting, self).__init__(**kwargs) + self.workspace_id = workspace_id + self.scope = scope diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py new file mode 100644 index 000000000000..362a777bdc8c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py @@ -0,0 +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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ComplianceResultPaged(Paged): + """ + A paging container for iterating over a list of :class:`ComplianceResult ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComplianceResult]'} + } + + def __init__(self, *args, **kwargs): + + super(ComplianceResultPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class SettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`Setting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Setting]'} + } + + def __init__(self, *args, **kwargs): + + super(SettingPaged, self).__init__(*args, **kwargs) +class IoTSecuritySolutionModelPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecuritySolutionModel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecuritySolutionModel]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecuritySolutionModelPaged, self).__init__(*args, **kwargs) +class IoTSecurityAggregatedAlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedAlert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedAlert]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedAlertPaged, self).__init__(*args, **kwargs) +class IoTSecurityAggregatedRecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedRecommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedRecommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedRecommendationPaged, self).__init__(*args, **kwargs) +class AllowedConnectionsResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AllowedConnectionsResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AllowedConnectionsResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AllowedConnectionsResourcePaged, self).__init__(*args, **kwargs) +class DiscoveredSecuritySolutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiscoveredSecuritySolution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiscoveredSecuritySolution]'} + } + + def __init__(self, *args, **kwargs): + + super(DiscoveredSecuritySolutionPaged, self).__init__(*args, **kwargs) +class ExternalSecuritySolutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExternalSecuritySolution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ExternalSecuritySolution]'} + } + + def __init__(self, *args, **kwargs): + + super(ExternalSecuritySolutionPaged, self).__init__(*args, **kwargs) +class JitNetworkAccessPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`JitNetworkAccessPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JitNetworkAccessPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(JitNetworkAccessPolicyPaged, self).__init__(*args, **kwargs) +class AscLocationPaged(Paged): + """ + A paging container for iterating over a list of :class:`AscLocation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AscLocation]'} + } + + def __init__(self, *args, **kwargs): + + super(AscLocationPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class SecurityTaskPaged(Paged): + """ + A paging container for iterating over a list of :class:`SecurityTask ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SecurityTask]'} + } + + def __init__(self, *args, **kwargs): + + super(SecurityTaskPaged, self).__init__(*args, **kwargs) +class TopologyResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`TopologyResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TopologyResource]'} + } + + def __init__(self, *args, **kwargs): + + super(TopologyResourcePaged, self).__init__(*args, **kwargs) +class AutoProvisioningSettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`AutoProvisioningSetting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AutoProvisioningSetting]'} + } + + def __init__(self, *args, **kwargs): + + super(AutoProvisioningSettingPaged, self).__init__(*args, **kwargs) +class CompliancePaged(Paged): + """ + A paging container for iterating over a list of :class:`Compliance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Compliance]'} + } + + def __init__(self, *args, **kwargs): + + super(CompliancePaged, self).__init__(*args, **kwargs) +class InformationProtectionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`InformationProtectionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InformationProtectionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(InformationProtectionPolicyPaged, self).__init__(*args, **kwargs) +class SecurityContactPaged(Paged): + """ + A paging container for iterating over a list of :class:`SecurityContact ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SecurityContact]'} + } + + def __init__(self, *args, **kwargs): + + super(SecurityContactPaged, self).__init__(*args, **kwargs) +class WorkspaceSettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkspaceSetting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkspaceSetting]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkspaceSettingPaged, self).__init__(*args, **kwargs) +class RegulatoryComplianceStandardPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceStandard ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceStandard]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceStandardPaged, self).__init__(*args, **kwargs) +class RegulatoryComplianceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceControlPaged, self).__init__(*args, **kwargs) +class RegulatoryComplianceAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py new file mode 100644 index 000000000000..09cf991ceb06 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py @@ -0,0 +1,156 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 ResourceStatus(str, Enum): + + healthy = "Healthy" #: This assessment on the resource is healthy + not_applicable = "NotApplicable" #: This assessment is not applicable to this resource + off_by_policy = "OffByPolicy" #: This assessment is turned off by policy on this subscription + not_healthy = "NotHealthy" #: This assessment on the resource is not healthy + + +class PricingTier(str, Enum): + + free = "Free" #: Get free Azure security center experience with basic security features + standard = "Standard" #: Get the standard Azure security center experience with advanced security features + + +class ReportedSeverity(str, Enum): + + informational = "Informational" + low = "Low" + medium = "Medium" + high = "High" + + +class SettingKind(str, Enum): + + data_export_setting = "DataExportSetting" + alert_suppression_setting = "AlertSuppressionSetting" + + +class SecuritySolutionStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ExportData(str, Enum): + + raw_events = "RawEvents" #: Agent raw events + + +class DataSource(str, Enum): + + twin_data = "TwinData" #: Devices twin data + + +class RecommendationType(str, Enum): + + io_t_acrauthentication = "IoT_ACRAuthentication" #: Authentication schema used for pull an edge module from an ACR repository does not use Service Principal Authentication. + io_t_agent_sends_unutilized_messages = "IoT_AgentSendsUnutilizedMessages" #: IoT agent message size capacity is currently underutilized, causing an increase in the number of sent messages. Adjust message intervals for better utilization. + io_t_baseline = "IoT_Baseline" #: Identified security related system configuration issues. + io_t_edge_hub_mem_optimize = "IoT_EdgeHubMemOptimize" #: You can optimize Edge Hub memory usage by turning off protocol heads for any protocols not used by Edge modules in your solution. + io_t_edge_logging_options = "IoT_EdgeLoggingOptions" #: Logging is disabled for this edge module. + io_t_inconsistent_module_settings = "IoT_InconsistentModuleSettings" #: A minority within a device security group has inconsistent Edge Module settings with the rest of their group. + io_t_install_agent = "IoT_InstallAgent" #: Install the Azure Security of Things Agent. + io_t_ipfilter_deny_all = "IoT_IPFilter_DenyAll" #: IP Filter Configuration should have rules defined for allowed traffic and should deny all other traffic by default. + io_t_ipfilter_permissive_rule = "IoT_IPFilter_PermissiveRule" #: An Allow IP Filter rules source IP range is too large. Overly permissive rules might expose your IoT hub to malicious intenders. + io_t_open_ports = "IoT_OpenPorts" #: A listening endpoint was found on the device. + io_t_permissive_firewall_policy = "IoT_PermissiveFirewallPolicy" #: An Allowed firewall policy was found (INPUT/OUTPUT). The policy should Deny all traffic by default and define rules to allow necessary communication to/from the device. + io_t_permissive_input_firewall_rules = "IoT_PermissiveInputFirewallRules" #: A rule in the firewall has been found that contains a permissive pattern for a wide range of IP addresses or Ports. + io_t_permissive_output_firewall_rules = "IoT_PermissiveOutputFirewallRules" #: A rule in the firewall has been found that contains a permissive pattern for a wide range of IP addresses or Ports. + io_t_privileged_docker_options = "IoT_PrivilegedDockerOptions" #: Edge module is configured to run in privileged mode, with extensive Linux capabilities or with host-level network access (send/receive data to host machine). + io_t_shared_credentials = "IoT_SharedCredentials" #: Same authentication credentials to the IoT Hub used by multiple devices. This could indicate an illegitimate device impersonating a legitimate device. It also exposes the risk of device impersonation by an attacker. + io_t_vulnerable_tls_cipher_suite = "IoT_VulnerableTLSCipherSuite" #: Insecure TLS configurations detected. Immediate upgrade recommended. + + +class RecommendationConfigStatus(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class SecurityFamily(str, Enum): + + waf = "Waf" + ngfw = "Ngfw" + saas_waf = "SaasWaf" + va = "Va" + + +class AadConnectivityState(str, Enum): + + discovered = "Discovered" + not_licensed = "NotLicensed" + connected = "Connected" + + +class ExternalSecuritySolutionKind(str, Enum): + + cef = "CEF" + ata = "ATA" + aad = "AAD" + + +class Protocol(str, Enum): + + tcp = "TCP" + udp = "UDP" + all = "*" + + +class Status(str, Enum): + + revoked = "Revoked" + initiated = "Initiated" + + +class StatusReason(str, Enum): + + expired = "Expired" + user_requested = "UserRequested" + newer_request_initiated = "NewerRequestInitiated" + + +class AutoProvision(str, Enum): + + on = "On" #: Install missing security agent on VMs automatically + off = "Off" #: Do not install security agent on the VMs automatically + + +class AlertNotifications(str, Enum): + + on = "On" #: Get notifications on new alerts + off = "Off" #: Don't get notifications on new alerts + + +class AlertsToAdmins(str, Enum): + + on = "On" #: Send notification on new alerts to the subscription's admins + off = "Off" #: Don't send notification on new alerts to the subscription's admins + + +class State(str, Enum): + + passed = "Passed" #: All supported regulatory compliance controls in the given standard have a passed state + failed = "Failed" #: At least one supported regulatory compliance control in the given standard has a state of failed + skipped = "Skipped" #: All supported regulatory compliance controls in the given standard have a state of skipped + unsupported = "Unsupported" #: No supported regulatory compliance data for the given standard + + +class ConnectionType(str, Enum): + + internal = "Internal" + external = "External" diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py deleted file mode 100644 index 7feb6e549272..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.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 AadConnectivityState1(Model): - """Describes an Azure resource with kind. - - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AadConnectivityState1, self).__init__(**kwargs) - self.connectivity_state = kwargs.get('connectivity_state', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py deleted file mode 100644 index 7c699ec9d77e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_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 AadConnectivityState1(Model): - """Describes an Azure resource with kind. - - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, *, connectivity_state=None, **kwargs) -> None: - super(AadConnectivityState1, self).__init__(**kwargs) - self.connectivity_state = connectivity_state diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py deleted file mode 100644 index da55d84dfdad..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.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 .external_security_solution import ExternalSecuritySolution - - -class AadExternalSecuritySolution(ExternalSecuritySolution): - """Represents an AAD identity protection solution which sends logs to an OMS - workspace. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AadSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, - } - - def __init__(self, **kwargs): - super(AadExternalSecuritySolution, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'AAD' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py deleted file mode 100644 index 893a2efac215..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_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 .external_security_solution_py3 import ExternalSecuritySolution - - -class AadExternalSecuritySolution(ExternalSecuritySolution): - """Represents an AAD identity protection solution which sends logs to an OMS - workspace. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AadSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AadExternalSecuritySolution, self).__init__(**kwargs) - self.properties = properties - self.kind = 'AAD' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py deleted file mode 100644 index 44c62d15869c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py +++ /dev/null @@ -1,43 +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 AadSolutionProperties(Model): - """The external security solution properties for AAD solutions. - - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AadSolutionProperties, self).__init__(**kwargs) - self.device_vendor = kwargs.get('device_vendor', None) - self.device_type = kwargs.get('device_type', None) - self.workspace = kwargs.get('workspace', None) - self.connectivity_state = kwargs.get('connectivity_state', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py deleted file mode 100644 index 4acc4804aa08..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py +++ /dev/null @@ -1,43 +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 AadSolutionProperties(Model): - """The external security solution properties for AAD solutions. - - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, *, device_vendor: str=None, device_type: str=None, workspace=None, connectivity_state=None, **kwargs) -> None: - super(AadSolutionProperties, self).__init__(**kwargs) - self.device_vendor = device_vendor - self.device_type = device_type - self.workspace = workspace - self.connectivity_state = connectivity_state diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py deleted file mode 100644 index 722352481320..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.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 .resource import Resource - - -class AdvancedThreatProtectionSetting(Resource): - """The Advanced Threat Protection 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: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param is_enabled: Indicates whether Advanced Threat Protection is - enabled. - :type is_enabled: bool - """ - - _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'}, - 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) - self.is_enabled = kwargs.get('is_enabled', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py deleted file mode 100644 index 66ed9c5fe2ec..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_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 .resource_py3 import Resource - - -class AdvancedThreatProtectionSetting(Resource): - """The Advanced Threat Protection 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: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param is_enabled: Indicates whether Advanced Threat Protection is - enabled. - :type is_enabled: bool - """ - - _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'}, - 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, - } - - def __init__(self, *, is_enabled: bool=None, **kwargs) -> None: - super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) - self.is_enabled = is_enabled diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py deleted file mode 100644 index a467fe8ffcbb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py +++ /dev/null @@ -1,165 +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 .resource import Resource - - -class Alert(Resource): - """Security alert. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar state: State of the alert (Active, Dismissed etc.) - :vartype state: str - :ivar reported_time_utc: The time the incident was reported to - Microsoft.Security in UTC - :vartype reported_time_utc: datetime - :ivar vendor_name: Name of the vendor that discovered the incident - :vartype vendor_name: str - :ivar alert_name: Name of the alert type - :vartype alert_name: str - :ivar alert_display_name: Display name of the alert type - :vartype alert_display_name: str - :ivar detected_time_utc: The time the incident was detected by the vendor - :vartype detected_time_utc: datetime - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar remediation_steps: Recommended steps to reradiate the incident - :vartype remediation_steps: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) - :vartype action_taken: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar compromised_entity: The entity that the incident happened on - :vartype compromised_entity: str - :ivar associated_resource: Azure resource ID of the associated resource - :vartype associated_resource: str - :param extended_properties: - :type extended_properties: dict[str, object] - :ivar system_source: The type of the alerted resource (Azure, Non-Azure) - :vartype system_source: str - :ivar can_be_investigated: Whether this alert can be investigated with - Azure Security Center - :vartype can_be_investigated: bool - :ivar is_incident: Whether this alert is for incident type or not - (otherwise - single alert) - :vartype is_incident: bool - :param entities: objects that are related to this alerts - :type entities: list[~azure.mgmt.security.models.AlertEntity] - :ivar confidence_score: level of confidence we have on the alert - :vartype confidence_score: float - :param confidence_reasons: reasons the alert got the confidenceScore value - :type confidence_reasons: - list[~azure.mgmt.security.models.AlertConfidenceReason] - :ivar subscription_id: Azure subscription ID of the resource that had the - security alert or the subscription ID of the workspace that this resource - reports to - :vartype subscription_id: str - :ivar instance_id: Instance ID of the alert. - :vartype instance_id: str - :ivar workspace_arm_id: Azure resource ID of the workspace that the alert - was reported to. - :vartype workspace_arm_id: str - :ivar correlation_key: Alerts with the same CorrelationKey will be grouped - together in Ibiza. - :vartype correlation_key: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'reported_time_utc': {'readonly': True}, - 'vendor_name': {'readonly': True}, - 'alert_name': {'readonly': True}, - 'alert_display_name': {'readonly': True}, - 'detected_time_utc': {'readonly': True}, - 'description': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'action_taken': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'compromised_entity': {'readonly': True}, - 'associated_resource': {'readonly': True}, - 'system_source': {'readonly': True}, - 'can_be_investigated': {'readonly': True}, - 'is_incident': {'readonly': True}, - 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, - 'subscription_id': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'workspace_arm_id': {'readonly': True}, - 'correlation_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, - 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, - 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, - 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, - 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, - 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, - 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, - 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, - 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, - 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, - 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, - 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, - 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Alert, self).__init__(**kwargs) - self.state = None - self.reported_time_utc = None - self.vendor_name = None - self.alert_name = None - self.alert_display_name = None - self.detected_time_utc = None - self.description = None - self.remediation_steps = None - self.action_taken = None - self.reported_severity = None - self.compromised_entity = None - self.associated_resource = None - self.extended_properties = kwargs.get('extended_properties', None) - self.system_source = None - self.can_be_investigated = None - self.is_incident = None - self.entities = kwargs.get('entities', None) - self.confidence_score = None - self.confidence_reasons = kwargs.get('confidence_reasons', None) - self.subscription_id = None - self.instance_id = None - self.workspace_arm_id = None - self.correlation_key = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py deleted file mode 100644 index ddbfc3dae2ec..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.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 AlertConfidenceReason(Model): - """Factors that increase our confidence that the alert is a true positive. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: Type of confidence factor - :vartype type: str - :ivar reason: description of the confidence reason - :vartype reason: str - """ - - _validation = { - 'type': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertConfidenceReason, self).__init__(**kwargs) - self.type = None - self.reason = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py deleted file mode 100644 index ff57f840a16d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_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 AlertConfidenceReason(Model): - """Factors that increase our confidence that the alert is a true positive. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: Type of confidence factor - :vartype type: str - :ivar reason: description of the confidence reason - :vartype reason: str - """ - - _validation = { - 'type': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AlertConfidenceReason, self).__init__(**kwargs) - self.type = None - self.reason = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py deleted file mode 100644 index 1dd8ca41529a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.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 AlertEntity(Model): - """Changing set of properties depending on the entity type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: Type of entity - :vartype type: str - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertEntity, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py deleted file mode 100644 index 1f8de5415ff7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_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 AlertEntity(Model): - """Changing set of properties depending on the entity type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: Type of entity - :vartype type: str - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(AlertEntity, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py deleted file mode 100644 index 8fd844916438..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class AlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`Alert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} - } - - def __init__(self, *args, **kwargs): - - super(AlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py deleted file mode 100644 index 95007f9bb77a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py +++ /dev/null @@ -1,165 +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 .resource_py3 import Resource - - -class Alert(Resource): - """Security alert. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar state: State of the alert (Active, Dismissed etc.) - :vartype state: str - :ivar reported_time_utc: The time the incident was reported to - Microsoft.Security in UTC - :vartype reported_time_utc: datetime - :ivar vendor_name: Name of the vendor that discovered the incident - :vartype vendor_name: str - :ivar alert_name: Name of the alert type - :vartype alert_name: str - :ivar alert_display_name: Display name of the alert type - :vartype alert_display_name: str - :ivar detected_time_utc: The time the incident was detected by the vendor - :vartype detected_time_utc: datetime - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar remediation_steps: Recommended steps to reradiate the incident - :vartype remediation_steps: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) - :vartype action_taken: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar compromised_entity: The entity that the incident happened on - :vartype compromised_entity: str - :ivar associated_resource: Azure resource ID of the associated resource - :vartype associated_resource: str - :param extended_properties: - :type extended_properties: dict[str, object] - :ivar system_source: The type of the alerted resource (Azure, Non-Azure) - :vartype system_source: str - :ivar can_be_investigated: Whether this alert can be investigated with - Azure Security Center - :vartype can_be_investigated: bool - :ivar is_incident: Whether this alert is for incident type or not - (otherwise - single alert) - :vartype is_incident: bool - :param entities: objects that are related to this alerts - :type entities: list[~azure.mgmt.security.models.AlertEntity] - :ivar confidence_score: level of confidence we have on the alert - :vartype confidence_score: float - :param confidence_reasons: reasons the alert got the confidenceScore value - :type confidence_reasons: - list[~azure.mgmt.security.models.AlertConfidenceReason] - :ivar subscription_id: Azure subscription ID of the resource that had the - security alert or the subscription ID of the workspace that this resource - reports to - :vartype subscription_id: str - :ivar instance_id: Instance ID of the alert. - :vartype instance_id: str - :ivar workspace_arm_id: Azure resource ID of the workspace that the alert - was reported to. - :vartype workspace_arm_id: str - :ivar correlation_key: Alerts with the same CorrelationKey will be grouped - together in Ibiza. - :vartype correlation_key: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'reported_time_utc': {'readonly': True}, - 'vendor_name': {'readonly': True}, - 'alert_name': {'readonly': True}, - 'alert_display_name': {'readonly': True}, - 'detected_time_utc': {'readonly': True}, - 'description': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'action_taken': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'compromised_entity': {'readonly': True}, - 'associated_resource': {'readonly': True}, - 'system_source': {'readonly': True}, - 'can_be_investigated': {'readonly': True}, - 'is_incident': {'readonly': True}, - 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, - 'subscription_id': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'workspace_arm_id': {'readonly': True}, - 'correlation_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, - 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, - 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, - 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, - 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, - 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, - 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, - 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, - 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, - 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, - 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, - 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, - 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, - } - - def __init__(self, *, extended_properties=None, entities=None, confidence_reasons=None, **kwargs) -> None: - super(Alert, self).__init__(**kwargs) - self.state = None - self.reported_time_utc = None - self.vendor_name = None - self.alert_name = None - self.alert_display_name = None - self.detected_time_utc = None - self.description = None - self.remediation_steps = None - self.action_taken = None - self.reported_severity = None - self.compromised_entity = None - self.associated_resource = None - self.extended_properties = extended_properties - self.system_source = None - self.can_be_investigated = None - self.is_incident = None - self.entities = entities - self.confidence_score = None - self.confidence_reasons = confidence_reasons - self.subscription_id = None - self.instance_id = None - self.workspace_arm_id = None - self.correlation_key = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py deleted file mode 100644 index a33332d21a3a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.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 AllowedConnectionsResource(Model): - """The resource whose properties describes the allowed traffic between Azure - resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :ivar calculated_date_time: The UTC time on which the allowed connections - resource was calculated - :vartype calculated_date_time: datetime - :ivar connectable_resources: List of connectable resources - :vartype connectable_resources: - list[~azure.mgmt.security.models.ConnectableResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'connectable_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, - } - - def __init__(self, **kwargs): - super(AllowedConnectionsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.connectable_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py deleted file mode 100644 index 6a1696891e15..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class AllowedConnectionsResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AllowedConnectionsResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AllowedConnectionsResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AllowedConnectionsResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py deleted file mode 100644 index c6cc09b53298..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_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 AllowedConnectionsResource(Model): - """The resource whose properties describes the allowed traffic between Azure - resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :ivar calculated_date_time: The UTC time on which the allowed connections - resource was calculated - :vartype calculated_date_time: datetime - :ivar connectable_resources: List of connectable resources - :vartype connectable_resources: - list[~azure.mgmt.security.models.ConnectableResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'connectable_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, - } - - def __init__(self, **kwargs) -> None: - super(AllowedConnectionsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.connectable_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py deleted file mode 100644 index c665bef0469a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.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 .resource import Resource - - -class AscLocation(Resource): - """The ASC location of the subscription is in the "name" field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param properties: - :type properties: object - """ - - _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': 'object'}, - } - - def __init__(self, **kwargs): - super(AscLocation, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py deleted file mode 100644 index 85394884079a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class AscLocationPaged(Paged): - """ - A paging container for iterating over a list of :class:`AscLocation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AscLocation]'} - } - - def __init__(self, *args, **kwargs): - - super(AscLocationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py deleted file mode 100644 index 8ee3de84094f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_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 .resource_py3 import Resource - - -class AscLocation(Resource): - """The ASC location of the subscription is in the "name" field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param properties: - :type properties: object - """ - - _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': 'object'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AscLocation, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py deleted file mode 100644 index 813dae68b0e1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.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 .external_security_solution import ExternalSecuritySolution - - -class AtaExternalSecuritySolution(ExternalSecuritySolution): - """Represents an ATA security solution which sends logs to an OMS workspace. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AtaSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, - } - - def __init__(self, **kwargs): - super(AtaExternalSecuritySolution, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'ATA' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py deleted file mode 100644 index 52b5e8b579a7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.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 .external_security_solution_py3 import ExternalSecuritySolution - - -class AtaExternalSecuritySolution(ExternalSecuritySolution): - """Represents an ATA security solution which sends logs to an OMS workspace. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AtaSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AtaExternalSecuritySolution, self).__init__(**kwargs) - self.properties = properties - self.kind = 'ATA' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py deleted file mode 100644 index 8067254e71fa..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.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 .external_security_solution_properties import ExternalSecuritySolutionProperties - - -class AtaSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for ATA solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AtaSolutionProperties, self).__init__(**kwargs) - self.last_event_received = kwargs.get('last_event_received', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py deleted file mode 100644 index 7314df45108c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_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 .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties - - -class AtaSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for ATA solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, last_event_received: str=None, **kwargs) -> None: - super(AtaSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) - self.last_event_received = last_event_received diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py deleted file mode 100644 index 907869accb3d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.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 .resource import Resource - - -class AutoProvisioningSetting(Resource): - """Auto provisioning setting. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param auto_provision: Required. Describes what kind of security agent - provisioning action to take. Possible values include: 'On', 'Off' - :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'auto_provision': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AutoProvisioningSetting, self).__init__(**kwargs) - self.auto_provision = kwargs.get('auto_provision', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py deleted file mode 100644 index a618c42c075c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class AutoProvisioningSettingPaged(Paged): - """ - A paging container for iterating over a list of :class:`AutoProvisioningSetting ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AutoProvisioningSetting]'} - } - - def __init__(self, *args, **kwargs): - - super(AutoProvisioningSettingPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py deleted file mode 100644 index 7c86b8da5c01..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_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 .resource_py3 import Resource - - -class AutoProvisioningSetting(Resource): - """Auto provisioning setting. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param auto_provision: Required. Describes what kind of security agent - provisioning action to take. Possible values include: 'On', 'Off' - :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'auto_provision': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, - } - - def __init__(self, *, auto_provision, **kwargs) -> None: - super(AutoProvisioningSetting, self).__init__(**kwargs) - self.auto_provision = auto_provision diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py deleted file mode 100644 index 513fb6de5940..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.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 .external_security_solution import ExternalSecuritySolution - - -class CefExternalSecuritySolution(ExternalSecuritySolution): - """Represents a security solution which sends CEF logs to an OMS workspace. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.CefSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, - } - - def __init__(self, **kwargs): - super(CefExternalSecuritySolution, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'CEF' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py deleted file mode 100644 index 930b453b72d8..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.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 .external_security_solution_py3 import ExternalSecuritySolution - - -class CefExternalSecuritySolution(ExternalSecuritySolution): - """Represents a security solution which sends CEF logs to an OMS workspace. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.CefSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CefExternalSecuritySolution, self).__init__(**kwargs) - self.properties = properties - self.kind = 'CEF' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py deleted file mode 100644 index b49610a04bb0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.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 .external_security_solution_properties import ExternalSecuritySolutionProperties - - -class CefSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for CEF solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param hostname: - :type hostname: str - :param agent: - :type agent: str - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'agent': {'key': 'agent', 'type': 'str'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CefSolutionProperties, self).__init__(**kwargs) - self.hostname = kwargs.get('hostname', None) - self.agent = kwargs.get('agent', None) - self.last_event_received = kwargs.get('last_event_received', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py deleted file mode 100644 index 390c6acba5fb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_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 .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties - - -class CefSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for CEF solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param hostname: - :type hostname: str - :param agent: - :type agent: str - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'agent': {'key': 'agent', 'type': 'str'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, hostname: str=None, agent: str=None, last_event_received: str=None, **kwargs) -> None: - super(CefSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) - self.hostname = hostname - self.agent = agent - self.last_event_received = last_event_received diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py deleted file mode 100644 index f515b35211bd..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py +++ /dev/null @@ -1,62 +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 .resource import Resource - - -class Compliance(Resource): - """Compliance of a scope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar assessment_timestamp_utc_date: The timestamp when the Compliance - calculation was conducted. - :vartype assessment_timestamp_utc_date: datetime - :ivar resource_count: The resource count of the given subscription for - which the Compliance calculation was conducted (needed for Management - Group Compliance calculation). - :vartype resource_count: int - :ivar assessment_result: An array of segment, which is the actually the - compliance assessment. - :vartype assessment_result: - list[~azure.mgmt.security.models.ComplianceSegment] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'assessment_timestamp_utc_date': {'readonly': True}, - 'resource_count': {'readonly': True}, - 'assessment_result': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, - 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, - 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, - } - - def __init__(self, **kwargs): - super(Compliance, self).__init__(**kwargs) - self.assessment_timestamp_utc_date = None - self.resource_count = None - self.assessment_result = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py deleted file mode 100644 index 4e2030375270..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class CompliancePaged(Paged): - """ - A paging container for iterating over a list of :class:`Compliance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Compliance]'} - } - - def __init__(self, *args, **kwargs): - - super(CompliancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py deleted file mode 100644 index 0e271a1351b4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py +++ /dev/null @@ -1,62 +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 .resource_py3 import Resource - - -class Compliance(Resource): - """Compliance of a scope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar assessment_timestamp_utc_date: The timestamp when the Compliance - calculation was conducted. - :vartype assessment_timestamp_utc_date: datetime - :ivar resource_count: The resource count of the given subscription for - which the Compliance calculation was conducted (needed for Management - Group Compliance calculation). - :vartype resource_count: int - :ivar assessment_result: An array of segment, which is the actually the - compliance assessment. - :vartype assessment_result: - list[~azure.mgmt.security.models.ComplianceSegment] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'assessment_timestamp_utc_date': {'readonly': True}, - 'resource_count': {'readonly': True}, - 'assessment_result': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, - 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, - 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, - } - - def __init__(self, **kwargs) -> None: - super(Compliance, self).__init__(**kwargs) - self.assessment_timestamp_utc_date = None - self.resource_count = None - self.assessment_result = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py deleted file mode 100644 index ea23dc49c079..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.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 ComplianceSegment(Model): - """A segment of a compliance assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar segment_type: The segment type, e.g. compliant, non-compliance, - insufficient coverage, N/A, etc. - :vartype segment_type: str - :ivar percentage: The size (%) of the segment. - :vartype percentage: float - """ - - _validation = { - 'segment_type': {'readonly': True}, - 'percentage': {'readonly': True}, - } - - _attribute_map = { - 'segment_type': {'key': 'segmentType', 'type': 'str'}, - 'percentage': {'key': 'percentage', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ComplianceSegment, self).__init__(**kwargs) - self.segment_type = None - self.percentage = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py deleted file mode 100644 index a819e7cde997..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_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 ComplianceSegment(Model): - """A segment of a compliance assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar segment_type: The segment type, e.g. compliant, non-compliance, - insufficient coverage, N/A, etc. - :vartype segment_type: str - :ivar percentage: The size (%) of the segment. - :vartype percentage: float - """ - - _validation = { - 'segment_type': {'readonly': True}, - 'percentage': {'readonly': True}, - } - - _attribute_map = { - 'segment_type': {'key': 'segmentType', 'type': 'str'}, - 'percentage': {'key': 'percentage', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ComplianceSegment, self).__init__(**kwargs) - self.segment_type = None - self.percentage = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py deleted file mode 100644 index 617931b620d2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.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 ConnectableResource(Model): - """Describes the allowed inbound and outbound traffic of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The Azure resource id - :vartype id: str - :ivar inbound_connected_resources: The list of Azure resources that the - resource has inbound allowed connection from - :vartype inbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - :ivar outbound_connected_resources: The list of Azure resources that the - resource has outbound allowed connection to - :vartype outbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'inbound_connected_resources': {'readonly': True}, - 'outbound_connected_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, - 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, - } - - def __init__(self, **kwargs): - super(ConnectableResource, self).__init__(**kwargs) - self.id = None - self.inbound_connected_resources = None - self.outbound_connected_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py deleted file mode 100644 index 405942f2b228..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_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 ConnectableResource(Model): - """Describes the allowed inbound and outbound traffic of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The Azure resource id - :vartype id: str - :ivar inbound_connected_resources: The list of Azure resources that the - resource has inbound allowed connection from - :vartype inbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - :ivar outbound_connected_resources: The list of Azure resources that the - resource has outbound allowed connection to - :vartype outbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'inbound_connected_resources': {'readonly': True}, - 'outbound_connected_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, - 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, - } - - def __init__(self, **kwargs) -> None: - super(ConnectableResource, self).__init__(**kwargs) - self.id = None - self.inbound_connected_resources = None - self.outbound_connected_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py deleted file mode 100644 index cb4e417044cd..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.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 ConnectedResource(Model): - """Describes properties of a connected resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connected_resource_id: The Azure resource id of the connected - resource - :vartype connected_resource_id: str - :ivar tcp_ports: The allowed tcp ports - :vartype tcp_ports: str - :ivar udp_ports: The allowed udp ports - :vartype udp_ports: str - """ - - _validation = { - 'connected_resource_id': {'readonly': True}, - 'tcp_ports': {'readonly': True}, - 'udp_ports': {'readonly': True}, - } - - _attribute_map = { - 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, - 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, - 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConnectedResource, self).__init__(**kwargs) - self.connected_resource_id = None - self.tcp_ports = None - self.udp_ports = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py deleted file mode 100644 index 509629455e1c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_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 ConnectedResource(Model): - """Describes properties of a connected resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connected_resource_id: The Azure resource id of the connected - resource - :vartype connected_resource_id: str - :ivar tcp_ports: The allowed tcp ports - :vartype tcp_ports: str - :ivar udp_ports: The allowed udp ports - :vartype udp_ports: str - """ - - _validation = { - 'connected_resource_id': {'readonly': True}, - 'tcp_ports': {'readonly': True}, - 'udp_ports': {'readonly': True}, - } - - _attribute_map = { - 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, - 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, - 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ConnectedResource, self).__init__(**kwargs) - self.connected_resource_id = None - self.tcp_ports = None - self.udp_ports = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py deleted file mode 100644 index 6ac3212eabd9..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py +++ /dev/null @@ -1,28 +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 ConnectedWorkspace(Model): - """Represents an OMS workspace to which the solution is connected. - - :param id: Azure resource ID of the connected OMS workspace - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConnectedWorkspace, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py deleted file mode 100644 index 5bc6960972d2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py +++ /dev/null @@ -1,28 +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 ConnectedWorkspace(Model): - """Represents an OMS workspace to which the solution is connected. - - :param id: Azure resource ID of the connected OMS workspace - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ConnectedWorkspace, self).__init__(**kwargs) - self.id = id diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py deleted file mode 100644 index 8c355e50e6ff..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.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 .setting import Setting - - -class DataExportSetting(Setting): - """Represents a data export setting. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - :param enabled: Required. Is the data export setting is enabled - :type enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DataExportSetting, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py deleted file mode 100644 index 05d8e11208fc..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_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 .setting_py3 import Setting - - -class DataExportSetting(Setting): - """Represents a data export setting. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - :param enabled: Required. Is the data export setting is enabled - :type enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, kind, enabled: bool, **kwargs) -> None: - super(DataExportSetting, self).__init__(kind=kind, **kwargs) - self.enabled = enabled diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py deleted file mode 100644 index fabb09226953..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py +++ /dev/null @@ -1,73 +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 DiscoveredSecuritySolution(Model): - """DiscoveredSecuritySolution. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param security_family: Required. The security family of the discovered - solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' - :type security_family: str or ~azure.mgmt.security.models.SecurityFamily - :param offer: Required. The security solutions' image offer - :type offer: str - :param publisher: Required. The security solutions' image publisher - :type publisher: str - :param sku: Required. The security solutions' image sku - :type sku: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'security_family': {'required': True}, - 'offer': {'required': True}, - 'publisher': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, - 'offer': {'key': 'properties.offer', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiscoveredSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.security_family = kwargs.get('security_family', None) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py deleted file mode 100644 index 9bfbb03c5409..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class DiscoveredSecuritySolutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiscoveredSecuritySolution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiscoveredSecuritySolution]'} - } - - def __init__(self, *args, **kwargs): - - super(DiscoveredSecuritySolutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py deleted file mode 100644 index 33934cab24d5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py +++ /dev/null @@ -1,73 +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 DiscoveredSecuritySolution(Model): - """DiscoveredSecuritySolution. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param security_family: Required. The security family of the discovered - solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' - :type security_family: str or ~azure.mgmt.security.models.SecurityFamily - :param offer: Required. The security solutions' image offer - :type offer: str - :param publisher: Required. The security solutions' image publisher - :type publisher: str - :param sku: Required. The security solutions' image sku - :type sku: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'security_family': {'required': True}, - 'offer': {'required': True}, - 'publisher': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, - 'offer': {'key': 'properties.offer', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, *, security_family, offer: str, publisher: str, sku: str, **kwargs) -> None: - super(DiscoveredSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.security_family = security_family - self.offer = offer - self.publisher = publisher - self.sku = sku diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py deleted file mode 100644 index 0eb60137c0c0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.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 ExternalSecuritySolution(Model): - """Represents a security solution external to Azure Security Center which - sends information to an OMS workspace and whose data is displayed by Azure - Security Center. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, - AadExternalSecuritySolution - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} - } - - def __init__(self, **kwargs): - super(ExternalSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.kind = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py deleted file mode 100644 index 7f736fcfc1ba..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.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 ExternalSecuritySolutionKind1(Model): - """Describes an Azure resource with kind. - - :param kind: The kind of the external solution. Possible values include: - 'CEF', 'ATA', 'AAD' - :type kind: str or - ~azure.mgmt.security.models.ExternalSecuritySolutionKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py deleted file mode 100644 index 0d1ef240b557..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_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 ExternalSecuritySolutionKind1(Model): - """Describes an Azure resource with kind. - - :param kind: The kind of the external solution. Possible values include: - 'CEF', 'ATA', 'AAD' - :type kind: str or - ~azure.mgmt.security.models.ExternalSecuritySolutionKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind=None, **kwargs) -> None: - super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py deleted file mode 100644 index a67047ce19c0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class ExternalSecuritySolutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ExternalSecuritySolution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ExternalSecuritySolution]'} - } - - def __init__(self, *args, **kwargs): - - super(ExternalSecuritySolutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py deleted file mode 100644 index 9ccbb179d3e4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.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 ExternalSecuritySolutionProperties(Model): - """The solution properties (correspond to the solution kind). - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - } - - def __init__(self, **kwargs): - super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.device_vendor = kwargs.get('device_vendor', None) - self.device_type = kwargs.get('device_type', None) - self.workspace = kwargs.get('workspace', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py deleted file mode 100644 index de53f50ae553..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_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 ExternalSecuritySolutionProperties(Model): - """The solution properties (correspond to the solution kind). - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - } - - def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, **kwargs) -> None: - super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.device_vendor = device_vendor - self.device_type = device_type - self.workspace = workspace diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py deleted file mode 100644 index 798e808ddfab..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_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 ExternalSecuritySolution(Model): - """Represents a security solution external to Azure Security Center which - sends information to an OMS workspace and whose data is displayed by Azure - Security Center. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, - AadExternalSecuritySolution - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} - } - - def __init__(self, **kwargs) -> None: - super(ExternalSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.kind = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py deleted file mode 100644 index b67a1d4cfbd1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.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 InformationProtectionKeyword(Model): - """The information type keyword. - - :param pattern: The keyword pattern. - :type pattern: str - :param custom: Indicates whether the keyword is custom or not. - :type custom: bool - :param can_be_numeric: Indicates whether the keyword can be applied on - numeric types or not. - :type can_be_numeric: bool - :param excluded: Indicates whether the keyword is excluded or not. - :type excluded: bool - """ - - _attribute_map = { - 'pattern': {'key': 'pattern', 'type': 'str'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, - 'excluded': {'key': 'excluded', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(InformationProtectionKeyword, self).__init__(**kwargs) - self.pattern = kwargs.get('pattern', None) - self.custom = kwargs.get('custom', None) - self.can_be_numeric = kwargs.get('can_be_numeric', None) - self.excluded = kwargs.get('excluded', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py deleted file mode 100644 index 52c424cd4452..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_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 InformationProtectionKeyword(Model): - """The information type keyword. - - :param pattern: The keyword pattern. - :type pattern: str - :param custom: Indicates whether the keyword is custom or not. - :type custom: bool - :param can_be_numeric: Indicates whether the keyword can be applied on - numeric types or not. - :type can_be_numeric: bool - :param excluded: Indicates whether the keyword is excluded or not. - :type excluded: bool - """ - - _attribute_map = { - 'pattern': {'key': 'pattern', 'type': 'str'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, - 'excluded': {'key': 'excluded', 'type': 'bool'}, - } - - def __init__(self, *, pattern: str=None, custom: bool=None, can_be_numeric: bool=None, excluded: bool=None, **kwargs) -> None: - super(InformationProtectionKeyword, self).__init__(**kwargs) - self.pattern = pattern - self.custom = custom - self.can_be_numeric = can_be_numeric - self.excluded = excluded diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py deleted file mode 100644 index c430a8605127..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.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 .resource import Resource - - -class InformationProtectionPolicy(Resource): - """Information protection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar last_modified_utc: Describes the last UTC time the policy was - modified. - :vartype last_modified_utc: datetime - :param labels: Dictionary of sensitivity labels. - :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] - :param information_types: The sensitivity information types. - :type information_types: dict[str, - ~azure.mgmt.security.models.InformationType] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_modified_utc': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, - 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, - 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, - } - - def __init__(self, **kwargs): - super(InformationProtectionPolicy, self).__init__(**kwargs) - self.last_modified_utc = None - self.labels = kwargs.get('labels', None) - self.information_types = kwargs.get('information_types', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py deleted file mode 100644 index 807d040d4f4b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class InformationProtectionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`InformationProtectionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InformationProtectionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(InformationProtectionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py deleted file mode 100644 index e07676bb0d27..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.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 .resource_py3 import Resource - - -class InformationProtectionPolicy(Resource): - """Information protection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar last_modified_utc: Describes the last UTC time the policy was - modified. - :vartype last_modified_utc: datetime - :param labels: Dictionary of sensitivity labels. - :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] - :param information_types: The sensitivity information types. - :type information_types: dict[str, - ~azure.mgmt.security.models.InformationType] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_modified_utc': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, - 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, - 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, - } - - def __init__(self, *, labels=None, information_types=None, **kwargs) -> None: - super(InformationProtectionPolicy, self).__init__(**kwargs) - self.last_modified_utc = None - self.labels = labels - self.information_types = information_types diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py deleted file mode 100644 index df77e7c1ff65..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.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 InformationType(Model): - """The information type. - - :param display_name: The name of the information type. - :type display_name: str - :param order: The order of the information type. - :type order: float - :param recommended_label_id: The recommended label id to be associated - with this information type. - :type recommended_label_id: str - :param enabled: Indicates whether the information type is enabled or not. - :type enabled: bool - :param custom: Indicates whether the information type is custom or not. - :type custom: bool - :param keywords: The information type keywords. - :type keywords: - list[~azure.mgmt.security.models.InformationProtectionKeyword] - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, - } - - def __init__(self, **kwargs): - super(InformationType, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.order = kwargs.get('order', None) - self.recommended_label_id = kwargs.get('recommended_label_id', None) - self.enabled = kwargs.get('enabled', None) - self.custom = kwargs.get('custom', None) - self.keywords = kwargs.get('keywords', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py deleted file mode 100644 index b8b1ab434c82..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_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 InformationType(Model): - """The information type. - - :param display_name: The name of the information type. - :type display_name: str - :param order: The order of the information type. - :type order: float - :param recommended_label_id: The recommended label id to be associated - with this information type. - :type recommended_label_id: str - :param enabled: Indicates whether the information type is enabled or not. - :type enabled: bool - :param custom: Indicates whether the information type is custom or not. - :type custom: bool - :param keywords: The information type keywords. - :type keywords: - list[~azure.mgmt.security.models.InformationProtectionKeyword] - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, - } - - def __init__(self, *, display_name: str=None, order: float=None, recommended_label_id: str=None, enabled: bool=None, custom: bool=None, keywords=None, **kwargs) -> None: - super(InformationType, self).__init__(**kwargs) - self.display_name = display_name - self.order = order - self.recommended_label_id = recommended_label_id - self.enabled = enabled - self.custom = custom - self.keywords = keywords diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py deleted file mode 100644 index 281b6e07c25d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py +++ /dev/null @@ -1,73 +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 JitNetworkAccessPolicy(Model): - """JitNetworkAccessPolicy. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Kind of the resource - :type kind: str - :ivar location: Location where the resource is stored - :vartype location: str - :param virtual_machines: Required. Configurations for - Microsoft.Compute/virtualMachines resource type. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] - :param requests: - :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] - :ivar provisioning_state: Gets the provisioning state of the Just-in-Time - policy. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'virtual_machines': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, - 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicy, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = kwargs.get('kind', None) - self.location = None - self.virtual_machines = kwargs.get('virtual_machines', None) - self.requests = kwargs.get('requests', None) - self.provisioning_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py deleted file mode 100644 index b0829c87c01b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.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 msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiatePort(Model): - """JitNetworkAccessPolicyInitiatePort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Source of the allowed traffic. If - omitted, the request will be for the source IP address of the initiate - request. - :type allowed_source_address_prefix: str - :param end_time_utc: Required. The time to close the request in UTC - :type end_time_utc: datetime - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) - self.number = kwargs.get('number', None) - self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) - self.end_time_utc = kwargs.get('end_time_utc', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py deleted file mode 100644 index 65ae97d30788..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_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 msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiatePort(Model): - """JitNetworkAccessPolicyInitiatePort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Source of the allowed traffic. If - omitted, the request will be for the source IP address of the initiate - request. - :type allowed_source_address_prefix: str - :param end_time_utc: Required. The time to close the request in UTC - :type end_time_utc: datetime - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, number: int, end_time_utc, allowed_source_address_prefix: str=None, **kwargs) -> None: - super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) - self.number = number - self.allowed_source_address_prefix = allowed_source_address_prefix - self.end_time_utc = end_time_utc diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py deleted file mode 100644 index 6d567c7aee30..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.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 JitNetworkAccessPolicyInitiateRequest(Model): - """JitNetworkAccessPolicyInitiateRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. A list of virtual machines & ports to - open access for - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] - """ - - _validation = { - 'virtual_machines': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) - self.virtual_machines = kwargs.get('virtual_machines', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py deleted file mode 100644 index ba6c6cbf2f93..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_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 JitNetworkAccessPolicyInitiateRequest(Model): - """JitNetworkAccessPolicyInitiateRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. A list of virtual machines & ports to - open access for - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] - """ - - _validation = { - 'virtual_machines': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, - } - - def __init__(self, *, virtual_machines, **kwargs) -> None: - super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) - self.virtual_machines = virtual_machines diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py deleted file mode 100644 index e8581019f64d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.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 JitNetworkAccessPolicyInitiateVirtualMachine(Model): - """JitNetworkAccessPolicyInitiateVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports to open for the resource with the `id` - :type ports: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ports = kwargs.get('ports', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py deleted file mode 100644 index bdae532a9308..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_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 JitNetworkAccessPolicyInitiateVirtualMachine(Model): - """JitNetworkAccessPolicyInitiateVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports to open for the resource with the `id` - :type ports: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, - } - - def __init__(self, *, id: str, ports, **kwargs) -> None: - super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) - self.id = id - self.ports = ports diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py deleted file mode 100644 index 87c684afb92e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class JitNetworkAccessPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`JitNetworkAccessPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JitNetworkAccessPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(JitNetworkAccessPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py deleted file mode 100644 index 4e719184b290..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py +++ /dev/null @@ -1,73 +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 JitNetworkAccessPolicy(Model): - """JitNetworkAccessPolicy. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Kind of the resource - :type kind: str - :ivar location: Location where the resource is stored - :vartype location: str - :param virtual_machines: Required. Configurations for - Microsoft.Compute/virtualMachines resource type. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] - :param requests: - :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] - :ivar provisioning_state: Gets the provisioning state of the Just-in-Time - policy. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'virtual_machines': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, - 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, virtual_machines, kind: str=None, requests=None, **kwargs) -> None: - super(JitNetworkAccessPolicy, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = kind - self.location = None - self.virtual_machines = virtual_machines - self.requests = requests - self.provisioning_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py deleted file mode 100644 index 49ce31c7f04e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.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 JitNetworkAccessPolicyVirtualMachine(Model): - """JitNetworkAccessPolicyVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. Port configurations for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ports = kwargs.get('ports', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py deleted file mode 100644 index f315044fbc70..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_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 JitNetworkAccessPolicyVirtualMachine(Model): - """JitNetworkAccessPolicyVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. Port configurations for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, - } - - def __init__(self, *, id: str, ports, **kwargs) -> None: - super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) - self.id = id - self.ports = ports diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py deleted file mode 100644 index 4be40bf43b69..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.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 msrest.serialization import Model - - -class JitNetworkAccessPortRule(Model): - """JitNetworkAccessPortRule. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' - :type protocol: str or ~azure.mgmt.security.models.Protocol - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param max_request_access_duration: Required. Maximum duration requests - can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 - day - :type max_request_access_duration: str - """ - - _validation = { - 'number': {'required': True}, - 'protocol': {'required': True}, - 'max_request_access_duration': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPortRule, self).__init__(**kwargs) - self.number = kwargs.get('number', None) - self.protocol = kwargs.get('protocol', None) - self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) - self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) - self.max_request_access_duration = kwargs.get('max_request_access_duration', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py deleted file mode 100644 index 2d6c223bea49..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.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 msrest.serialization import Model - - -class JitNetworkAccessPortRule(Model): - """JitNetworkAccessPortRule. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' - :type protocol: str or ~azure.mgmt.security.models.Protocol - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param max_request_access_duration: Required. Maximum duration requests - can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 - day - :type max_request_access_duration: str - """ - - _validation = { - 'number': {'required': True}, - 'protocol': {'required': True}, - 'max_request_access_duration': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, - } - - def __init__(self, *, number: int, protocol, max_request_access_duration: str, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, **kwargs) -> None: - super(JitNetworkAccessPortRule, self).__init__(**kwargs) - self.number = number - self.protocol = protocol - self.allowed_source_address_prefix = allowed_source_address_prefix - self.allowed_source_address_prefixes = allowed_source_address_prefixes - self.max_request_access_duration = max_request_access_duration diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py deleted file mode 100644 index 4e3d22353b07..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.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 JitNetworkAccessRequest(Model): - """JitNetworkAccessRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] - :param start_time_utc: Required. The start time of the request in UTC - :type start_time_utc: datetime - :param requestor: Required. The identity of the person who made the - request - :type requestor: str - """ - - _validation = { - 'virtual_machines': {'required': True}, - 'start_time_utc': {'required': True}, - 'requestor': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, - 'requestor': {'key': 'requestor', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessRequest, self).__init__(**kwargs) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.start_time_utc = kwargs.get('start_time_utc', None) - self.requestor = kwargs.get('requestor', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py deleted file mode 100644 index 63212f65aae1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.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 msrest.serialization import Model - - -class JitNetworkAccessRequestPort(Model): - """JitNetworkAccessRequestPort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param end_time_utc: Required. The date & time at which the request ends - in UTC - :type end_time_utc: datetime - :param status: Required. The status of the port. Possible values include: - 'Revoked', 'Initiated' - :type status: str or ~azure.mgmt.security.models.Status - :param status_reason: Required. A description of why the `status` has its - value. Possible values include: 'Expired', 'UserRequested', - 'NewerRequestInitiated' - :type status_reason: str or ~azure.mgmt.security.models.StatusReason - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - 'status': {'required': True}, - 'status_reason': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_reason': {'key': 'statusReason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessRequestPort, self).__init__(**kwargs) - self.number = kwargs.get('number', None) - self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) - self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) - self.end_time_utc = kwargs.get('end_time_utc', None) - self.status = kwargs.get('status', None) - self.status_reason = kwargs.get('status_reason', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py deleted file mode 100644 index 957d7b08bb7a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.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 msrest.serialization import Model - - -class JitNetworkAccessRequestPort(Model): - """JitNetworkAccessRequestPort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param end_time_utc: Required. The date & time at which the request ends - in UTC - :type end_time_utc: datetime - :param status: Required. The status of the port. Possible values include: - 'Revoked', 'Initiated' - :type status: str or ~azure.mgmt.security.models.Status - :param status_reason: Required. A description of why the `status` has its - value. Possible values include: 'Expired', 'UserRequested', - 'NewerRequestInitiated' - :type status_reason: str or ~azure.mgmt.security.models.StatusReason - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - 'status': {'required': True}, - 'status_reason': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_reason': {'key': 'statusReason', 'type': 'str'}, - } - - def __init__(self, *, number: int, end_time_utc, status, status_reason, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, **kwargs) -> None: - super(JitNetworkAccessRequestPort, self).__init__(**kwargs) - self.number = number - self.allowed_source_address_prefix = allowed_source_address_prefix - self.allowed_source_address_prefixes = allowed_source_address_prefixes - self.end_time_utc = end_time_utc - self.status = status - self.status_reason = status_reason diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py deleted file mode 100644 index 4945c427dd93..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_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 JitNetworkAccessRequest(Model): - """JitNetworkAccessRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] - :param start_time_utc: Required. The start time of the request in UTC - :type start_time_utc: datetime - :param requestor: Required. The identity of the person who made the - request - :type requestor: str - """ - - _validation = { - 'virtual_machines': {'required': True}, - 'start_time_utc': {'required': True}, - 'requestor': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, - 'requestor': {'key': 'requestor', 'type': 'str'}, - } - - def __init__(self, *, virtual_machines, start_time_utc, requestor: str, **kwargs) -> None: - super(JitNetworkAccessRequest, self).__init__(**kwargs) - self.virtual_machines = virtual_machines - self.start_time_utc = start_time_utc - self.requestor = requestor diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py deleted file mode 100644 index 7c5ba66b2385..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.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 JitNetworkAccessRequestVirtualMachine(Model): - """JitNetworkAccessRequestVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports that were opened for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ports = kwargs.get('ports', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py deleted file mode 100644 index 7c9ddaa5a4a2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_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 JitNetworkAccessRequestVirtualMachine(Model): - """JitNetworkAccessRequestVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports that were opened for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, - } - - def __init__(self, *, id: str, ports, **kwargs) -> None: - super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) - self.id = id - self.ports = ports diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py deleted file mode 100644 index dafce6cdd7cb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py +++ /dev/null @@ -1,28 +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 Kind(Model): - """Describes an Azure resource with kind. - - :param kind: Kind of the resource - :type kind: str - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Kind, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py deleted file mode 100644 index d77a28e0c975..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py +++ /dev/null @@ -1,28 +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 Kind(Model): - """Describes an Azure resource with kind. - - :param kind: Kind of the resource - :type kind: str - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(Kind, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py deleted file mode 100644 index 852cd020018d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.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 msrest.serialization import Model - - -class Location(Model): - """Describes an Azure resource with location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location where the resource is stored - :vartype location: str - """ - - _validation = { - 'location': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Location, self).__init__(**kwargs) - self.location = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py deleted file mode 100644 index 8203f9cdf30d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_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 msrest.serialization import Model - - -class Location(Model): - """Describes an Azure resource with location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location where the resource is stored - :vartype location: str - """ - - _validation = { - 'location': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Location, self).__init__(**kwargs) - self.location = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py deleted file mode 100644 index 5b91bf6bccf4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.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 msrest.serialization import Model - - -class Operation(Model): - """Possible operation in the REST API of Microsoft.Security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the operation - :vartype name: str - :ivar origin: Where the operation is originated - :vartype origin: str - :param display: - :type display: ~azure.mgmt.security.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.origin = None - self.display = kwargs.get('display', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py deleted file mode 100644 index 624f831a4bfe..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.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 OperationDisplay(Model): - """Security operation display. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The resource provider for the operation. - :vartype provider: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar operation: The display name of the security operation. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _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(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py deleted file mode 100644 index 4403ea324a9f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_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 OperationDisplay(Model): - """Security operation display. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The resource provider for the operation. - :vartype provider: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar operation: The display name of the security operation. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _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) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py deleted file mode 100644 index c9fc34cc5505..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py deleted file mode 100644 index 927bf356676d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_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 msrest.serialization import Model - - -class Operation(Model): - """Possible operation in the REST API of Microsoft.Security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the operation - :vartype name: str - :ivar origin: Where the operation is originated - :vartype origin: str - :param display: - :type display: ~azure.mgmt.security.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.origin = None - self.display = display diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py deleted file mode 100644 index 8201c965f0a5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py +++ /dev/null @@ -1,56 +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 .resource import Resource - - -class Pricing(Resource): - """Pricing tier will be applied for the scope based on the resource ID. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' - :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier - :ivar free_trial_remaining_time: The duration left for the subscriptions - free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). - :vartype free_trial_remaining_time: timedelta - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'pricing_tier': {'required': True}, - 'free_trial_remaining_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, - 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(Pricing, self).__init__(**kwargs) - self.pricing_tier = kwargs.get('pricing_tier', None) - self.free_trial_remaining_time = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py deleted file mode 100644 index 5c461c74609d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.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 PricingList(Model): - """List of pricing configurations response. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of pricing configurations - :type value: list[~azure.mgmt.security.models.Pricing] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Pricing]'}, - } - - def __init__(self, **kwargs): - super(PricingList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py deleted file mode 100644 index 564f6bab68b9..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_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 PricingList(Model): - """List of pricing configurations response. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of pricing configurations - :type value: list[~azure.mgmt.security.models.Pricing] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Pricing]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(PricingList, self).__init__(**kwargs) - self.value = value diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py deleted file mode 100644 index cab29e683d39..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py +++ /dev/null @@ -1,56 +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 .resource_py3 import Resource - - -class Pricing(Resource): - """Pricing tier will be applied for the scope based on the resource ID. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' - :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier - :ivar free_trial_remaining_time: The duration left for the subscriptions - free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). - :vartype free_trial_remaining_time: timedelta - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'pricing_tier': {'required': True}, - 'free_trial_remaining_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, - 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, - } - - def __init__(self, *, pricing_tier, **kwargs) -> None: - super(Pricing, self).__init__(**kwargs) - self.pricing_tier = pricing_tier - self.free_trial_remaining_time = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py deleted file mode 100644 index 9c6150ed498e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.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 msrest.serialization import Model - - -class Resource(Model): - """Describes an Azure 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: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py deleted file mode 100644 index d19d439b8bc0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_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 msrest.serialization import Model - - -class Resource(Model): - """Describes an Azure 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: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py deleted file mode 100644 index d075c87db018..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ /dev/null @@ -1,98 +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 PricingTier(str, Enum): - - free = "Free" #: Get free Azure security center experience with basic security features - standard = "Standard" #: Get the standard Azure security center experience with advanced security features - - -class ReportedSeverity(str, Enum): - - informational = "Informational" - low = "Low" - medium = "Medium" - high = "High" - - -class SettingKind(str, Enum): - - data_export_setting = "DataExportSetting" - alert_suppression_setting = "AlertSuppressionSetting" - - -class SecurityFamily(str, Enum): - - waf = "Waf" - ngfw = "Ngfw" - saas_waf = "SaasWaf" - va = "Va" - - -class AadConnectivityState(str, Enum): - - discovered = "Discovered" - not_licensed = "NotLicensed" - connected = "Connected" - - -class ExternalSecuritySolutionKind(str, Enum): - - cef = "CEF" - ata = "ATA" - aad = "AAD" - - -class Protocol(str, Enum): - - tcp = "TCP" - udp = "UDP" - all = "*" - - -class Status(str, Enum): - - revoked = "Revoked" - initiated = "Initiated" - - -class StatusReason(str, Enum): - - expired = "Expired" - user_requested = "UserRequested" - newer_request_initiated = "NewerRequestInitiated" - - -class AutoProvision(str, Enum): - - on = "On" #: Install missing security agent on VMs automatically - off = "Off" #: Do not install security agent on the VMs automatically - - -class AlertNotifications(str, Enum): - - on = "On" #: Get notifications on new alerts - off = "Off" #: Don't get notifications on new alerts - - -class AlertsToAdmins(str, Enum): - - on = "On" #: Send notification on new alerts to the subscription's admins - off = "Off" #: Don't send notification on new alerts to the subscription's admins - - -class ConnectionType(str, Enum): - - internal = "Internal" - external = "External" diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py deleted file mode 100644 index 43926670b0ec..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.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 .resource import Resource - - -class SecurityContact(Resource): - """Contact details for security issues. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param email: Required. The email of this security contact - :type email: str - :param phone: The phone number of this security contact - :type phone: str - :param alert_notifications: Required. Whether to send security alerts - notifications to the security contact. Possible values include: 'On', - 'Off' - :type alert_notifications: str or - ~azure.mgmt.security.models.AlertNotifications - :param alerts_to_admins: Required. Whether to send security alerts - notifications to subscription admins. Possible values include: 'On', 'Off' - :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'email': {'required': True}, - 'alert_notifications': {'required': True}, - 'alerts_to_admins': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'phone': {'key': 'properties.phone', 'type': 'str'}, - 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, - 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecurityContact, self).__init__(**kwargs) - self.email = kwargs.get('email', None) - self.phone = kwargs.get('phone', None) - self.alert_notifications = kwargs.get('alert_notifications', None) - self.alerts_to_admins = kwargs.get('alerts_to_admins', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py deleted file mode 100644 index a422f9bd58b7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class SecurityContactPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecurityContact ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecurityContact]'} - } - - def __init__(self, *args, **kwargs): - - super(SecurityContactPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py deleted file mode 100644 index 6a78f995545a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_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 .resource_py3 import Resource - - -class SecurityContact(Resource): - """Contact details for security issues. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param email: Required. The email of this security contact - :type email: str - :param phone: The phone number of this security contact - :type phone: str - :param alert_notifications: Required. Whether to send security alerts - notifications to the security contact. Possible values include: 'On', - 'Off' - :type alert_notifications: str or - ~azure.mgmt.security.models.AlertNotifications - :param alerts_to_admins: Required. Whether to send security alerts - notifications to subscription admins. Possible values include: 'On', 'Off' - :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'email': {'required': True}, - 'alert_notifications': {'required': True}, - 'alerts_to_admins': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'phone': {'key': 'properties.phone', 'type': 'str'}, - 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, - 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, - } - - def __init__(self, *, email: str, alert_notifications, alerts_to_admins, phone: str=None, **kwargs) -> None: - super(SecurityContact, self).__init__(**kwargs) - self.email = email - self.phone = phone - self.alert_notifications = alert_notifications - self.alerts_to_admins = alerts_to_admins diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py deleted file mode 100644 index 239a28c5e53e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py +++ /dev/null @@ -1,68 +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 .resource import Resource - - -class SecurityTask(Resource): - """Security task that we recommend to do in order to strengthen security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar state: State of the task (Active, Resolved etc.) - :vartype state: str - :ivar creation_time_utc: The time this task was discovered in UTC - :vartype creation_time_utc: datetime - :param security_task_parameters: - :type security_task_parameters: - ~azure.mgmt.security.models.SecurityTaskParameters - :ivar last_state_change_time_utc: The time this task's details were last - changed in UTC - :vartype last_state_change_time_utc: datetime - :ivar sub_state: Additional data on the state of the task - :vartype sub_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_time_utc': {'readonly': True}, - 'last_state_change_time_utc': {'readonly': True}, - 'sub_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, - 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, - 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, - 'sub_state': {'key': 'properties.subState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecurityTask, self).__init__(**kwargs) - self.state = None - self.creation_time_utc = None - self.security_task_parameters = kwargs.get('security_task_parameters', None) - self.last_state_change_time_utc = None - self.sub_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py deleted file mode 100644 index 99856db41035..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class SecurityTaskPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecurityTask ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecurityTask]'} - } - - def __init__(self, *args, **kwargs): - - super(SecurityTaskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py deleted file mode 100644 index 43150ace1c41..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.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 SecurityTaskParameters(Model): - """Changing set of properties, depending on the task type that is derived from - the name field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar name: Name of the task type - :vartype name: str - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecurityTaskParameters, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.name = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py deleted file mode 100644 index e7bbe4d7bbea..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_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 SecurityTaskParameters(Model): - """Changing set of properties, depending on the task type that is derived from - the name field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar name: Name of the task type - :vartype name: str - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(SecurityTaskParameters, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.name = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py deleted file mode 100644 index d29d10479772..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py +++ /dev/null @@ -1,68 +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 .resource_py3 import Resource - - -class SecurityTask(Resource): - """Security task that we recommend to do in order to strengthen security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar state: State of the task (Active, Resolved etc.) - :vartype state: str - :ivar creation_time_utc: The time this task was discovered in UTC - :vartype creation_time_utc: datetime - :param security_task_parameters: - :type security_task_parameters: - ~azure.mgmt.security.models.SecurityTaskParameters - :ivar last_state_change_time_utc: The time this task's details were last - changed in UTC - :vartype last_state_change_time_utc: datetime - :ivar sub_state: Additional data on the state of the task - :vartype sub_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_time_utc': {'readonly': True}, - 'last_state_change_time_utc': {'readonly': True}, - 'sub_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, - 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, - 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, - 'sub_state': {'key': 'properties.subState', 'type': 'str'}, - } - - def __init__(self, *, security_task_parameters=None, **kwargs) -> None: - super(SecurityTask, self).__init__(**kwargs) - self.state = None - self.creation_time_utc = None - self.security_task_parameters = security_task_parameters - self.last_state_change_time_utc = None - self.sub_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py deleted file mode 100644 index 09fd4a0bee30..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.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 SensitivityLabel(Model): - """The sensitivity label. - - :param display_name: The name of the sensitivity label. - :type display_name: str - :param order: The order of the sensitivity label. - :type order: float - :param enabled: Indicates whether the label is enabled or not. - :type enabled: bool - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SensitivityLabel, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.order = kwargs.get('order', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py deleted file mode 100644 index 79b0766f48c8..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_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 SensitivityLabel(Model): - """The sensitivity label. - - :param display_name: The name of the sensitivity label. - :type display_name: str - :param order: The order of the sensitivity label. - :type order: float - :param enabled: Indicates whether the label is enabled or not. - :type enabled: bool - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, display_name: str=None, order: float=None, enabled: bool=None, **kwargs) -> None: - super(SensitivityLabel, self).__init__(**kwargs) - self.display_name = display_name - self.order = order - self.enabled = enabled diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py deleted file mode 100644 index 9dd2c8f9944c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.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 .setting_resource import SettingResource - - -class Setting(SettingResource): - """Represents a security setting in Azure Security Center. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Setting, self).__init__(**kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py deleted file mode 100644 index 5ab8b2585b4a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class SettingPaged(Paged): - """ - A paging container for iterating over a list of :class:`Setting ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Setting]'} - } - - def __init__(self, *args, **kwargs): - - super(SettingPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py deleted file mode 100644 index 0611d4ebdd49..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_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 .setting_resource_py3 import SettingResource - - -class Setting(SettingResource): - """Represents a security setting in Azure Security Center. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind, **kwargs) -> None: - super(Setting, self).__init__(kind=kind, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py deleted file mode 100644 index d20bda7cab66..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.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 .resource import Resource - - -class SettingResource(Resource): - """The kind of the security setting. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SettingResource, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py deleted file mode 100644 index 4feeff7166c5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.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 .resource_py3 import Resource - - -class SettingResource(Resource): - """The kind of the security setting. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind, **kwargs) -> None: - super(SettingResource, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py deleted file mode 100644 index 6bf07b3d3164..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.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 TopologyResource(Model): - """TopologyResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :ivar calculated_date_time: The UTC time on which the topology was - calculated - :vartype calculated_date_time: datetime - :ivar topology_resources: Azure resources which are part of this topology - resource - :vartype topology_resources: - list[~azure.mgmt.security.models.TopologySingleResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'topology_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, - } - - def __init__(self, **kwargs): - super(TopologyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.topology_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py deleted file mode 100644 index 8c104aa5970a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class TopologyResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`TopologyResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TopologyResource]'} - } - - def __init__(self, *args, **kwargs): - - super(TopologyResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py deleted file mode 100644 index 00cca774a552..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_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 TopologyResource(Model): - """TopologyResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :ivar calculated_date_time: The UTC time on which the topology was - calculated - :vartype calculated_date_time: datetime - :ivar topology_resources: Azure resources which are part of this topology - resource - :vartype topology_resources: - list[~azure.mgmt.security.models.TopologySingleResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'topology_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.topology_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py deleted file mode 100644 index f79f4c0f1a73..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 TopologySingleResource(Model): - """TopologySingleResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id - :vartype resource_id: str - :ivar severity: The security severity of the resource - :vartype severity: str - :ivar recommendations_exist: Indicates if the resource has security - recommendations - :vartype recommendations_exist: bool - :ivar network_zones: Indicates the resource connectivity level to the - Internet (InternetFacing, Internal ,etc.) - :vartype network_zones: str - :ivar topology_score: Score of the resource based on its security severity - :vartype topology_score: int - :ivar location: The location of this resource - :vartype location: str - :ivar parents: Azure resources connected to this resource which are in - higher level in the topology view - :vartype parents: - list[~azure.mgmt.security.models.TopologySingleResourceParent] - :ivar children: Azure resources connected to this resource which are in - lower level in the topology view - :vartype children: - list[~azure.mgmt.security.models.TopologySingleResourceChild] - """ - - _validation = { - 'resource_id': {'readonly': True}, - 'severity': {'readonly': True}, - 'recommendations_exist': {'readonly': True}, - 'network_zones': {'readonly': True}, - 'topology_score': {'readonly': True}, - 'location': {'readonly': True}, - 'parents': {'readonly': True}, - 'children': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, - 'network_zones': {'key': 'networkZones', 'type': 'str'}, - 'topology_score': {'key': 'topologyScore', 'type': 'int'}, - 'location': {'key': 'location', 'type': 'str'}, - 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, - 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, - } - - def __init__(self, **kwargs): - super(TopologySingleResource, self).__init__(**kwargs) - self.resource_id = None - self.severity = None - self.recommendations_exist = None - self.network_zones = None - self.topology_score = None - self.location = None - self.parents = None - self.children = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py deleted file mode 100644 index 257d81aab76d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.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 TopologySingleResourceChild(Model): - """TopologySingleResourceChild. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as child resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TopologySingleResourceChild, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py deleted file mode 100644 index a4e41c33fe64..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_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 TopologySingleResourceChild(Model): - """TopologySingleResourceChild. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as child resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologySingleResourceChild, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py deleted file mode 100644 index c79aba299feb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.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 TopologySingleResourceParent(Model): - """TopologySingleResourceParent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as parent resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TopologySingleResourceParent, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py deleted file mode 100644 index 6249dcea8849..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_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 TopologySingleResourceParent(Model): - """TopologySingleResourceParent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as parent resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologySingleResourceParent, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py deleted file mode 100644 index 529974e5619a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 TopologySingleResource(Model): - """TopologySingleResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id - :vartype resource_id: str - :ivar severity: The security severity of the resource - :vartype severity: str - :ivar recommendations_exist: Indicates if the resource has security - recommendations - :vartype recommendations_exist: bool - :ivar network_zones: Indicates the resource connectivity level to the - Internet (InternetFacing, Internal ,etc.) - :vartype network_zones: str - :ivar topology_score: Score of the resource based on its security severity - :vartype topology_score: int - :ivar location: The location of this resource - :vartype location: str - :ivar parents: Azure resources connected to this resource which are in - higher level in the topology view - :vartype parents: - list[~azure.mgmt.security.models.TopologySingleResourceParent] - :ivar children: Azure resources connected to this resource which are in - lower level in the topology view - :vartype children: - list[~azure.mgmt.security.models.TopologySingleResourceChild] - """ - - _validation = { - 'resource_id': {'readonly': True}, - 'severity': {'readonly': True}, - 'recommendations_exist': {'readonly': True}, - 'network_zones': {'readonly': True}, - 'topology_score': {'readonly': True}, - 'location': {'readonly': True}, - 'parents': {'readonly': True}, - 'children': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, - 'network_zones': {'key': 'networkZones', 'type': 'str'}, - 'topology_score': {'key': 'topologyScore', 'type': 'int'}, - 'location': {'key': 'location', 'type': 'str'}, - 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, - 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologySingleResource, self).__init__(**kwargs) - self.resource_id = None - self.severity = None - self.recommendations_exist = None - self.network_zones = None - self.topology_score = None - self.location = None - self.parents = None - self.children = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py deleted file mode 100644 index 327a5b9d8897..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.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 .resource import Resource - - -class WorkspaceSetting(Resource): - """Configures where to store the OMS agent data for workspaces under a scope. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param workspace_id: Required. The full Azure ID of the workspace to save - the data in - :type workspace_id: str - :param scope: Required. All the VMs in this scope will send their security - data to the mentioned workspace unless overridden by a setting with more - specific scope - :type scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workspace_id': {'required': True}, - 'scope': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkspaceSetting, self).__init__(**kwargs) - self.workspace_id = kwargs.get('workspace_id', None) - self.scope = kwargs.get('scope', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py deleted file mode 100644 index 95122f57b90e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class WorkspaceSettingPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkspaceSetting ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkspaceSetting]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkspaceSettingPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py deleted file mode 100644 index aaa1be0b59a9..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.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 .resource_py3 import Resource - - -class WorkspaceSetting(Resource): - """Configures where to store the OMS agent data for workspaces under a scope. - - 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 id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param workspace_id: Required. The full Azure ID of the workspace to save - the data in - :type workspace_id: str - :param scope: Required. All the VMs in this scope will send their security - data to the mentioned workspace unless overridden by a setting with more - specific scope - :type scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workspace_id': {'required': True}, - 'scope': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, *, workspace_id: str, scope: str, **kwargs) -> None: - super(WorkspaceSetting, self).__init__(**kwargs) - self.workspace_id = workspace_id - self.scope = scope diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py index 23522fd792f8..2044043fcb95 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py @@ -9,32 +9,56 @@ # regenerated. # -------------------------------------------------------------------------- -from .pricings_operations import PricingsOperations -from .alerts_operations import AlertsOperations -from .settings_operations import SettingsOperations -from .allowed_connections_operations import AllowedConnectionsOperations -from .discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations -from .external_security_solutions_operations import ExternalSecuritySolutionsOperations -from .jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations -from .locations_operations import LocationsOperations -from .operations import Operations -from .tasks_operations import TasksOperations -from .topology_operations import TopologyOperations -from .advanced_threat_protection_operations import AdvancedThreatProtectionOperations -from .auto_provisioning_settings_operations import AutoProvisioningSettingsOperations -from .compliances_operations import CompliancesOperations -from .information_protection_policies_operations import InformationProtectionPoliciesOperations -from .security_contacts_operations import SecurityContactsOperations -from .workspace_settings_operations import WorkspaceSettingsOperations +from ._compliance_results_operations import ComplianceResultsOperations +from ._pricings_operations import PricingsOperations +from ._alerts_operations import AlertsOperations +from ._settings_operations import SettingsOperations +from ._io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations +from ._io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from ._iot_security_solution_operations import IotSecuritySolutionOperations +from ._io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations +from ._io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from ._io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from ._io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from ._io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations +from ._allowed_connections_operations import AllowedConnectionsOperations +from ._discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations +from ._external_security_solutions_operations import ExternalSecuritySolutionsOperations +from ._jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations +from ._adaptive_application_controls_operations import AdaptiveApplicationControlsOperations +from ._locations_operations import LocationsOperations +from ._operations import Operations +from ._tasks_operations import TasksOperations +from ._topology_operations import TopologyOperations +from ._advanced_threat_protection_operations import AdvancedThreatProtectionOperations +from ._auto_provisioning_settings_operations import AutoProvisioningSettingsOperations +from ._compliances_operations import CompliancesOperations +from ._information_protection_policies_operations import InformationProtectionPoliciesOperations +from ._security_contacts_operations import SecurityContactsOperations +from ._workspace_settings_operations import WorkspaceSettingsOperations +from ._regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations +from ._regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations +from ._regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations +from ._server_vulnerability_assessment_operations import ServerVulnerabilityAssessmentOperations __all__ = [ + 'ComplianceResultsOperations', 'PricingsOperations', 'AlertsOperations', 'SettingsOperations', + 'IoTSecuritySolutionsOperations', + 'IoTSecuritySolutionsResourceGroupOperations', + 'IotSecuritySolutionOperations', + 'IoTSecuritySolutionsAnalyticsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationsOperations', 'AllowedConnectionsOperations', 'DiscoveredSecuritySolutionsOperations', 'ExternalSecuritySolutionsOperations', 'JitNetworkAccessPoliciesOperations', + 'AdaptiveApplicationControlsOperations', 'LocationsOperations', 'Operations', 'TasksOperations', @@ -45,4 +69,8 @@ 'InformationProtectionPoliciesOperations', 'SecurityContactsOperations', 'WorkspaceSettingsOperations', + 'RegulatoryComplianceStandardsOperations', + 'RegulatoryComplianceControlsOperations', + 'RegulatoryComplianceAssessmentsOperations', + 'ServerVulnerabilityAssessmentOperations', ] diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py new file mode 100644 index 000000000000..bab90ed88dee --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py @@ -0,0 +1,228 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AdaptiveApplicationControlsOperations(object): + """AdaptiveApplicationControlsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, include_path_recommendations=None, summary=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of application control VM/server groups for the + subscription. + + :param include_path_recommendations: Include the policy rules + :type include_path_recommendations: bool + :param summary: Return output in a summarized form + :type summary: bool + :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: AppWhitelistingGroups or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AppWhitelistingGroups or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + 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') + if include_path_recommendations is not None: + query_parameters['includePathRecommendations'] = self._serialize.query("include_path_recommendations", include_path_recommendations, 'bool') + if summary is not None: + query_parameters['summary'] = self._serialize.query("summary", summary, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppWhitelistingGroups', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings'} + + def get( + self, group_name, custom_headers=None, raw=False, **operation_config): + """Gets an application control VM/server group. + + :param group_name: Name of an application control VM/server group + :type group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppWhitelistingGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AppWhitelistingGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppWhitelistingGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'} + + def put( + self, group_name, body, custom_headers=None, raw=False, **operation_config): + """Update an application control VM/server group. + + :param group_name: Name of an application control VM/server group + :type group_name: str + :param body: The updated VM/server group data + :type body: ~azure.mgmt.security.models.AppWhitelistingPutGroupData + :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: AppWhitelistingGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AppWhitelistingGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.put.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(body, 'AppWhitelistingPutGroupData') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppWhitelistingGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/advanced_threat_protection_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py similarity index 98% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/advanced_threat_protection_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py index 2bdef2916fbc..57930d189083 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/advanced_threat_protection_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py @@ -19,6 +19,8 @@ class AdvancedThreatProtectionOperations(object): """AdvancedThreatProtectionOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -89,7 +91,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AdvancedThreatProtectionSetting', response) @@ -159,7 +160,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AdvancedThreatProtectionSetting', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_alerts_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_alerts_operations.py index d0d86845ded3..984144031f99 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_alerts_operations.py @@ -19,6 +19,8 @@ class AlertsOperations(object): """AlertsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,8 +59,7 @@ def list( ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/alerts'} @@ -136,8 +140,7 @@ def list_by_resource_group( ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -173,6 +176,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -183,12 +191,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/alerts'} @@ -214,8 +220,7 @@ def list_subscription_level_alerts_by_region( ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_subscription_level_alerts_by_region.metadata['url'] @@ -251,6 +256,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -261,12 +271,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_subscription_level_alerts_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts'} @@ -295,8 +303,7 @@ def list_resource_group_level_alerts_by_region( ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_resource_group_level_alerts_by_region.metadata['url'] @@ -333,6 +340,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -343,12 +355,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_resource_group_level_alerts_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts'} @@ -402,7 +412,6 @@ def get_subscription_level_alert( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -467,7 +476,6 @@ def get_resource_group_level_alerts( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_allowed_connections_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_allowed_connections_operations.py index 2d97b7366913..8aa4cd8ba546 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_allowed_connections_operations.py @@ -19,6 +19,8 @@ class AllowedConnectionsOperations(object): """AllowedConnectionsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -52,8 +54,7 @@ def list( ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -82,6 +83,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -92,12 +98,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections'} @@ -117,8 +121,7 @@ def list_by_home_region( ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -148,6 +151,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -158,12 +166,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections'} @@ -224,7 +230,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AllowedConnectionsResource', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/auto_provisioning_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_auto_provisioning_settings_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/auto_provisioning_settings_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_auto_provisioning_settings_operations.py index 9d6eccd8d530..3390cc0eb08b 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/auto_provisioning_settings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_auto_provisioning_settings_operations.py @@ -19,6 +19,8 @@ class AutoProvisioningSettingsOperations(object): """AutoProvisioningSettingsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.AutoProvisioningSettingPaged[~azure.mgmt.security.models.AutoProvisioningSetting] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AutoProvisioningSettingPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AutoProvisioningSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AutoProvisioningSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings'} @@ -149,7 +153,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AutoProvisioningSetting', response) @@ -217,7 +220,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AutoProvisioningSetting', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py new file mode 100644 index 000000000000..9b163bbbb1e0 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py @@ -0,0 +1,171 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ComplianceResultsOperations(object): + """ComplianceResultsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01" + + self.config = config + + def list( + self, scope, custom_headers=None, raw=False, **operation_config): + """Security compliance results in the subscription. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComplianceResult + :rtype: + ~azure.mgmt.security.models.ComplianceResultPaged[~azure.mgmt.security.models.ComplianceResult] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ComplianceResultPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Security/complianceResults'} + + def get( + self, resource_id, compliance_result_name, custom_headers=None, raw=False, **operation_config): + """Security Compliance Result. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param compliance_result_name: name of the desired assessment + compliance result + :type compliance_result_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ComplianceResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.ComplianceResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'complianceResultName': self._serialize.url("compliance_result_name", compliance_result_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ComplianceResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/complianceResults/{complianceResultName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliances_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliances_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py index 3edc73a4fc32..90e921623526 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliances_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py @@ -19,6 +19,8 @@ class CompliancesOperations(object): """CompliancesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,8 +57,7 @@ def list( ~azure.mgmt.security.models.CompliancePaged[~azure.mgmt.security.models.Compliance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -85,6 +86,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -95,12 +101,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CompliancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CompliancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CompliancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.Security/compliances'} @@ -157,7 +161,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Compliance', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/discovered_security_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_discovered_security_solutions_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/discovered_security_solutions_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_discovered_security_solutions_operations.py index 339bbfddd5bf..bd553e4567fd 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/discovered_security_solutions_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_discovered_security_solutions_operations.py @@ -19,6 +19,8 @@ class DiscoveredSecuritySolutionsOperations(object): """DiscoveredSecuritySolutionsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.DiscoveredSecuritySolutionPaged[~azure.mgmt.security.models.DiscoveredSecuritySolution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/discoveredSecuritySolutions'} @@ -116,8 +120,7 @@ def list_by_home_region( ~azure.mgmt.security.models.DiscoveredSecuritySolutionPaged[~azure.mgmt.security.models.DiscoveredSecuritySolution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -147,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -157,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions'} @@ -221,7 +227,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DiscoveredSecuritySolution', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/external_security_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_external_security_solutions_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/external_security_solutions_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_external_security_solutions_operations.py index 3286ae570426..69b6019e5e25 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/external_security_solutions_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_external_security_solutions_operations.py @@ -19,6 +19,8 @@ class ExternalSecuritySolutionsOperations(object): """ExternalSecuritySolutionsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.ExternalSecuritySolutionPaged[~azure.mgmt.security.models.ExternalSecuritySolution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/externalSecuritySolutions'} @@ -116,8 +120,7 @@ def list_by_home_region( ~azure.mgmt.security.models.ExternalSecuritySolutionPaged[~azure.mgmt.security.models.ExternalSecuritySolution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -147,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -157,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions'} @@ -221,7 +227,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExternalSecuritySolution', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/information_protection_policies_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/information_protection_policies_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py index d4c5fe7329b4..9ee97c1bbf93 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/information_protection_policies_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py @@ -19,6 +19,8 @@ class InformationProtectionPoliciesOperations(object): """InformationProtectionPoliciesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -90,7 +92,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('InformationProtectionPolicy', response) @@ -154,7 +155,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('InformationProtectionPolicy', response) if response.status_code == 201: @@ -185,8 +185,7 @@ def list( ~azure.mgmt.security.models.InformationProtectionPolicyPaged[~azure.mgmt.security.models.InformationProtectionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -215,6 +214,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -225,12 +229,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.InformationProtectionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.InformationProtectionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.InformationProtectionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.Security/informationProtectionPolicies'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py new file mode 100644 index 000000000000..b4a3340cf7e6 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py @@ -0,0 +1,162 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsAggregatedAlertOperations(object): + """IoTSecuritySolutionsAnalyticsAggregatedAlertOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def get( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param aggregated_alert_name: Identifier of the aggregated alert + :type aggregated_alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecurityAggregatedAlert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecurityAggregatedAlert or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecurityAggregatedAlert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}'} + + def dismiss( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param aggregated_alert_name: Identifier of the aggregated alert + :type aggregated_alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.dismiss.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + dismiss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}/dismiss'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py new file mode 100644 index 000000000000..8e47ea54d879 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations(object): + """IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, resource_group_name, solution_name, top=None, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param top: The number of results to retrieve. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecurityAggregatedAlert + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedAlertPaged[~azure.mgmt.security.models.IoTSecurityAggregatedAlert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IoTSecurityAggregatedAlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py new file mode 100644 index 000000000000..70e6b43692b5 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsOperations(object): + """IoTSecuritySolutionsAnalyticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def get_all( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionAnalyticsModelList or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionAnalyticsModelList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels'} + + def get_default( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionAnalyticsModel or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_default.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionAnalyticsModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_default.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py new file mode 100644 index 000000000000..3e251e9f060e --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsRecommendationOperations(object): + """IoTSecuritySolutionsAnalyticsRecommendationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def get( + self, resource_group_name, solution_name, aggregated_recommendation_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param aggregated_recommendation_name: Identifier of the aggregated + recommendation + :type aggregated_recommendation_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecurityAggregatedRecommendation or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedRecommendationName': self._serialize.url("aggregated_recommendation_name", aggregated_recommendation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecurityAggregatedRecommendation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py new file mode 100644 index 000000000000..3276e998ec1a --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsRecommendationsOperations(object): + """IoTSecuritySolutionsAnalyticsRecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, resource_group_name, solution_name, top=None, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param top: The number of results to retrieve. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + IoTSecurityAggregatedRecommendation + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendationPaged[~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IoTSecurityAggregatedRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py new file mode 100644 index 000000000000..b3f222701615 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.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. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsOperations(object): + """IoTSecuritySolutionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """List of security solutions. + + :param filter: filter the Security Solution with OData syntax. + supporting filter by iotHubs + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + 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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py new file mode 100644 index 000000000000..1536a6eb452c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsResourceGroupOperations(object): + """IoTSecuritySolutionsResourceGroupOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """List of security solutions. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param filter: filter the Security Solution with OData syntax. + supporting filter by iotHubs + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + 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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py new file mode 100644 index 000000000000..3a3c15481184 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py @@ -0,0 +1,297 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IotSecuritySolutionOperations(object): + """IotSecuritySolutionOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def get( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Details of a specific iot security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def create( + self, resource_group_name, solution_name, iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """Create new solution manager. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param iot_security_solution_data: The security solution data + :type iot_security_solution_data: + ~azure.mgmt.security.models.IoTSecuritySolutionModel + :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: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(iot_security_solution_data, 'IoTSecuritySolutionModel') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + if response.status_code == 201: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def update( + self, resource_group_name, solution_name, update_iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """update existing Security Solution tags or user defined resources. To + update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param update_iot_security_solution_data: The security solution data + :type update_iot_security_solution_data: + ~azure.mgmt.security.models.UpdateIotSecuritySolutionData + :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: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_iot_security_solution_data, 'UpdateIotSecuritySolutionData') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def delete( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Create new solution manager. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/jit_network_access_policies_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_jit_network_access_policies_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/jit_network_access_policies_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_jit_network_access_policies_operations.py index a8b9c88bed35..48df52e84dba 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/jit_network_access_policies_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_jit_network_access_policies_operations.py @@ -19,6 +19,8 @@ class JitNetworkAccessPoliciesOperations(object): """JitNetworkAccessPoliciesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -83,6 +84,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/jitNetworkAccessPolicies'} @@ -118,8 +122,7 @@ def list_by_region( ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_region.metadata['url'] @@ -149,6 +152,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -159,12 +167,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'} @@ -187,8 +193,7 @@ def list_by_resource_group( ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -218,6 +223,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -228,12 +238,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/jitNetworkAccessPolicies'} @@ -256,8 +264,7 @@ def list_by_resource_group_and_region( ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group_and_region.metadata['url'] @@ -288,6 +295,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -298,12 +310,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group_and_region.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'} @@ -363,7 +373,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JitNetworkAccessPolicy', response) @@ -435,7 +444,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JitNetworkAccessPolicy', response) @@ -568,7 +576,6 @@ def initiate( raise exp deserialized = None - if response.status_code == 202: deserialized = self._deserialize('JitNetworkAccessRequest', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/locations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_locations_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/locations_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_locations_operations.py index 5aa7ba17569f..df6c428164d3 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/locations_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_locations_operations.py @@ -19,6 +19,8 @@ class LocationsOperations(object): """LocationsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,8 +56,7 @@ def list( ~azure.mgmt.security.models.AscLocationPaged[~azure.mgmt.security.models.AscLocation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -84,6 +85,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -94,12 +100,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AscLocationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AscLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AscLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations'} @@ -150,7 +154,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AscLocation', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_operations.py similarity index 90% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_operations.py index 5a2cacc56e2f..2f400c9b62e9 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.OperationPaged[~azure.mgmt.security.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Security/operations'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py similarity index 87% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py index 85177f446714..02e06e34875c 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py @@ -19,6 +19,8 @@ class PricingsOperations(object): """PricingsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -39,7 +41,10 @@ def __init__(self, client, config, serializer, deserializer): def list( self, custom_headers=None, raw=False, **operation_config): - """Security pricing configurations in the subscription. + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -82,7 +87,6 @@ def list( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PricingList', response) @@ -95,7 +99,10 @@ def list( def get( self, pricing_name, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. :param pricing_name: name of the pricing configuration :type pricing_name: str @@ -141,7 +148,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Pricing', response) @@ -154,12 +160,18 @@ def get( def update( self, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. :param pricing_name: name of the pricing configuration :type pricing_name: str - :param pricing_tier: The pricing tier value. Possible values include: - 'Free', 'Standard' + :param pricing_tier: The pricing tier value. Azure Security Center is + provided in two pricing tiers: free and standard, with the standard + tier available with a trial period. The standard tier offers advanced + security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -209,7 +221,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Pricing', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py new file mode 100644 index 000000000000..353ea103d365 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py @@ -0,0 +1,188 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RegulatoryComplianceAssessmentsOperations(object): + """RegulatoryComplianceAssessmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, regulatory_compliance_standard_name, regulatory_compliance_control_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Details and state of assessments mapped to selected regulatory + compliance control. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegulatoryComplianceAssessment + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceAssessmentPaged[~azure.mgmt.security.models.RegulatoryComplianceAssessment] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments'} + + def get( + self, regulatory_compliance_standard_name, regulatory_compliance_control_name, regulatory_compliance_assessment_name, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance details and state for selected + assessment. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param regulatory_compliance_assessment_name: Name of the regulatory + compliance assessment object + :type regulatory_compliance_assessment_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegulatoryComplianceAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str'), + 'regulatoryComplianceAssessmentName': self._serialize.url("regulatory_compliance_assessment_name", regulatory_compliance_assessment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegulatoryComplianceAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py new file mode 100644 index 000000000000..21bb45c57662 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py @@ -0,0 +1,178 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RegulatoryComplianceControlsOperations(object): + """RegulatoryComplianceControlsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, regulatory_compliance_standard_name, filter=None, custom_headers=None, raw=False, **operation_config): + """All supported regulatory compliance controls details and state for + selected standard. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegulatoryComplianceControl + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceControlPaged[~azure.mgmt.security.models.RegulatoryComplianceControl] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls'} + + def get( + self, regulatory_compliance_standard_name, regulatory_compliance_control_name, custom_headers=None, raw=False, **operation_config): + """Selected regulatory compliance control details and state. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegulatoryComplianceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceControl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegulatoryComplianceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py new file mode 100644 index 000000000000..63cca3001264 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py @@ -0,0 +1,169 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RegulatoryComplianceStandardsOperations(object): + """RegulatoryComplianceStandardsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance standards details and state. + + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegulatoryComplianceStandard + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceStandardPaged[~azure.mgmt.security.models.RegulatoryComplianceStandard] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + 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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards'} + + def get( + self, regulatory_compliance_standard_name, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance details state for selected standard. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegulatoryComplianceStandard or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceStandard or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegulatoryComplianceStandard', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/security_contacts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_contacts_operations.py similarity index 97% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/security_contacts_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_contacts_operations.py index 9a1c12a66205..5b1343256321 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/security_contacts_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_contacts_operations.py @@ -19,6 +19,8 @@ class SecurityContactsOperations(object): """SecurityContactsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.SecurityContactPaged[~azure.mgmt.security.models.SecurityContact] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecurityContactPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecurityContactPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecurityContactPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts'} @@ -149,7 +153,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityContact', response) @@ -214,7 +217,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityContact', response) @@ -329,7 +331,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityContact', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py new file mode 100644 index 000000000000..18722ae2855b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py @@ -0,0 +1,315 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ServerVulnerabilityAssessmentOperations(object): + """ServerVulnerabilityAssessmentOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + :ivar server_vulnerability_assessment: ServerVulnerabilityAssessment status. only a 'default' value is supported. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + self.server_vulnerability_assessment = "default" + + self.config = config + + def list_by_extended_resource( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of server vulnerability assessment onboarding statuses on a + given resource. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerVulnerabilityAssessmentsList or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.ServerVulnerabilityAssessmentsList + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_by_extended_resource.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServerVulnerabilityAssessmentsList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_extended_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments'} + + def get( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a server vulnerability assessment onboarding statuses on a given + resource. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.ServerVulnerabilityAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'serverVulnerabilityAssessment': self._serialize.url("self.server_vulnerability_assessment", self.server_vulnerability_assessment, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServerVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}'} + + def create_or_update( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Creating a server vulnerability assessment on a resource, which will + onboard a resource for having a vulnerability assessment on it. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.ServerVulnerabilityAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'serverVulnerabilityAssessment': self._serialize.url("self.server_vulnerability_assessment", self.server_vulnerability_assessment, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('ServerVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}'} + + def delete( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Removing server vulnerability assessment from a resource. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'serverVulnerabilityAssessment': self._serialize.url("self.server_vulnerability_assessment", self.server_vulnerability_assessment, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py index b36f8f8b2b4b..5dcbe3cd8d9f 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py @@ -19,6 +19,8 @@ class SettingsOperations(object): """SettingsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.SettingPaged[~azure.mgmt.security.models.Setting] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SettingPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SettingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SettingPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings'} @@ -150,7 +154,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Setting', response) @@ -220,7 +223,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Setting', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/tasks_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_tasks_operations.py similarity index 96% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/tasks_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_tasks_operations.py index fc002b8368ed..3fed53ee15dc 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/tasks_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_tasks_operations.py @@ -19,6 +19,8 @@ class TasksOperations(object): """TasksOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,8 +56,7 @@ def list( ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -86,6 +87,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -96,12 +102,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks'} @@ -123,8 +127,7 @@ def list_by_home_region( ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -156,6 +159,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -166,12 +174,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks'} @@ -226,7 +232,6 @@ def get_subscription_level_task( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityTask', response) @@ -314,8 +319,7 @@ def list_by_resource_group( ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -348,6 +352,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -358,12 +367,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks'} @@ -422,7 +429,6 @@ def get_resource_group_level_task( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SecurityTask', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/topology_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_topology_operations.py similarity index 94% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/topology_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_topology_operations.py index 75ba584c21f7..1d6e616bb498 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/topology_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_topology_operations.py @@ -19,6 +19,8 @@ class TopologyOperations(object): """TopologyOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.security.models.TopologyResourcePaged[~azure.mgmt.security.models.TopologyResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/topologies'} @@ -116,8 +120,7 @@ def list_by_home_region( ~azure.mgmt.security.models.TopologyResourcePaged[~azure.mgmt.security.models.TopologyResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_home_region.metadata['url'] @@ -147,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -157,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/topologies'} @@ -221,7 +227,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TopologyResource', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_workspace_settings_operations.py similarity index 97% rename from sdk/security/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py rename to sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_workspace_settings_operations.py index 7c25fa3c51ab..5717490464d3 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_workspace_settings_operations.py @@ -19,6 +19,8 @@ class WorkspaceSettingsOperations(object): """WorkspaceSettingsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.security.models.WorkspaceSettingPaged[~azure.mgmt.security.models.WorkspaceSetting] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -83,6 +84,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WorkspaceSettingPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.WorkspaceSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.WorkspaceSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings'} @@ -153,7 +157,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('WorkspaceSetting', response) @@ -226,7 +229,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('WorkspaceSetting', response) @@ -298,7 +300,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('WorkspaceSetting', response) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py deleted file mode 100644 index 38888caff012..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py +++ /dev/null @@ -1,169 +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 Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.pricings_operations import PricingsOperations -from .operations.alerts_operations import AlertsOperations -from .operations.settings_operations import SettingsOperations -from .operations.allowed_connections_operations import AllowedConnectionsOperations -from .operations.discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations -from .operations.external_security_solutions_operations import ExternalSecuritySolutionsOperations -from .operations.jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations -from .operations.locations_operations import LocationsOperations -from .operations.operations import Operations -from .operations.tasks_operations import TasksOperations -from .operations.topology_operations import TopologyOperations -from .operations.advanced_threat_protection_operations import AdvancedThreatProtectionOperations -from .operations.auto_provisioning_settings_operations import AutoProvisioningSettingsOperations -from .operations.compliances_operations import CompliancesOperations -from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations -from .operations.security_contacts_operations import SecurityContactsOperations -from .operations.workspace_settings_operations import WorkspaceSettingsOperations -from . import models - - -class SecurityCenterConfiguration(AzureConfiguration): - """Configuration for SecurityCenter - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID - :type subscription_id: str - :param asc_location: The location where ASC stores the data of the - subscription. can be retrieved from Get locations - :type asc_location: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, asc_location, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if asc_location is None: - raise ValueError("Parameter 'asc_location' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SecurityCenterConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-security/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - self.asc_location = asc_location - - -class SecurityCenter(SDKClient): - """API spec for Microsoft.Security (Azure Security Center) resource provider - - :ivar config: Configuration for client. - :vartype config: SecurityCenterConfiguration - - :ivar pricings: Pricings operations - :vartype pricings: azure.mgmt.security.operations.PricingsOperations - :ivar alerts: Alerts operations - :vartype alerts: azure.mgmt.security.operations.AlertsOperations - :ivar settings: Settings operations - :vartype settings: azure.mgmt.security.operations.SettingsOperations - :ivar allowed_connections: AllowedConnections operations - :vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations - :ivar discovered_security_solutions: DiscoveredSecuritySolutions operations - :vartype discovered_security_solutions: azure.mgmt.security.operations.DiscoveredSecuritySolutionsOperations - :ivar external_security_solutions: ExternalSecuritySolutions operations - :vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations - :ivar jit_network_access_policies: JitNetworkAccessPolicies operations - :vartype jit_network_access_policies: azure.mgmt.security.operations.JitNetworkAccessPoliciesOperations - :ivar locations: Locations operations - :vartype locations: azure.mgmt.security.operations.LocationsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.security.operations.Operations - :ivar tasks: Tasks operations - :vartype tasks: azure.mgmt.security.operations.TasksOperations - :ivar topology: Topology operations - :vartype topology: azure.mgmt.security.operations.TopologyOperations - :ivar advanced_threat_protection: AdvancedThreatProtection operations - :vartype advanced_threat_protection: azure.mgmt.security.operations.AdvancedThreatProtectionOperations - :ivar auto_provisioning_settings: AutoProvisioningSettings operations - :vartype auto_provisioning_settings: azure.mgmt.security.operations.AutoProvisioningSettingsOperations - :ivar compliances: Compliances operations - :vartype compliances: azure.mgmt.security.operations.CompliancesOperations - :ivar information_protection_policies: InformationProtectionPolicies operations - :vartype information_protection_policies: azure.mgmt.security.operations.InformationProtectionPoliciesOperations - :ivar security_contacts: SecurityContacts operations - :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations - :ivar workspace_settings: WorkspaceSettings operations - :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID - :type subscription_id: str - :param asc_location: The location where ASC stores the data of the - subscription. can be retrieved from Get locations - :type asc_location: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, asc_location, base_url=None): - - self.config = SecurityCenterConfiguration(credentials, subscription_id, asc_location, base_url) - super(SecurityCenter, self).__init__(self.config.credentials, self.config) - - 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.pricings = PricingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.alerts = AlertsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.settings = SettingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.allowed_connections = AllowedConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.external_security_solutions = ExternalSecuritySolutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.jit_network_access_policies = JitNetworkAccessPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.locations = LocationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.tasks = TasksOperations( - self._client, self.config, self._serialize, self._deserialize) - self.topology = TopologyOperations( - self._client, self.config, self._serialize, self._deserialize) - self.advanced_threat_protection = AdvancedThreatProtectionOperations( - self._client, self.config, self._serialize, self._deserialize) - self.auto_provisioning_settings = AutoProvisioningSettingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.compliances = CompliancesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.information_protection_policies = InformationProtectionPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.security_contacts = SecurityContactsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workspace_settings = WorkspaceSettingsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py index 9bd1dfac7ecb..3e682bbd5fb1 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0" +VERSION = "0.3.0" diff --git a/sdk/security/azure-mgmt-security/setup.py b/sdk/security/azure-mgmt-security/setup.py index eaf6f78dff3b..c951aad9ef0d 100644 --- a/sdk/security/azure-mgmt-security/setup.py +++ b/sdk/security/azure-mgmt-security/setup.py @@ -64,7 +64,6 @@ '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', From 33d6e4a8cb8a929e8e47e8e940ff897d87635b4a Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Thu, 1 Aug 2019 14:15:11 -0700 Subject: [PATCH 20/32] Minimal change to disable code coverage publishing for PRs. (#6614) --- eng/pipelines/templates/steps/publish-coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/templates/steps/publish-coverage.yml b/eng/pipelines/templates/steps/publish-coverage.yml index e5e9509965bd..dfc1bcb055e1 100644 --- a/eng/pipelines/templates/steps/publish-coverage.yml +++ b/eng/pipelines/templates/steps/publish-coverage.yml @@ -13,6 +13,7 @@ steps: - task: PublishCodeCoverageResults@1 displayName: 'Publish Code Coverage to DevOps' continueOnError: true + condition: ne(variables['Build.Reason'], 'PullRequest') inputs: codeCoverageTool: Cobertura summaryFileLocation: '$(Build.SourcesDirectory)/coverage.xml' \ No newline at end of file From 0249a7cf41d2be414bd87086b058941ef705e9ef Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 1 Aug 2019 15:48:55 -0700 Subject: [PATCH 21/32] Readme doc update for azure-core (#6611) * Readme doc update * More readme update * Transport update * Typo * typo thanks bryan --- sdk/core/azure-core/README.md | 111 +++++++++++++++++----------------- 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index 1ce5c1d6944c..e1538798cba6 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -27,30 +27,30 @@ from azure.core.pipeline.policies import ( ProxyPolicy ) -class FooServiceClient(): +class FooServiceClient: @staticmethod - def create_config(credential, scopes, **kwargs): + def _create_config(credential, scopes, **kwargs): # Here the SDK developer would define the default # config to interact with the service config = Configuration(**kwargs) - config.headers_policy = HeadersPolicy({"CustomHeader": "Value"}, **kwargs) - config.user_agent_policy = UserAgentPolicy("ServiceUserAgentValue", **kwargs) - config.authentication_policy = BearerTokenCredentialPolicy(credential, scopes, **kwargs) - config.retry_policy = RetryPolicy(**kwargs) - config.redirect_policy = RedirectPolicy(**kwargs) - config.logging_policy = NetworkTraceLoggingPolicy(**kwargs) - config.proxy_policy = ProxyPolicy(**kwargs) - config.transport = kwargs.get('transport', RequestsTransport) - - def __init__(self, transport=None, configuration=None, **kwargs): - config = configuration or FooServiceClient.create_config(**kwargs) - transport = config.get_transport(**kwargs) + config.headers_policy = kwargs.get('headers_policy', HeadersPolicy({"CustomHeader": "Value"}, **kwargs)) + config.user_agent_policy = kwargs.get('user_agent_policy', UserAgentPolicy("ServiceUserAgentValue", **kwargs)) + config.authentication_policy = kwargs.get('authentication_policy', BearerTokenCredentialPolicy(credential, scopes, **kwargs)) + config.retry_policy = kwargs.get('retry_policy', RetryPolicy(**kwargs)) + config.redirect_policy = kwargs.get('redirect_policy', RedirectPolicy(**kwargs)) + config.logging_policy = kwargs.get('logging_policy', NetworkTraceLoggingPolicy(**kwargs)) + config.proxy_policy = kwargs.get('proxy_policy', ProxyPolicy(**kwargs)) + + def __init__(self, **kwargs): + transport = kwargs.get('transport', RequestsTransport(**kwargs)) + config = FooServiceClient._create_config(**kwargs) policies = [ config.user_agent_policy, config.headers_policy, config.authentication_policy, ContentDecodePolicy(), + config.proxy_policy, config.redirect_policy, config.retry_policy, config.logging_policy, @@ -92,15 +92,14 @@ client = FooServiceClient(endpoint, creds) response = client.get_foo_properties(redirects_max=0) # Scenario where user wishes to fully customize the policies. -# We expose the SDK-developer defined configuration to allow it to be tweaked -# or entire policies replaced or patched. -foo_config = FooServiceClient.create_config() - -foo_config.retry_policy = CustomRetryPolicy() -foo_config.redirect_policy.max_redirects = 5 -foo_config.logging_policy.enable_http_logger = True - -client = FooServiceClient(endpoint, creds, config=config) +# All configuration options are passed through kwargs +client = FooServiceClient( + endpoint, + creds, + retry_policy=CustomRetryPolicy() + redirect_max=5, + logging_enable=True +) response = client.get_foo_properties() ``` @@ -110,6 +109,8 @@ The Configuration object is the home of all the configurable policies in the pip A new Configuration object provides *no default policies*. It is up to the SDK developer to specify each of the policy defaults as required by the service. +*Configuration should not be exposed as part of the public API of the resulting SDK.* + This can be seen in the above code sample as implemented in a staticmethod on the client class. The Configuration object does not specify in what order the policies will be added to the pipeline. It is up to the SDK developer to use the policies in the Configuration to construct the pipeline correctly, as well @@ -118,7 +119,7 @@ as inserting any unexposed/non-configurable policies. transport = RequestsTransport(**kwargs) # SDK developer needs to build the policy order for the pipeline. -config = config or FooServiceClient.create_config(**kwargs) +config = FooServiceClient._create_config(**kwargs) policies = [ config.headers_policy, config.user_agent_policy, @@ -137,7 +138,6 @@ The policies that should currently be defined on the Configuration object are as - Configuration.redirect_policy # RedirectPolicy - Configuration.logging_policy # NetworkTraceLoggingPolicy - Configuration.user_agent_policy # UserAgentPolicy -- Configuration.connection # The is a ConnectionConfiguration, used to provide common transport parameters. - Configuration.proxy_policy # While this is a ProxyPolicy object, current implementation is transport configuration. - Configuration.authentication_policy # BearerTokenCredentialPolicy @@ -149,14 +149,14 @@ Various combinations of sync/async HTTP libraries as well as alternative event l The transport is the last node in the pipeline, and adheres to the same basic API as any policy within the pipeline. The only currently available transport for synchronous pipelines uses the `Requests` library: -``` +```python from azure.core.pipeline.transport import RequestsTransport synchronous_transport = RequestsTransport() ``` For asynchronous pipelines a couple of transport options are available. Each of these transports are interchangable depending on whether the user has installed various 3rd party dependencies (i.e. aiohttp or trio), and the user should easily be able to specify their chosen transport. SDK developers should use the `aiohttp` transport as the default for asynchronous pipelines where the user has not specified an alternative. -``` +```python from azure.foo.aio import FooServiceClient from azure.core.pipeline.transport import ( # Identical implementation as the synchronous RequestsTransport wrapped in an asynchronous using the @@ -171,28 +171,30 @@ from azure.core.pipeline.transport import ( AioHttpTransport, ) -client = FooServiceClient(endpoint, creds, transport=AioHttpTransport) +client = FooServiceClient(endpoint, creds, transport=AioHttpTransport()) response = await client.get_foo_properties() ``` -Some common properties can be configured on all transports, and can be set on the ConnectionConfiguration, found in the Configuration object described above. These include the following properties: +Some common properties can be configured on all transports. They must be passed +as kwargs arguments while building the transport instance. These include the following properties: ```python -class ConnectionConfiguration(object): - """Configuration of HTTP transport. - - :param int connection_timeout: The connect and read timeout value. Defaults to 100 seconds. - :param bool connection_verify: SSL certificate verification. Enabled by default. Set to False to disable, - alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. - :param str connection_cert: Client-side certificates. You can specify a local cert to use as client side - certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. - :param int connection_data_block_size: The block size of data sent over the connection. Defaults to 4096 bytes. - """ - - def __init__(self, **kwargs): - self.timeout = kwargs.pop('connection_timeout', 100) - self.verify = kwargs.pop('connection_verify', True) - self.cert = kwargs.pop('connection_cert', None) - self.data_block_size = kwargs.pop('connection_data_block_size', 4096) +transport = AioHttpTransport( + # The connect and read timeout value. Defaults to 100 seconds. + connection_timeout=100, + + # SSL certificate verification. Enabled by default. Set to False to disable, + # alternatively can be set to the path to a CA_BUNDLE file or directory with + # certificates of trusted CAs. + connection_verify=True, + + # Client-side certificates. You can specify a local cert to use as client side + # certificate, as a single file (containing the private key and the certificate) + # or as a # tuple of both files' paths. + connection_cert=None, + + # The block size of data sent over the connection. Defaults to 4096 bytes. + connection_data_block_size=4096 +) ``` ### HttpRequest and HttpResponse @@ -264,8 +266,9 @@ class HttpResponse(object): self.request = request self.internal_response = internal_response # The object returned by the HTTP library self.status_code = None - self.headers = {} + self.headers = CaseInsensitiveDict() self.reason = None + self.content_type = None def body(self): """Return the whole body as bytes in memory.""" @@ -314,7 +317,7 @@ class PipelineResponse(object): ### Policies -The Python pipeline implementation provides two flavors of policy. These are referred to as an HttpPolicy and a SansIOPolicy. +The Python pipeline implementation provides two flavors of policy. These are referred to as an HttpPolicy and a SansIOHTTPPolicy. #### SansIOHTTPPolicy @@ -326,13 +329,13 @@ This is a simple abstract class, that can act before the request is done, or aft A SansIOHTTPPolicy should implement one or more of the following methods: ```python -def on_request(self, request, **kwargs): +def on_request(self, request): """Is executed before sending the request to next policy.""" -def on_response(self, request, response, **kwargs): +def on_response(self, request, response): """Is executed after the request comes back from the policy.""" -def on_exception(self, request, **kwargs): +def on_exception(self, request): """Is executed if an exception is raised while executing this policy. Return True if the exception has been handled and should not @@ -362,17 +365,17 @@ class CustomPolicy(HTTPPolicy): def __init__(self): self.next = None # Will be set when pipeline is instantiated and all the policies chained. - def send(self, request, **kwargs): + def send(self, request): """Mutate the request.""" - return self.next.send(request, **kwargs) + return self.next.send(request) class CustomAsyncPolicy(AsyncHTTPPolicy): - async def send(self, request, **kwargs): + async def send(self, request): """Mutate the request.""" - return await self.next.send(request, **kwargs) + return await self.next.send(request) ``` Currently provided HTTP policies include: From e12b6586ce2080a70a8b89223e21aa891877f38d Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 1 Aug 2019 19:09:01 -0600 Subject: [PATCH 22/32] Mypy fixes for azure.core.tracing (#6590) * we dont need thread locks * add contextvars * fix version stuff * mypy fixes * added test for get_name and moved stuff in the function * small ci fix * more mypy fixes * get rid of dependency * all use same context --- .../azure/core/tracing/abstract_span.py | 2 +- .../azure-core/azure/core/tracing/common.py | 25 ++++++++++++++++--- .../azure-core/azure/core/tracing/context.py | 19 ++++++++------ .../azure/core/tracing/decorator.py | 20 ++++++++++----- .../azure/core/tracing/decorator_async.py | 20 ++++++++++----- .../azure/core/tracing/ext/opencensus_span.py | 13 +++++----- .../azure-core/tests/test_tracing_context.py | 21 ++-------------- .../tests/test_tracing_decorator.py | 10 ++++++++ 8 files changed, 81 insertions(+), 49 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/abstract_span.py b/sdk/core/azure-core/azure/core/tracing/abstract_span.py index 9b7ca6753c0a..e5597d48df5e 100644 --- a/sdk/core/azure-core/azure/core/tracing/abstract_span.py +++ b/sdk/core/azure-core/azure/core/tracing/abstract_span.py @@ -17,7 +17,7 @@ try: from typing_extensions import Protocol except ImportError: - Protocol = object + Protocol = object # type: ignore class AbstractSpan(Protocol): diff --git a/sdk/core/azure-core/azure/core/tracing/common.py b/sdk/core/azure-core/azure/core/tracing/common.py index b0e425a14d10..22cea6315e73 100644 --- a/sdk/core/azure-core/azure/core/tracing/common.py +++ b/sdk/core/azure-core/azure/core/tracing/common.py @@ -36,11 +36,30 @@ TYPE_CHECKING = False if TYPE_CHECKING: - from typing import Any, Optional + from typing import Any, Optional, Union, Callable, List + + +def get_function_and_class_name(func, *args): + # type: (Callable, List[Any]) -> str + """ + Given a function and its unamed arguments, returns class_name.function_name. It assumes the first argument + is `self`. If there are no arguments then it only returns the function name. + + :param func: the function passed in + :type func: `collections.abc.Callable` + :param args: List of arguments passed into the function + :type args: List[Any] + """ + try: + return func.__qualname__ + except AttributeError: + if args: + return "{}.{}".format(args[0].__class__.__name__, func.__name__) # pylint: disable=protected-access + return func.__name__ def set_span_contexts(wrapped_span, span_instance=None): - # type: (AbstractSpan, Optional[AbstractSpan]) -> None + # type: (Union[AbstractSpan, None], Optional[AbstractSpan]) -> None """ Set the sdk context and the implementation context. `span_instance` will be used to set the implementation context if passed in else will use `wrapped_span.span_instance`. @@ -58,7 +77,7 @@ def set_span_contexts(wrapped_span, span_instance=None): def get_parent_span(parent_span): - # type: (Any) -> Tuple(AbstractSpan, AbstractSpan, Any) + # type: (Any) -> Optional[AbstractSpan] """ Returns the current span so that the function's span will be its child. It will create a new span if there is no current span in any of the context. diff --git a/sdk/core/azure-core/azure/core/tracing/context.py b/sdk/core/azure-core/azure/core/tracing/context.py index f8761cd71502..ecf822bf6fd7 100644 --- a/sdk/core/azure-core/azure/core/tracing/context.py +++ b/sdk/core/azure-core/azure/core/tracing/context.py @@ -13,7 +13,7 @@ TYPE_CHECKING = False if TYPE_CHECKING: - from typing import Any, Callable + from typing import Any, Callable, Optional, Type, Union from typing_extensions import Protocol else: Protocol = object @@ -21,7 +21,7 @@ try: import contextvars except ImportError: - contextvars = None + pass class ContextProtocol(Protocol): @@ -29,8 +29,8 @@ class ContextProtocol(Protocol): Implements set and get variables in a thread safe way. """ - def __init__(self, name, default): - # type: (string, Any) -> None + def __init__(self, name, default): # pylint: disable=super-init-not-called + # type: (str, Any) -> None pass def clear(self): @@ -55,8 +55,9 @@ class _AsyncContext(object): """ def __init__(self, name, default): + # type: (str, Any) -> None self.name = name - self.contextvar = contextvars.ContextVar(name) + self.contextvar = contextvars.ContextVar(name) # type: contextvars.ContextVar self.default = default if callable(default) else (lambda: default) def clear(self): @@ -84,6 +85,7 @@ class _ThreadLocalContext(object): """ Uses thread local storage to set and get variables globally in a thread safe way. """ + _thread_local = threading.local() def __init__(self, name, default): @@ -115,8 +117,10 @@ def set(self, value): class TracingContext(object): def __init__(self): # type: () -> None - context_class = _AsyncContext if contextvars else _ThreadLocalContext - self.current_span = context_class("current_span", None) + try: + self.current_span = _AsyncContext("current_span", None) # type: Union[_AsyncContext, _ThreadLocalContext] + except NameError: + self.current_span = _ThreadLocalContext("current_span", None) def with_current_context(self, func): # type: (Callable[[Any], Any]) -> Any @@ -141,4 +145,5 @@ def call_with_current_context(*args, **kwargs): return call_with_current_context + tracing_context = TracingContext() diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7b6ebb26cf45 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -31,15 +31,23 @@ from azure.core.settings import settings from azure.core.tracing.context import tracing_context +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Callable, Any + def distributed_trace(func=None, name_of_span=None): - # type: (Callable[[Any], Any], str) -> Callable[[Any], Any] + # type: (Callable, str) -> Callable[[Any], Any] if func is None: return functools.partial(distributed_trace, name_of_span=name_of_span) @functools.wraps(func) - def wrapper_use_tracer(self, *args, **kwargs): - # type: (Any) -> Any + def wrapper_use_tracer(*args, **kwargs): + # type: (Any, Any) -> Any passed_in_parent = kwargs.pop("parent_span", None) orig_wrapped_span = tracing_context.current_span.get() wrapper_class = settings.tracing_implementation() @@ -50,18 +58,18 @@ def wrapper_use_tracer(self, *args, **kwargs): ans = None if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) - name = name_of_span or self.__class__.__name__ + "." + func.__name__ + name = name_of_span or common.get_function_and_class_name(func, *args) child = parent_span.span(name=name) child.start() common.set_span_contexts(child) - ans = func(self, *args, **kwargs) + ans = func(*args, **kwargs) child.finish() common.set_span_contexts(parent_span) if orig_wrapped_span is None and passed_in_parent is None and original_span_instance is None: parent_span.finish() common.set_span_contexts(orig_wrapped_span, span_instance=original_span_instance) else: - ans = func(self, *args, **kwargs) + ans = func(*args, **kwargs) return ans return wrapper_use_tracer diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..0719a9c016c3 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -31,15 +31,23 @@ from azure.core.settings import settings from azure.core.tracing.context import tracing_context +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Callable, Any + def distributed_trace_async(func=None, name_of_span=None): - # type: (Callable[[Any], Any], str) -> Callable[[Any], Any] + # type: (Callable, str) -> Callable[[Any], Any] if func is None: return functools.partial(distributed_trace_async, name_of_span=name_of_span) @functools.wraps(func) - async def wrapper_use_tracer(self, *args, **kwargs): - # type: (Any) -> Any + async def wrapper_use_tracer(*args, **kwargs): + # type: (Any, Any) -> Any passed_in_parent = kwargs.pop("parent_span", None) orig_wrapped_span = tracing_context.current_span.get() wrapper_class = settings.tracing_implementation() @@ -50,18 +58,18 @@ async def wrapper_use_tracer(self, *args, **kwargs): ans = None if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) - name = name_of_span or self.__class__.__name__ + "." + func.__name__ + name = name_of_span or common.get_function_and_class_name(func, *args) child = parent_span.span(name=name) child.start() common.set_span_contexts(child) - ans = await func(self, *args, **kwargs) + ans = await func(*args, **kwargs) child.finish() common.set_span_contexts(parent_span) if orig_wrapped_span is None and passed_in_parent is None and original_span_instance is None: parent_span.finish() common.set_span_contexts(orig_wrapped_span, span_instance=original_span_instance) else: - ans = await func(self, *args, **kwargs) + ans = await func(*args, **kwargs) return ans return wrapper_use_tracer diff --git a/sdk/core/azure-core/azure/core/tracing/ext/opencensus_span.py b/sdk/core/azure-core/azure/core/tracing/ext/opencensus_span.py index 7aeb79c77e36..c1fd6eb6a4e0 100644 --- a/sdk/core/azure-core/azure/core/tracing/ext/opencensus_span.py +++ b/sdk/core/azure-core/azure/core/tracing/ext/opencensus_span.py @@ -5,6 +5,7 @@ """Implements azure.core.tracing.AbstractSpan to wrap opencensus spans.""" from opencensus.trace import Span, execution_context +from opencensus.trace.tracer import Tracer from opencensus.trace.span import SpanKind from opencensus.trace.link import Link from opencensus.trace.propagation import trace_context_http_header_format @@ -34,10 +35,8 @@ def __init__(self, span=None, name="span"): :param name: The name of the OpenCensus span to create if a new span is needed :type name: str """ - if not span: - tracer = self.get_current_tracer() - span = tracer.start_span(name=name) # type: Span - self._span_instance = span + tracer = self.get_current_tracer() + self._span_instance = span or tracer.start_span(name=name) self._span_component = "component" self._http_user_agent = "http.user_agent" self._http_method = "http.method" @@ -80,7 +79,7 @@ def to_header(self): :return: A key value pair dictionary """ tracer_from_context = self.get_current_tracer() - temp_headers = {} + temp_headers = {} # type: Dict[str, str] if tracer_from_context is not None: ctx = tracer_from_context.span_context try: @@ -146,7 +145,7 @@ def get_current_span(cls): @classmethod def get_current_tracer(cls): - # type: () -> tracer_module.Tracer + # type: () -> Tracer """ Get the current tracer from the execution context. Return None otherwise. """ @@ -165,7 +164,7 @@ def set_current_span(cls, span): @classmethod def set_current_tracer(cls, tracer): - # type: (tracer_module.Tracer) -> None + # type: (Tracer) -> None """ Set the given tracer as the current tracer in the execution context. :param tracer: The tracer to set the current tracer as diff --git a/sdk/core/azure-core/tests/test_tracing_context.py b/sdk/core/azure-core/tests/test_tracing_context.py index 984d2ad480d3..875c98105348 100644 --- a/sdk/core/azure-core/tests/test_tracing_context.py +++ b/sdk/core/azure-core/tests/test_tracing_context.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ import unittest + try: from unittest import mock except ImportError: @@ -11,28 +12,10 @@ from azure.core.tracing.context import tracing_context from azure.core.tracing import AbstractSpan from azure.core.settings import settings +from tracing_common import ContextHelper import os -class ContextHelper(object): - def __init__(self, environ={}, tracer_to_use=None): - self.orig_sdk_context_span = tracing_context.current_span.get() - self.os_env = mock.patch.dict(os.environ, environ) - self.tracer_to_use = tracer_to_use - - def __enter__(self): - self.orig_sdk_context_span = tracing_context.current_span.get() - tracing_context.current_span.clear() - settings.tracing_implementation.set_value(self.tracer_to_use) - self.os_env.start() - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - tracing_context.current_span.set(self.orig_sdk_context_span) - settings.tracing_implementation.unset_value() - self.os_env.stop() - - class TestContext(unittest.TestCase): def test_current_span(self): with ContextHelper(): diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..5c5a1df7b9e6 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -68,7 +68,17 @@ def check_name_is_different(self): time.sleep(0.001) +def random_function(): + pass + + class TestCommon(object): + def test_get_function_and_class_name(self): + with ContextHelper(): + client = MockClient() + assert common.get_function_and_class_name(client.get_foo, client) == "MockClient.get_foo" + assert common.get_function_and_class_name(random_function) == "random_function" + def test_set_span_context(self): with ContextHelper(environ={"AZURE_SDK_TRACING_IMPLEMENTATION": "opencensus"}): wrapper = settings.tracing_implementation() From abc3f20b003bd24f662f4a9eb36bf5cfbbc3efba Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 1 Aug 2019 18:18:36 -0700 Subject: [PATCH 23/32] MyPy azure-core (#6619) * MyPy azure-core settings * MyPy azure-core aiohttp * Redesign sentinel --- .../azure/core/pipeline/transport/aiohttp.py | 4 +- sdk/core/azure-core/azure/core/settings.py | 46 +++++++++++-------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py index 9fb2eb125a5c..452e78ec71d9 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py @@ -31,7 +31,7 @@ import aiohttp from azure.core.configuration import ConnectionConfiguration -from azure.core.exceptions import ServiceRequestError, ServiceResponseError +from azure.core.exceptions import ServiceRequestError, ServiceResponseError, AzureError from azure.core.pipeline import Pipeline from requests.exceptions import ( @@ -159,7 +159,7 @@ async def send(self, request: HttpRequest, **config: Any) -> Optional[AsyncHttpR config['proxy'] = proxies[protocol] break - error = None + error = None # type: Optional[AzureError] response = None config['ssl'] = self._build_ssl_config( cert=config.pop('connection_cert', self.connection_config.cert), diff --git a/sdk/core/azure-core/azure/core/settings.py b/sdk/core/azure-core/azure/core/settings.py index 6bc71c9e850c..b642526aa142 100644 --- a/sdk/core/azure-core/azure/core/settings.py +++ b/sdk/core/azure-core/azure/core/settings.py @@ -29,18 +29,23 @@ """ from collections import namedtuple +from enum import Enum import logging import os import six import sys try: - from typing import TYPE_CHECKING + from typing import Type, Optional, Dict, Callable, cast, TYPE_CHECKING except ImportError: TYPE_CHECKING = False if TYPE_CHECKING: from typing import Any, Union + try: + from azure.core.tracing.ext.opencensus_span import OpenCensusSpan + except ImportError: + pass from azure.core.tracing import AbstractSpan @@ -49,8 +54,10 @@ __all__ = ("settings",) -class _Unset(object): - pass +# https://www.python.org/dev/peps/pep-0484/#support-for-singleton-types-in-unions +class _Unset(Enum): + token = 0 +_unset = _Unset.token def convert_bool(value): @@ -119,7 +126,7 @@ def convert_logging(value): def get_opencensus_span(): - # type: () -> OpenCensusSpan + # type: () -> Optional[Type[AbstractSpan]] """Returns the OpenCensusSpan if opencensus is installed else returns None""" try: from azure.core.tracing.ext.opencensus_span import OpenCensusSpan @@ -130,16 +137,17 @@ def get_opencensus_span(): def get_opencensus_span_if_opencensus_is_imported(): + # type: () -> Optional[Type[AbstractSpan]] if "opencensus" not in sys.modules: return None return get_opencensus_span() -_tracing_implementation_dict = {"opencensus": get_opencensus_span} +_tracing_implementation_dict = {"opencensus": get_opencensus_span} # type: Dict[str, Callable[[], Optional[Type[AbstractSpan]]]] def convert_tracing_impl(value): - # type: (Union[str, AbstractSpan]) -> AbstractSpan + # type: (Union[str, Type[AbstractSpan]]) -> Optional[Type[AbstractSpan]] """Convert a string to AbstractSpan If a AbstractSpan is passed in, it is returned as-is. Otherwise the function @@ -156,19 +164,21 @@ def convert_tracing_impl(value): if value is None: return get_opencensus_span_if_opencensus_is_imported() - wrapper_class = value - if isinstance(value, six.string_types): - value = value.lower() - get_wrapper_class = _tracing_implementation_dict.get(value, lambda: _Unset) - wrapper_class = get_wrapper_class() - if wrapper_class is _Unset: - raise ValueError( - "Cannot convert {} to AbstractSpan, valid values are: {}".format( - value, ", ".join(_tracing_implementation_dict) - ) + if not isinstance(value, six.string_types): + return value + + value = cast(str, value) # mypy clarity + value = value.lower() + get_wrapper_class = _tracing_implementation_dict.get(value, lambda: _unset) + wrapper_class = get_wrapper_class() # type: Union[None, _Unset, Type[AbstractSpan]] + if wrapper_class is _unset: + raise ValueError( + "Cannot convert {} to AbstractSpan, valid values are: {}".format( + value, ", ".join(_tracing_implementation_dict) ) - - return wrapper_class + ) + # type ignored until https://github.com/python/mypy/issues/7279 + return wrapper_class # type: ignore class PrioritizedSetting(object): From 8eb5e9bfecaf68efe343683baac33a3ed491c0d6 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Fri, 2 Aug 2019 09:36:57 -0700 Subject: [PATCH 24/32] Update Key Vault docstrings (#6632) --- .../azure/keyvault/keys/__init__.py | 5 +- .../azure/keyvault/keys/_client.py | 718 ------------------ .../keyvault/keys/{version.py => _version.py} | 0 .../azure/keyvault/keys/aio/__init__.py | 2 +- .../keys/aio/{_client.py => client.py} | 642 ++++++---------- .../azure/keyvault/keys/client.py | 574 ++++++++++++++ .../azure/keyvault/keys/enums.py | 35 + .../keyvault/keys/{_models.py => models.py} | 161 ++-- sdk/keyvault/azure-keyvault-keys/setup.py | 2 +- .../azure/keyvault/secrets/__init__.py | 2 +- .../secrets/{version.py => _version.py} | 0 .../azure/keyvault/secrets/aio/__init__.py | 2 +- .../secrets/aio/{_client.py => client.py} | 204 ++--- .../secrets/{_client.py => client.py} | 216 ++---- .../secrets/{_models.py => models.py} | 123 +-- sdk/keyvault/azure-keyvault-secrets/setup.py | 2 +- 16 files changed, 1214 insertions(+), 1474 deletions(-) delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py rename sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/{version.py => _version.py} (100%) rename sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/{_client.py => client.py} (50%) create mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/client.py create mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/enums.py rename sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/{_models.py => models.py} (55%) rename sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/{version.py => _version.py} (100%) rename sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/{_client.py => client.py} (56%) rename sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/{_client.py => client.py} (54%) rename sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/{_models.py => models.py} (72%) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/__init__.py index c00fd1461b4b..3e072ff03a5f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/__init__.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------- -from ._client import KeyClient +from .client import KeyClient +from .enums import JsonWebKeyCurveName, JsonWebKeyOperation, JsonWebKeyType -__all__ = ["KeyClient"] +__all__ = ["JsonWebKeyCurveName", "JsonWebKeyOperation", "JsonWebKeyType", "KeyClient"] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py deleted file mode 100644 index b591ffdcaf0f..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py +++ /dev/null @@ -1,718 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -from datetime import datetime - -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False - -if TYPE_CHECKING: - from typing import Any, Dict, Generator, Mapping, Optional - -from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError -from azure.core.tracing.decorator import distributed_trace - -from ._shared import KeyVaultClientBase -from ._models import Key, KeyBase, DeletedKey, KeyOperationResult - - -class KeyClient(KeyVaultClientBase): - """KeyClient is a high-level interface for managing a vault's keys. - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START create_key_client] - :end-before: [END create_key_client] - :language: python - :caption: Creates a new instance of the Key client - :dedent: 4 - """ - - # pylint:disable=protected-access - - @distributed_trace - def create_key( - self, - name, - key_type, - size=None, - key_operations=None, - enabled=None, - expires=None, - not_before=None, - tags=None, - curve=None, - **kwargs - ): - # type: (str, str, Optional[int], Optional[List[str]], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Optional[str], Mapping[str, Any]) -> Key - """Creates a new key, stores it, then returns the key to the client. - - The create key operation can be used to create any key type in Azure - Key Vault. If the named key already exists, Azure Key Vault creates a - new version of the key. It requires the keys/create permission. - - :param name: The name for the new key. The system will generate - the version name for the new key. - :type name: str - :param key_type: The type of key to create. For valid values, see - JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', - 'RSA-HSM', 'oct' - :type key_type: str or ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyType - :param size: The key size in bits. For example: 2048, 3072, or - 4096 for RSA. - :type size: int - :param key_operations: Supported key operations. - :type key_operations: list[str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyOperation] - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] - :param curve: Elliptic curve name. If none then defaults to 'P-256'. For valid values, see - JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', - 'P-521', 'SECP256K1' - :type curve: str or ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyCurveName - :returns: The created key - :rtype: ~azure.keyvault.keys._models.Key - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START create_key] - :end-before: [END create_key] - :language: python - :caption: Creates a key in the key vault - :dedent: 8 - """ - if enabled is not None or not_before is not None or expires is not None: - attributes = self._client.models.KeyAttributes(enabled=enabled, not_before=not_before, expires=expires) - else: - attributes = None - - bundle = self._client.create_key( - self.vault_url, - name, - key_type, - size, - key_attributes=attributes, - key_ops=key_operations, - tags=tags, - curve=curve, - **kwargs - ) - return Key._from_key_bundle(bundle) - - @distributed_trace - def create_rsa_key( - self, - name, - hsm, - size=None, - key_operations=None, - enabled=None, - expires=None, - not_before=None, - tags=None, - **kwargs - ): - # type: (str, bool, Optional[int], Optional[List[str]], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> Key - """Creates a new RSA type key, stores it, then returns key to the client. - - The create key operation can be used to create any key type in Azure - Key Vault. If the named key already exists, Azure Key Vault creates a - new version of the key. It requires the keys/create permission. - - :param name: The name for the new key. The system will generate - the version name for the new key. - :type name: str - :param hsm: Whether to create as a hardware key (HSM) or software key. - :type hsm: bool - :param size: The key size in bits. For example: 2048, 3072, or - 4096 for RSA. - :type size: int - :param key_operations: Supported key operations. - :type key_operations: list[str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyOperation] - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] - :returns: The created RSA key - :rtype: ~azure.keyvault.keys._models.Key - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START create_rsa_key] - :end-before: [END create_rsa_key] - :language: python - :caption: Creates a RSA key in the key vault - :dedent: 8 - """ - key_type = "RSA-HSM" if hsm else "RSA" - - return self.create_key( - name, - key_type=key_type, - size=size, - key_operations=key_operations, - enabled=enabled, - expires=expires, - not_before=not_before, - tags=tags, - **kwargs - ) - - @distributed_trace - def create_ec_key( - self, - name, - hsm, - curve=None, - key_operations=None, - enabled=None, - expires=None, - not_before=None, - tags=None, - **kwargs - ): - # type: (str, bool, Optional[str], Optional[List[str]], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> Key - """Creates a new Elliptic curve type key, stores it, then returns key to the client. - - The create key operation can be used to create any key type in Azure - Key Vault. If the named key already exists, Azure Key Vault creates a - new version of the key. It requires the keys/create permission. - - :param name: The name for the new key. The system will generate - the version name for the new key. - :type name: str - :param hsm: Whether to create as a hardware key (HSM) or software key. - :type hsm: bool - :param curve: Elliptic curve name. If none then defaults to 'P-256'. For valid values, see - JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', - 'P-521', 'SECP256K1' - :type curve: str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyCurveName - :param key_operations: Supported key operations. - :type key_operations: list[str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyOperation] - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] - :returns: The created EC key - :rtype: ~azure.keyvault.keys._models.Key - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START create_ec_key] - :end-before: [END create_ec_key] - :language: python - :caption: Creates an EC key in the key vault - :dedent: 8 - """ - - key_type = "EC-HSM" if hsm else "EC" - - return self.create_key( - name, - key_type=key_type, - curve=curve, - key_operations=key_operations, - enabled=enabled, - expires=expires, - not_before=not_before, - tags=tags, - **kwargs - ) - - @distributed_trace - def delete_key(self, name, **kwargs): - # type: (str, Mapping[str, Any]) -> DeletedKey - """Deletes a key from the Key Vault. - - The delete key operation cannot be used to remove individual versions - of a key. This operation removes the cryptographic material associated - with the key, which means the key is not usable for Sign/Verify, - Wrap/Unwrap or Encrypt/Decrypt operations. This operation requires the - keys/delete permission. - - :param name: The name of the key to delete. - :type name: str - :returns: The deleted key - :rtype: ~azure.keyvault.keys._models.DeletedKey - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to retrieve the key - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START delete_key] - :end-before: [END delete_key] - :language: python - :caption: Deletes a key in the key vault - :dedent: 8 - """ - bundle = self._client.delete_key(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) - return DeletedKey._from_deleted_key_bundle(bundle) - - @distributed_trace - def get_key(self, name, version=None, **kwargs): - # type: (str, Optional[str], Mapping[str, Any]) -> Key - """Gets the public part of a stored key. - - The get key operation is applicable to all key types. If the requested - key is symmetric, then no key material is released in the response. - This operation requires the keys/get permission. - - :param name: The name of the key to get. - :type name: str - :param version: Retrieves a specific version of a key. If the version is None or an empty string, - the latest version of the key is returned - :type version: str - :returns: Key - :rtype: ~azure.keyvault.keys._models.Key - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to retrieve the key - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START get_key] - :end-before: [END get_key] - :language: python - :caption: Retrieves a key from the key vault - :dedent: 8 - """ - bundle = self._client.get_key( - self.vault_url, name, key_version=version or "", error_map={404: ResourceNotFoundError}, **kwargs - ) - return Key._from_key_bundle(bundle) - - @distributed_trace - def get_deleted_key(self, name, **kwargs): - # type: (str, Mapping[str, Any]) -> DeletedKey - """Gets a deleted key from the Key Vault - - The Get Deleted Key operation is applicable for soft-delete enabled - vaults. While the operation can be invoked on any vault, it will return - an error if invoked on a non soft-delete enabled vault. This operation - requires the keys/get permission. - - :param name: The name of the key. - :type name: str - :returns: The deleted key - :rtype: ~azure.keyvault.keys._models.DeletedKey - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START get_deleted_key] - :end-before: [END get_deleted_key] - :language: python - :caption: Retrieves a deleted key from the key vault - :dedent: 8 - """ - bundle = self._client.get_deleted_key(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) - return DeletedKey._from_deleted_key_bundle(bundle) - - @distributed_trace - def list_deleted_keys(self, **kwargs): - # type: (Mapping[str, Any]) -> Generator[DeletedKey] - """Lists the deleted keys in the Key Vault - - Retrieves a list of the keys in the Key Vault as JSON Web Key - structures that contain the public part of a deleted key. This - operation includes deletion-specific information. The Get Deleted Keys - operation is applicable for vaults enabled for soft-delete. While the - operation can be invoked on any vault, it will return an error if - invoked on a non soft-delete enabled vault. This operation requires the - keys/list permission. - - :returns: An iterator like instance of DeletedKey - :rtype: - Generator[~azure.keyvault.keys._models.DeletedKey] - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START list_deleted_keys] - :end-before: [END list_deleted_keys] - :language: python - :caption: List all the deleted keys in the vault - :dedent: 8 - """ - max_page_size = kwargs.get("max_page_size", None) - return self._client.get_deleted_keys( - self._vault_url, - maxresults=max_page_size, - cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], - **kwargs - ) - - @distributed_trace - def list_keys(self, **kwargs): - # type: (Mapping[str, Any]) -> Generator[KeyBase] - """List the keys in the Key Vault - - Retrieves a list of the keys in the Key Vault as JSON Web Key - structures that contain the public part of a stored key. The LIST - operation is applicable to all key types, however only the base key - identifier, attributes, and tags are provided in the response. - Individual versions of a key are not listed in the response. This - operation requires the keys/list permission. - - :returns: An iterator like instance of KeyBase - :rtype: - Generator[~azure.keyvault.keys._models.KeyBase] - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START list_keys] - :end-before: [END list_keys] - :language: python - :caption: List all keys in the vault - :dedent: 8 - """ - max_page_size = kwargs.get("max_page_size", None) - return self._client.get_keys( - self._vault_url, - maxresults=max_page_size, - cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], - **kwargs - ) - - @distributed_trace - def list_key_versions(self, name, **kwargs): - # type: (str, Mapping[str, Any]) -> Generator[KeyBase] - """Retrieves a list of individual key versions with the same key name. - - The full key identifier, attributes, and tags are provided in the - response. This operation requires the keys/list permission. - - :param name: The name of the key. - :type name: str - :returns: An iterator like instance of KeyBase - :rtype: - Generator[~azure.keyvault.keys._models.KeyBase] - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START list_key_versions] - :end-before: [END list_key_versions] - :language: python - :caption: List all versions of the specified key - :dedent: 8 - """ - max_page_size = kwargs.get("max_page_size", None) - return self._client.get_key_versions( - self._vault_url, - name, - maxresults=max_page_size, - cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], - **kwargs - ) - - @distributed_trace - def purge_deleted_key(self, name, **kwargs): - # type: (str, Mapping[str, Any]) -> None - """Permanently deletes the specified key. - - The Purge Deleted Key operation is applicable for soft-delete enabled - vaults. While the operation can be invoked on any vault, it will return - an error if invoked on a non soft-delete enabled vault. This operation - requires the keys/purge permission. - - :param name: The name of the key - :type name: str - :returns: None - :rtype: None - - Example: - .. code-block:: python - - # if the vault has soft-delete enabled, purge permanently deletes a deleted key - # (with soft-delete disabled, delete itself is permanent) - key_client.purge_deleted_key("key-name") - - """ - self._client.purge_deleted_key(self.vault_url, name, kwargs) - - @distributed_trace - def recover_deleted_key(self, name, **kwargs): - # type: (str, Mapping[str, Any]) -> Key - """Recovers the deleted key to its latest version. - - The Recover Deleted Key operation is applicable for deleted keys in - soft-delete enabled vaults. It recovers the deleted key back to its - latest version under /keys. An attempt to recover an non-deleted key - will return an error. Consider this the inverse of the delete operation - on soft-delete enabled vaults. This operation requires the keys/recover - permission. - - :param name: The name of the deleted key. - :type name: str - :returns: The recovered deleted key - :rtype: ~azure.keyvault.keys._models.Key - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START recover_deleted_key] - :end-before: [END recover_deleted_key] - :language: python - :caption: Recovers the specified soft-deleted key - :dedent: 8 - """ - bundle = self._client.recover_deleted_key(self.vault_url, name, kwargs) - return Key._from_key_bundle(bundle) - - @distributed_trace - def update_key( - self, name, version=None, key_operations=None, enabled=None, expires=None, not_before=None, tags=None, **kwargs - ): - # type: (str, Optional[str], Optional[List[str]], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> Key - """The update key operation changes specified attributes of a stored key - and can be applied to any key type and key version stored in Azure Key - Vault. - - In order to perform this operation, the key must already exist in the - Key Vault. Note: The cryptographic material of a key itself cannot be - changed. This operation requires the keys/update permission. - - :param name: The name of key to update. - :type name: str - :param version: The version of the key to update. - :type version: str - :param key_operations: Json web key operations. For more information on - possible key operations, see JsonWebKeyOperation. - :type key_operations: list[str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyOperation] - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] - :returns: The updated key - :rtype: ~azure.keyvault.keys._models.Key - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to retrieve the key - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START update_key] - :end-before: [END update_key] - :language: python - :caption: Updates a key in the key vault - :dedent: 8 - """ - if enabled is not None or not_before is not None or expires is not None: - attributes = self._client.models.KeyAttributes(enabled=enabled, not_before=not_before, expires=expires) - else: - attributes = None - bundle = self._client.update_key( - self.vault_url, - name, - key_version=version or "", - key_ops=key_operations, - tags=tags, - key_attributes=attributes, - error_map={404: ResourceNotFoundError}, - **kwargs - ) - return Key._from_key_bundle(bundle) - - @distributed_trace - def backup_key(self, name, **kwargs): - # type: (str, Mapping[str, Any]) -> bytes - """Backs up the specified key. - - Requests that a backup of the specified secret be downloaded to the client. - The Key Backup operation exports a key from Azure Key Vault in a - protected form. Note that this operation does NOT return key material - in a form that can be used outside the Azure Key Vault system, the - returned key material is either protected to a Azure Key Vault HSM or - to Azure Key Vault itself. The intent of this operation is to allow a - client to GENERATE a key in one Azure Key Vault instance, BACKUP the - key, and then RESTORE it into another Azure Key Vault instance. The - BACKUP operation may be used to export, in protected form, any key type - from Azure Key Vault. Individual versions of a key cannot be backed up. - BACKUP / RESTORE can be performed within geographical boundaries only; - meaning that a BACKUP from one geographical area cannot be restored to - another geographical area. For example, a backup from the US - geographical area cannot be restored in an EU geographical area. This - operation requires the key/backup permission. - - :param name: The name of the key. - :type name: str - :returns: The raw bytes of the key backup. - :rtype: bytes - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to retrieve the key - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START backup_key] - :end-before: [END backup_key] - :language: python - :caption: Backs up the specified key to the key vault - :dedent: 8 - """ - backup_result = self._client.backup_key(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) - return backup_result.value - - @distributed_trace - def restore_key(self, backup, **kwargs): - # type: (bytes, Mapping[str, Any]) -> Key - """Restores a backed up key to the Key Vault - - Imports a previously backed up key into Azure Key Vault, restoring the - key, its key identifier, attributes and access control policies. The - RESTORE operation may be used to import a previously backed up key. - Individual versions of a key cannot be restored. The key is restored in - its entirety with the same key name as it had when it was backed up. If - the key name is not available in the target Key Vault, the RESTORE - operation will be rejected. While the key name is retained during - restore, the final key identifier will change if the key is restored to - a different vault. Restore will restore all versions and preserve - version identifiers. The RESTORE operation is subject to security - constraints: The target Key Vault must be owned by the same Microsoft - Azure Subscription as the source Key Vault The user must have RESTORE - permission in the target Key Vault. This operation requires the - keys/restore permission. - - :param backup: The raw bytes of the key backup - :type backup: bytes - :returns: The restored key - :rtype: ~azure.keyvault.keys._models.Key - :raises: ~azure.core.exceptions.ResourceExistsError if the client failed to retrieve the key - - Example: - .. literalinclude:: ../tests/test_samples_keys.py - :start-after: [START restore_key] - :end-before: [END restore_key] - :language: python - :caption: Restores a backed up key to the vault - :dedent: 8 - """ - bundle = self._client.restore_key(self.vault_url, backup, error_map={409: ResourceExistsError}, **kwargs) - return Key._from_key_bundle(bundle) - - @distributed_trace - def import_key(self, name, key, hsm=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs): - # type: (str, List[str], Optional[bool], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> Key - """Imports an externally created key, stores it, and returns the key to the client. - - The import key operation may be used to import any key type into an - Azure Key Vault. If the named key already exists, Azure Key Vault - creates a new version of the key. This operation requires the - keys/import permission. - - :param name: Name for the imported key. - :type name: str - :param key: The Json web key - :type key: ~azure.security.keyvault.v7_0.models.JsonWebKey - :param hsm: Whether to import as a hardware key (HSM) or software key. - :type hsm: bool - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] - :returns: The imported key - :rtype: ~azure.keyvault.keys._models.Key - - """ - if enabled is not None or not_before is not None or expires is not None: - attributes = self._client.models.KeyAttributes(enabled=enabled, not_before=not_before, expires=expires) - else: - attributes = None - bundle = self._client.import_key( - self.vault_url, name, key=key, hsm=hsm, key_attributes=attributes, tags=tags, **kwargs - ) - return Key._from_key_bundle(bundle) - - @distributed_trace - def wrap_key(self, name, algorithm, value, version=None, **kwargs): - # type: (str, str, Optional[str], bytes, Mapping[str, Any]) -> KeyOperationResult - """Wraps a symmetric key using a specified key. - - The WRAP operation supports encryption of a symmetric key using a key - encryption key that has previously been stored in an Azure Key Vault. - The WRAP operation is only strictly necessary for symmetric keys stored - in Azure Key Vault since protection with an asymmetric key can be - performed using the public portion of the key. This operation is - supported for asymmetric keys as a convenience for callers that have a - key-reference but do not have access to the public key material. This - operation requires the keys/wrapKey permission. - - :param name: The name of the key. - :type name: str - :param version: The version of the key. - :type version: str - :param algorithm: algorithm identifier. Possible values include: - 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - :type algorithm: str or - ~azure.security.keyvault.v7_0.models.JsonWebKeyEncryptionAlgorithm - :param value: - :type value: bytes - :returns: The wrapped symmetric key. - :rtype: ~azure.keyvault.keys._models.KeyOperationResult - - """ - if version is None: - version = "" - - bundle = self._client.wrap_key( - self.vault_url, name, key_version=version, algorithm=algorithm, value=value, **kwargs - ) - return KeyOperationResult(id=bundle.kid, value=bundle.result) - - @distributed_trace - def unwrap_key(self, name, algorithm, value, version=None, **kwargs): - # type: (str, str, Optional[str], bytes, Mapping[str, Any]) -> KeyOperationResult - """Unwraps a symmetric key using the specified key that was initially used - for wrapping that key. - - The UNWRAP operation supports decryption of a symmetric key using the - target key encryption key. This operation is the reverse of the WRAP - operation. The UNWRAP operation applies to asymmetric and symmetric - keys stored in Azure Key Vault since it uses the private portion of the - key. This operation requires the keys/unwrapKey permission. - - :param name: The name of the key. - :type name: str - :param version: The version of the key. - :type version: str - :param algorithm: algorithm identifier. Possible values include: - 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' - :type algorithm: str or - ~azure.security.keyvault.v7_0.models.JsonWebKeyEncryptionAlgorithm - :param value: - :type value: bytes - :returns: The unwrapped symmetric key. - :rtype: ~azure.keyvault.keys._models.KeyOperationResult - - """ - if version is None: - version = "" - - bundle = self._client.unwrap_key( - self.vault_url, name, key_version=version, algorithm=algorithm, value=value, **kwargs - ) - return KeyOperationResult(id=bundle.kid, value=bundle.result) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/version.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_version.py similarity index 100% rename from sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/version.py rename to sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_version.py diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/__init__.py index 71cad7e66b18..8eb2ef0f7ef4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/__init__.py @@ -2,6 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from ._client import KeyClient +from .client import KeyClient __all__ = ["KeyClient"] 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 similarity index 50% rename from sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py rename to sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/client.py index 28bccc61f053..390bd77a6602 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 @@ -8,57 +8,24 @@ from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async -from azure.keyvault.keys._models import Key, DeletedKey, KeyBase, KeyOperationResult +from azure.keyvault.keys.models import DeletedKey, JsonWebKey, Key, KeyBase, KeyOperationResult from azure.keyvault.keys._shared import AsyncKeyVaultClientBase class KeyClient(AsyncKeyVaultClientBase): - """The KeyClient class defines a high level interface for managing keys in the specified vault. + """A high-level interface for managing a vault's keys. Example: .. literalinclude:: ../tests/test_samples_keys_async.py :start-after: [START create_key_client] :end-before: [END create_key_client] :language: python - :caption: Creates a new instance of the Key client + :caption: Create a new ``KeyClient`` :dedent: 4 """ # pylint:disable=protected-access - @distributed_trace_async - async def get_key(self, name: str, version: Optional[str] = None, **kwargs: Mapping[str, Any]) -> Key: - """Gets the public part of a stored key. - - The get key operation is applicable to all key types. If the requested - key is symmetric, then no key material is released in the response. - This operation requires the keys/get permission. - - :param name: The name of the key to get. - :type name: str - :param version: Retrieves a specific version of a key. If the version is None or an empty string, - the latest version of the key is returned - :type version: str - :returns: Key - :rtype: ~azure.keyvault.keys._models.Key - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to retrieve the key - - Example: - .. literalinclude:: ../tests/test_samples_keys_async.py - :start-after: [START get_key] - :end-before: [END get_key] - :language: python - :caption: Retrieves a key from the key vault - :dedent: 8 - """ - if version is None: - version = "" - - bundle = await self._client.get_key( - self.vault_url, name, version, error_map={404: ResourceNotFoundError}, **kwargs - ) - return Key._from_key_bundle(bundle) - @distributed_trace_async async def create_key( self, @@ -73,47 +40,30 @@ async def create_key( tags: Optional[Dict[str, str]] = None, **kwargs: Mapping[str, Any] ) -> Key: - """Creates a new key, stores it, then returns the key to the client. - - The create key operation can be used to create any key type in Azure - Key Vault. If the named key already exists, Azure Key Vault creates a - new version of the key. It requires the keys/create permission. + """Create a key. If ``name`` is already in use, create a new version of the key. Requires the keys/create + permission. - :param name: The name for the new key. The system will generate - the version name for the new key. - :type name: str - :param key_type: The type of key to create. For valid values, see - JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', - 'RSA-HSM', 'oct' - :param size: The key size in bits. For example: 2048, 3072, or - 4096 for RSA. - :type size: int - :param curve: Elliptic curve name. If none then defaults to 'P-256'. For valid values, see - JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', - 'P-521', 'SECP256K1' - :type curve: str or - :type key_type: str or ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyType - :param key_operations: Supported key operations. - :type key_operations: list[str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyOperation] - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] + :param str name: The name of the new key. Key Vault will generate the key's version. + :param key_type: The type of key to create + :type key_type: str or ~azure.keyvault.keys.enums.JsonWebKeyType + :param int size: (optional) RSA key size in bits, for example 2048, 3072, or 4096. + :param key_operations: (optional) Allowed key operations + :type key_operations: list(str or ~azure.keyvault.keys.enums.JsonWebKeyOperation) + :param bool enabled: (optional) Whether the key is enabled for use + :param expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :param curve: (optional) Elliptic curve name. Defaults to the NIST P-256 elliptic curve. + :type curve: ~azure.keyvault.keys.enums.JsonWebKeyCurveName or str :returns: The created key - :rtype: ~azure.keyvault.keys._models.Key + :rtype: ~azure.keyvault.keys.models.Key Example: .. literalinclude:: ../tests/test_samples_keys_async.py :start-after: [START create_key] :end-before: [END create_key] :language: python - :caption: Creates a key in the key vault + :caption: Create a key :dedent: 8 """ if enabled is not None or not_before is not None or expires is not None: @@ -147,41 +97,27 @@ async def create_rsa_key( tags: Optional[Dict[str, str]] = None, **kwargs: Mapping[str, Any] ) -> Key: - """Creates a new RSA type key, stores it, then returns the key to the client. - - The create key operation can be used to create any key type in Azure - Key Vault. If the named key already exists, Azure Key Vault creates a - new version of the key. It requires the keys/create permission. - - :param name: The name for the new key. The system will generate - the version name for the new key. - :type name: str - :param hsm: Whether to import as a hardware key (HSM) or software key. - :type hsm: bool - :param size: The key size in bits. For example: 2048, 3072, or - 4096 for RSA. - :type size: int - :param key_operations: Supported key operations. - :type key_operations: list[str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyOperation] - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] - :returns: The created RSA key - :rtype: ~azure.keyvault.keys._models.Key + """Create a new RSA key. If ``name`` is already in use, create a new version of the key. Requires the + keys/create permission. + + :param str name: The name for the new key. Key Vault will generate the key's version. + :param bool hsm: Whether to create a hardware key (HSM) or software key + :param int size: (optional) Key size in bits, for example 2048, 3072, or 4096 + :param key_operations: (optional) Allowed key operations + :type key_operations: list(str or ~azure.keyvault.keys.enums.JsonWebKeyOperation) + :param bool enabled: (optional) Whether the key is enabled for use + :param expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :returns: The created key + :rtype: ~azure.keyvault.keys.models.Key Example: .. literalinclude:: ../tests/test_samples_keys_async.py :start-after: [START create_rsa_key] :end-before: [END create_rsa_key] :language: python - :caption: Creates an RSA key in the key vault + :caption: Create RSA key :dedent: 8 """ key_type = "RSA-HSM" if hsm else "RSA" @@ -211,43 +147,28 @@ async def create_ec_key( tags: Optional[Dict[str, str]] = None, **kwargs: Mapping[str, Any] ) -> Key: - """Creates a new Elliptic curve type key, stores it, then returns key attributes to the client. - - The create key operation can be used to create any key type in Azure - Key Vault. If the named key already exists, Azure Key Vault creates a - new version of the key. It requires the keys/create permission. - - :param name: The name for the new key. The system will generate - the version name for the new key. - :type name: str - :param hsm: Whether to import as a hardware key (HSM) or software key. - :type hsm: bool - :param curve: Elliptic curve name. If none then defaults to 'P-256'. For valid values, see - JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', - 'P-521', 'SECP256K1' - :type curve: str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyCurveName - :param key_operations: Supported key operations. - :type key_operations: list[str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyOperation] - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] - :returns: The created EC key - :rtype: ~azure.keyvault.keys._models.Key + """Create a new elliptic curve key. If ``name`` is already in use, create a new version of the key. Requires + the keys/create permission. + + :param str name: The name for the new key. Key Vault will generate the key's version. + :param bool hsm: Whether to create as a hardware key (HSM) or software key. + :param curve: (optional) Elliptic curve name. Defaults to the NIST P-256 elliptic curve. + :type curve: ~azure.keyvault.keys.enums.JsonWebKeyCurveName or str + :param key_operations: (optional) Allowed key operations + :type key_operations: list(~azure.keyvault.keys.enums.JsonWebKeyOperation) + :param bool enabled: (optional) Whether the key is enabled for use + :param datetime.datetime expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :returns: The created key + :rtype: ~azure.keyvault.keys.models.Key Example: .. literalinclude:: ../tests/test_samples_keys_async.py :start-after: [START create_ec_key] :end-before: [END create_ec_key] :language: python - :caption: Creates an EC key in the key vault + :caption: Create an elliptic curve key :dedent: 8 """ key_type = "EC-HSM" if hsm else "EC" @@ -265,92 +186,110 @@ async def create_ec_key( ) @distributed_trace_async - async def update_key( - self, - name: str, - version: Optional[str] = None, - key_operations: Optional[List[str]] = None, - enabled: Optional[bool] = None, - not_before: Optional[datetime] = None, - expires: Optional[datetime] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs: Mapping[str, Any] - ) -> Key: - """The update key operation changes specified attributes of a stored key - and can be applied to any key type and key version stored in Azure Key - Vault. + async def delete_key(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedKey: + """Delete all versions of a key and its cryptographic material. Requires the keys/delete permission. - In order to perform this operation, the key must already exist in the - Key Vault. Note: The cryptographic material of a key itself cannot be - changed. This operation requires the keys/update permission. + :param str name: The name of the key to delete. + :returns: The deleted key + :rtype: ~azure.keyvault.keys.models.DeletedKey + :raises: ~azure.core.exceptions.ResourceNotFoundError if the key doesn't exist - :param name: The name of key to update. - :type name: str - :param version: The version of the key to update. - :type version: str - :param key_operations: Json web key operations. For more information on - possible key operations, see JsonWebKeyOperation. - :type key_operations: list[str or - ~azure.keyvault.keys._generated.v7_0.models.JsonWebKeyOperation] - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] - :returns: The updated key - :rtype: ~azure.security.keyvault.v7_0.models.Key - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to retrieve the key + Example: + .. literalinclude:: ../tests/test_samples_keys_async.py + :start-after: [START delete_key] + :end-before: [END delete_key] + :language: python + :caption: Delete a key + :dedent: 8 + """ + bundle = await self._client.delete_key(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) + return DeletedKey._from_deleted_key_bundle(bundle) + + @distributed_trace_async + async def get_key(self, name: str, version: Optional[str] = None, **kwargs: Mapping[str, Any]) -> Key: + """Get a key's attributes and, if it's an asymmetric key, its public material. Requires the keys/get permission. + + :param str name: The name of the key to get. + :param str version: (optional) A specific version of the key to get. If not specified, gets the latest version + of the key. + :rtype: ~azure.keyvault.keys.models.Key + :raises: ~azure.core.exceptions.ResourceNotFoundError if the key doesn't exist Example: .. literalinclude:: ../tests/test_samples_keys_async.py - :start-after: [START update_key] - :end-before: [END update_key] + :start-after: [START get_key] + :end-before: [END get_key] :language: python - :caption: Updates a key in the key vault + :caption: Get a key :dedent: 8 """ - if enabled is not None or not_before is not None or expires is not None: - attributes = self._client.models.KeyAttributes(enabled=enabled, not_before=not_before, expires=expires) - else: - attributes = None + if version is None: + version = "" - bundle = await self._client.update_key( - self.vault_url, - name, - key_version=version or "", - key_ops=key_operations, - tags=tags, - key_attributes=attributes, - error_map={404: ResourceNotFoundError}, - **kwargs, + bundle = await self._client.get_key( + self.vault_url, name, version, error_map={404: ResourceNotFoundError}, **kwargs ) return Key._from_key_bundle(bundle) + @distributed_trace_async + async def get_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedKey: + """Get a deleted key. This is only possible in a vault with soft-delete enabled. Requires the keys/get + permission. + + :param str name: The name of the key + :returns: The deleted key + :rtype: ~azure.keyvault.keys.models.DeletedKey + + Example: + .. literalinclude:: ../tests/test_samples_keys_async.py + :start-after: [START get_deleted_key] + :end-before: [END get_deleted_key] + :language: python + :caption: Get a deleted key + :dedent: 8 + """ + bundle = await self._client.get_deleted_key( + self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs + ) + return DeletedKey._from_deleted_key_bundle(bundle) + @distributed_trace - def list_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: - """List keys in the specified vault. + def list_deleted_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[DeletedKey]: + """List all deleted keys, including the public part of each. This is only possible in a vault with soft-delete + enabled. Requires the keys/list permission. + + :returns: An iterator of deleted keys + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.keys.models.DeletedKey] + + Example: + .. literalinclude:: ../tests/test_samples_keys_async.py + :start-after: [START list_deleted_keys] + :end-before: [END list_deleted_keys] + :language: python + :caption: List all the deleted keys + :dedent: 8 + """ + max_results = kwargs.get("max_page_size") + return self._client.get_deleted_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) - Retrieves a list of the keys in the Key Vault as JSON Web Key - structures that contain the public part of a stored key. The LIST - operation is applicable to all key types, however only the base key - identifier, attributes, and tags are provided in the response. - Individual versions of a key are not listed in the response. This - operation requires the keys/list permission. + @distributed_trace + def list_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: + """List identifiers, attributes, and tags of all keys in the vault. Requires the keys/list permission. - :returns: An iterator like instance of KeyBase - :rtype: - typing.AsyncIterable[~azure.keyvault.keys._models.KeyBase] + :returns: An iterator of keys without their cryptographic material or version information + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.keys.models.KeyBase] Example: .. literalinclude:: ../tests/test_samples_keys_async.py :start-after: [START list_keys] :end-before: [END list_keys] :language: python - :caption: List all keys in the vault + :caption: List all keys :dedent: 8 """ max_results = kwargs.get("max_page_size") @@ -363,23 +302,18 @@ def list_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: @distributed_trace def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: - """Retrieves a list of individual key versions with the same key name. - - The full key identifier, attributes, and tags are provided in the - response. This operation requires the keys/list permission. + """List the identifiers, attributes, and tags of a key's versions. Requires the keys/list permission. - :param name: The name of the key. - :type name: str - :returns: An iterator like instance of KeyBase - :rtype: - typing.AsyncIterable[~azure.keyvault.keys._models.KeyBase] + :param str name: The name of the key + :returns: An iterator of keys without their cryptographic material + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.keys.models.KeyBase] Example: .. literalinclude:: ../tests/test_samples_keys_async.py :start-after: [START list_key_versions] :end-before: [END list_key_versions] :language: python - :caption: List all versions of the specified key + :caption: List all versions of a key :dedent: 8 """ max_results = kwargs.get("max_page_size") @@ -392,222 +326,155 @@ def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIter ) @distributed_trace_async - async def backup_key(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: - """Requests a backup of the specified key to the client. - - The Key Backup operation exports a key from Azure Key Vault in a - protected form. Note that this operation does NOT return key material - in a form that can be used outside the Azure Key Vault system, the - returned key material is either protected to a Azure Key Vault HSM or - to Azure Key Vault itself. The intent of this operation is to allow a - client to GENERATE a key in one Azure Key Vault instance, BACKUP the - key, and then RESTORE it into another Azure Key Vault instance. The - BACKUP operation may be used to export, in protected form, any key type - from Azure Key Vault. Individual versions of a key cannot be backed up. - BACKUP / RESTORE can be performed within geographical boundaries only; - meaning that a BACKUP from one geographical area cannot be restored to - another geographical area. For example, a backup from the US - geographical area cannot be restored in an EU geographical area. This - operation requires the key/backup permission. + async def purge_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> None: + """Permanently delete the specified key. This is only possible in vaults with soft-delete enabled. If a vault + does not have soft-delete enabled, :func:`delete_key` is permanent, and this method will return an error. - :param name: The name of the key. - :type name: str - :return: The raw bytes of the key backup. - :rtype: bytes - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to retrieve the key + Requires the keys/purge permission. + + :param str name: The name of the key + :returns: None Example: - .. literalinclude:: ../tests/test_samples_keys_async.py - :start-after: [START backup_key] - :end-before: [END backup_key] - :language: python - :caption: Backs up the specified key to the key vault - :dedent: 8 - """ - backup_result = await self._client.backup_key( - self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs - ) - return backup_result.value + .. code-block:: python - @distributed_trace_async - async def restore_key(self, backup: bytes, **kwargs: Mapping[str, Any]) -> Key: - """Restores a backed up key to a vault. - - Imports a previously backed up key into Azure Key Vault, restoring the - key, its key identifier, attributes and access control policies. The - RESTORE operation may be used to import a previously backed up key. - Individual versions of a key cannot be restored. The key is restored in - its entirety with the same key name as it had when it was backed up. If - the key name is not available in the target Key Vault, the RESTORE - operation will be rejected. While the key name is retained during - restore, the final key identifier will change if the key is restored to - a different vault. Restore will restore all versions and preserve - version identifiers. The RESTORE operation is subject to security - constraints: The target Key Vault must be owned by the same Microsoft - Azure Subscription as the source Key Vault The user must have RESTORE - permission in the target Key Vault. This operation requires the - keys/restore permission. - - :param backup: The raw bytes of the key backup - :type backup: bytes - :returns: The restored key - :rtype: ~azure.keyvault.keys._models.Key - :raises: ~azure.core.exceptions.ResourceExistsError if the client failed to retrieve the key + # if the vault has soft-delete enabled, purge permanently deletes a deleted key + # (with soft-delete disabled, delete_key is permanent) + await key_client.purge_deleted_key("key-name") - Example: - .. literalinclude:: ../tests/test_samples_keys_async.py - :start-after: [START restore_key] - :end-before: [END restore_key] - :language: python - :caption: Restores a backed up key to the vault - :dedent: 8 """ - bundle = await self._client.restore_key(self.vault_url, backup, error_map={409: ResourceExistsError}, **kwargs) - return Key._from_key_bundle(bundle) + await self._client.purge_deleted_key(self.vault_url, name, **kwargs) @distributed_trace_async - async def delete_key(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedKey: - """Deletes a key from the Key Vault. + async def recover_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> Key: + """Recover a deleted key to its latest version. This is only possible in vaults with soft-delete enabled. If a + vault does not have soft-delete enabled, :func:`delete_key` is permanent, and this method will return an error. + Attempting to recover an non-deleted key will also return an error. - The delete key operation cannot be used to remove individual versions - of a key. This operation removes the cryptographic material associated - with the key, which means the key is not usable for Sign/Verify, - Wrap/Unwrap or Encrypt/Decrypt operations. This operation requires the - keys/delete permission. + Requires the keys/recover permission. - :param name: The name of the key to delete. - :type name: str - :returns: The deleted key - :rtype: ~azure.keyvault.keys._models.DeletedKey - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to delete the key + :param str name: The name of the deleted key + :returns: The recovered key + :rtype: ~azure.keyvault.keys.models.Key Example: .. literalinclude:: ../tests/test_samples_keys_async.py - :start-after: [START delete_key] - :end-before: [END delete_key] + :start-after: [START recover_deleted_key] + :end-before: [END recover_deleted_key] :language: python - :caption: Deletes a key in the key vault + :caption: Recover a deleted key :dedent: 8 """ - bundle = await self._client.delete_key(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) - return DeletedKey._from_deleted_key_bundle(bundle) + bundle = await self._client.recover_deleted_key(self.vault_url, name, **kwargs) + return Key._from_key_bundle(bundle) @distributed_trace_async - async def get_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedKey: - """Gets a deleted key from the Key Vault - - The Get Deleted Key operation is applicable for soft-delete enabled - vaults. While the operation can be invoked on any vault, it will return - an error if invoked on a non soft-delete enabled vault. This operation - requires the keys/get permission. + async def update_key( + self, + name: str, + version: Optional[str] = None, + key_operations: Optional[List[str]] = None, + enabled: Optional[bool] = None, + not_before: Optional[datetime] = None, + expires: Optional[datetime] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs: Mapping[str, Any] + ) -> Key: + """Change attributes of a key. Cannot change a key's cryptographic material. Requires the keys/update + permission. - :param name: The name of the key. - :type name: str - :returns: The deleted key - :rtype: ~azure.keyvault.keys._models.DeletedKey - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to retrieve the key + :param str name: The name of key to update + :param str version: (optional) The version of the key to update + :param key_operations: (optional) Allowed key operations + :type key_operations: list(str or ~azure.keyvault.keys.enums.JsonWebKeyOperation) + :param bool enabled: (optional) Whether the key is enabled for use + :param datetime.datetime expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :returns: The updated key + :rtype: ~azure.keyvault.keys.models.Key + :raises: ~azure.core.exceptions.ResourceNotFoundError if the key doesn't exist Example: .. literalinclude:: ../tests/test_samples_keys_async.py - :start-after: [START get_deleted_key] - :end-before: [END get_deleted_key] + :start-after: [START update_key] + :end-before: [END update_key] :language: python - :caption: Retrieves a deleted key from the key vault + :caption: Update a key's attributes :dedent: 8 """ - bundle = await self._client.get_deleted_key( - self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs + if enabled is not None or not_before is not None or expires is not None: + attributes = self._client.models.KeyAttributes(enabled=enabled, not_before=not_before, expires=expires) + else: + attributes = None + + bundle = await self._client.update_key( + self.vault_url, + name, + key_version=version or "", + key_ops=key_operations, + tags=tags, + key_attributes=attributes, + error_map={404: ResourceNotFoundError}, + **kwargs, ) - return DeletedKey._from_deleted_key_bundle(bundle) + return Key._from_key_bundle(bundle) - @distributed_trace - def list_deleted_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[DeletedKey]: - """Lists the deleted keys in the specified vault. + @distributed_trace_async + async def backup_key(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: + """Back up a key in a protected form that can't be used outside Azure Key Vault. This is intended to allow + copying a key from one vault to another. Requires the key/backup permission. - Retrieves a list of the keys in the Key Vault as JSON Web Key - structures that contain the public part of a deleted key. This - operation includes deletion-specific information. The Get Deleted Keys - operation is applicable for vaults enabled for soft-delete. While the - operation can be invoked on any vault, it will return an error if - invoked on a non soft-delete enabled vault. This operation requires the - keys/list permission. + Backup / restore cannot be performed across geopolitical boundaries. For example, a backup from a vault in a + USA region cannot be restored to a vault in an EU region. - :returns: An iterator like instance of DeletedKey - :rtype: - typing.AsyncIterable[~azure.keyvault.keys._models.DeletedKey] + :param str name: The name of the key + :returns: The raw bytes of the key backup + :rtype: bytes + :raises: ~azure.core.exceptions.ResourceNotFoundError if the key doesn't exist Example: .. literalinclude:: ../tests/test_samples_keys_async.py - :start-after: [START list_deleted_keys] - :end-before: [END list_deleted_keys] + :start-after: [START backup_key] + :end-before: [END backup_key] :language: python - :caption: List all the deleted keys in the vault + :caption: Get a key backup :dedent: 8 """ - max_results = kwargs.get("max_page_size") - return self._client.get_deleted_keys( - self.vault_url, - maxresults=max_results, - cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], - **kwargs + backup_result = await self._client.backup_key( + self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs ) + return backup_result.value @distributed_trace_async - async def purge_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> None: - """Permanently deletes the specified key. - - The Purge Deleted Key operation is applicable for soft-delete enabled - vaults. While the operation can be invoked on any vault, it will return - an error if invoked on a non soft-delete enabled vault. This operation - requires the keys/purge permission. - - :param name: The name of the key - :type name: str - :returns: None - :rtype: None - - Example: - .. code-block:: python - - # if the vault has soft-delete enabled, purge permanently deletes a deleted key - # (with soft-delete disabled, delete itself is permanent) - await key_client.purge_deleted_key("key-name") - - """ - await self._client.purge_deleted_key(self.vault_url, name, **kwargs) - - @distributed_trace_async - async def recover_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> Key: - """Recovers the deleted key to its latest version. + async def restore_key(self, backup: bytes, **kwargs: Mapping[str, Any]) -> Key: + """Restore a key backup to the vault. This imports all versions of the key, with its name, attributes, and + access control policies. Requires the keys/restore permission. - The Recover Deleted Key operation is applicable for deleted keys in - soft-delete enabled vaults. It recovers the deleted key back to its - latest version under /keys. An attempt to recover an non-deleted key - will return an error. Consider this the inverse of the delete operation - on soft-delete enabled vaults. This operation requires the keys/recover - permission. + If the backed up key's name is already in use in the target vault, restoring it will fail. Also, the target + vault must be owned by the same Microsoft Azure subscription as the source vault. - :param name: The name of the deleted key. - :type name: str - :returns: The recovered deleted key - :rtype: ~azure.keyvault.keys._models.Key + :param bytes backup: The raw bytes of the key backup + :returns: The restored key + :rtype: ~azure.keyvault.keys.models.Key + :raises: ~azure.core.exceptions.ResourceExistsError if the backed up key's name is already in use Example: .. literalinclude:: ../tests/test_samples_keys_async.py - :start-after: [START recover_deleted_key] - :end-before: [END recover_deleted_key] + :start-after: [START restore_key] + :end-before: [END restore_key] :language: python - :caption: Recovers the specified soft-deleted key + :caption: Restore a key backup :dedent: 8 """ - bundle = await self._client.recover_deleted_key(self.vault_url, name, **kwargs) + bundle = await self._client.restore_key(self.vault_url, backup, error_map={409: ResourceExistsError}, **kwargs) return Key._from_key_bundle(bundle) @distributed_trace_async async def import_key( self, name: str, - key: List[str], + key: JsonWebKey, hsm: Optional[bool] = None, enabled: Optional[bool] = None, not_before: Optional[datetime] = None, @@ -615,30 +482,19 @@ async def import_key( tags: Optional[Dict[str, str]] = None, **kwargs: Mapping[str, Any] ) -> Key: - """Imports an externally created key, stores it, and returns the key to the client. - - The import key operation may be used to import any key type into an - Azure Key Vault. If the named key already exists, Azure Key Vault - creates a new version of the key. This operation requires the - keys/import permission. - - :param name: Name for the imported key. - :type name: str - :param key: The Json web key - :type key: ~azure.security.keyvault.v7_0.models.JsonWebKey - :param hsm: Whether to import as a hardware key (HSM) or software key. - :type hsm: bool - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param expires: Expiry date of the key in UTC. - :type expires: datetime.datetime - :param not_before: Not before date of the key in UTC - :type not_before: datetime.datetime - :param tags: Application specific metadata in the form of key-value - pairs. - :type tags: Dict[str, str] + """Import an externally created key. If ``name`` is already in use, import the key as a new version. Requires + the keys/import permission. + + :param str name: Name for the imported key + :param key: The JSON web key to import + :type key: ~azure.keyvault.keys.models.JsonWebKey + :param bool hsm: (optional) Whether to import as a hardware key (HSM) or software key + :param bool enabled: (optional) Whether the key is enabled for use + :param expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs :returns: The imported key - :rtype: ~azure.keyvault.keys._models.Key + :rtype: ~azure.keyvault.keys.models.Key """ if enabled is not None or not_before is not None or expires is not None: @@ -672,7 +528,7 @@ async def wrap_key( :param algorithm: algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' :type algorithm: str or - ~azure.security.keyvault.v7_0.models.JsonWebKeyEncryptionAlgorithm + ~azure.keyvault.keys.models.JsonWebKeyEncryptionAlgorithm :param value: :type value: bytes :returns: The wrapped symmetric key. @@ -707,7 +563,7 @@ async def unwrap_key( :param algorithm: algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' :type algorithm: str or - ~azure.security.keyvault.v7_0.models.JsonWebKeyEncryptionAlgorithm + ~azure.keyvault.keys.models.JsonWebKeyEncryptionAlgorithm :param value: :type value: bytes :returns: The unwrapped symmetric key. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/client.py new file mode 100644 index 000000000000..dd5854d00533 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/client.py @@ -0,0 +1,574 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from datetime import datetime + +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + # pylint:disable=unused-import + from typing import Any, Dict, Mapping, Optional + from azure.core.paging import ItemPaged + from .models import JsonWebKey + +from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError +from azure.core.tracing.decorator import distributed_trace + +from ._shared import KeyVaultClientBase +from .models import Key, KeyBase, DeletedKey, KeyOperationResult + + +class KeyClient(KeyVaultClientBase): + """A high-level interface for managing a vault's keys. + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START create_key_client] + :end-before: [END create_key_client] + :language: python + :caption: Create a new ``KeyClient`` + :dedent: 4 + """ + + # pylint:disable=protected-access + + @distributed_trace + def create_key( + self, + name, + key_type, + size=None, + key_operations=None, + enabled=None, + expires=None, + not_before=None, + tags=None, + curve=None, + **kwargs + ): + # type: (str, str, Optional[int], Optional[List[str]], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Optional[str], Mapping[str, Any]) -> Key + """Create a key. If ``name`` is already in use, create a new version of the key. Requires the keys/create + permission. + + :param str name: The name of the new key. Key Vault will generate the key's version. + :param key_type: The type of key to create + :type key_type: str or ~azure.keyvault.keys.enums.JsonWebKeyType + :param int size: (optional) RSA key size in bits, for example 2048, 3072, or 4096. + :param key_operations: (optional) Allowed key operations + :type key_operations: list(str or ~azure.keyvault.keys.enums.JsonWebKeyOperation) + :param bool enabled: (optional) Whether the key is enabled for use + :param expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :param curve: (optional) Elliptic curve name. Defaults to the NIST P-256 elliptic curve. + :type curve: ~azure.keyvault.keys.enums.JsonWebKeyCurveName or str + :returns: The created key + :rtype: ~azure.keyvault.keys.models.Key + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START create_key] + :end-before: [END create_key] + :language: python + :caption: Create a key + :dedent: 8 + """ + if enabled is not None or not_before is not None or expires is not None: + attributes = self._client.models.KeyAttributes(enabled=enabled, not_before=not_before, expires=expires) + else: + attributes = None + + bundle = self._client.create_key( + self.vault_url, + name, + key_type, + size, + key_attributes=attributes, + key_ops=key_operations, + tags=tags, + curve=curve, + **kwargs + ) + return Key._from_key_bundle(bundle) + + @distributed_trace + def create_rsa_key( + self, + name, + hsm, + size=None, + key_operations=None, + enabled=None, + expires=None, + not_before=None, + tags=None, + **kwargs + ): + # type: (str, bool, Optional[int], Optional[List[str]], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> Key + """Create a new RSA key. If ``name`` is already in use, create a new version of the key. Requires the + keys/create permission. + + :param str name: The name for the new key. Key Vault will generate the key's version. + :param bool hsm: Whether to create a hardware key (HSM) or software key + :param int size: (optional) Key size in bits, for example 2048, 3072, or 4096 + :param key_operations: (optional) Allowed key operations + :type key_operations: list(str or ~azure.keyvault.keys.enums.JsonWebKeyOperation) + :param bool enabled: (optional) Whether the key is enabled for use + :param expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :returns: The created key + :rtype: ~azure.keyvault.keys.models.Key + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START create_rsa_key] + :end-before: [END create_rsa_key] + :language: python + :caption: Create RSA key + :dedent: 8 + """ + key_type = "RSA-HSM" if hsm else "RSA" + + return self.create_key( + name, + key_type=key_type, + size=size, + key_operations=key_operations, + enabled=enabled, + expires=expires, + not_before=not_before, + tags=tags, + **kwargs + ) + + @distributed_trace + def create_ec_key( + self, + name, + hsm, + curve=None, + key_operations=None, + enabled=None, + expires=None, + not_before=None, + tags=None, + **kwargs + ): + # type: (str, bool, Optional[str], Optional[List[str]], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> Key + """Create a new elliptic curve key. If ``name`` is already in use, create a new version of the key. Requires + the keys/create permission. + + :param str name: The name for the new key. Key Vault will generate the key's version. + :param bool hsm: Whether to create as a hardware key (HSM) or software key. + :param curve: (optional) Elliptic curve name. Defaults to the NIST P-256 elliptic curve. + :type curve: ~azure.keyvault.keys.enums.JsonWebKeyCurveName or str + :param key_operations: (optional) Allowed key operations + :type key_operations: list(~azure.keyvault.keys.enums.JsonWebKeyOperation) + :param bool enabled: (optional) Whether the key is enabled for use + :param datetime.datetime expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :returns: The created key + :rtype: ~azure.keyvault.keys.models.Key + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START create_ec_key] + :end-before: [END create_ec_key] + :language: python + :caption: Create an elliptic curve key + :dedent: 8 + """ + + key_type = "EC-HSM" if hsm else "EC" + + return self.create_key( + name, + key_type=key_type, + curve=curve, + key_operations=key_operations, + enabled=enabled, + expires=expires, + not_before=not_before, + tags=tags, + **kwargs + ) + + @distributed_trace + def delete_key(self, name, **kwargs): + # type: (str, Mapping[str, Any]) -> DeletedKey + """Delete all versions of a key and its cryptographic material. Requires the keys/delete permission. + + :param str name: The name of the key to delete. + :returns: The deleted key + :rtype: ~azure.keyvault.keys.models.DeletedKey + :raises: ~azure.core.exceptions.ResourceNotFoundError if the key doesn't exist + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START delete_key] + :end-before: [END delete_key] + :language: python + :caption: Delete a key + :dedent: 8 + """ + bundle = self._client.delete_key(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) + return DeletedKey._from_deleted_key_bundle(bundle) + + @distributed_trace + def get_key(self, name, version=None, **kwargs): + # type: (str, Optional[str], Mapping[str, Any]) -> Key + """Get a key's attributes and, if it's an asymmetric key, its public material. Requires the keys/get permission. + + :param str name: The name of the key to get. + :param str version: (optional) A specific version of the key to get. If not specified, gets the latest version + of the key. + :rtype: ~azure.keyvault.keys.models.Key + :raises: ~azure.core.exceptions.ResourceNotFoundError if the key doesn't exist + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START get_key] + :end-before: [END get_key] + :language: python + :caption: Get a key + :dedent: 8 + """ + bundle = self._client.get_key( + self.vault_url, name, key_version=version or "", error_map={404: ResourceNotFoundError}, **kwargs + ) + return Key._from_key_bundle(bundle) + + @distributed_trace + def get_deleted_key(self, name, **kwargs): + # type: (str, Mapping[str, Any]) -> DeletedKey + """Get a deleted key. This is only possible in a vault with soft-delete enabled. Requires the keys/get + permission. + + :param str name: The name of the key + :returns: The deleted key + :rtype: ~azure.keyvault.keys.models.DeletedKey + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START get_deleted_key] + :end-before: [END get_deleted_key] + :language: python + :caption: Get a deleted key + :dedent: 8 + """ + # TODO: which exception is raised when soft-delete is not enabled + bundle = self._client.get_deleted_key(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) + return DeletedKey._from_deleted_key_bundle(bundle) + + @distributed_trace + def list_deleted_keys(self, **kwargs): + # type: (Mapping[str, Any]) -> ItemPaged[DeletedKey] + """List all deleted keys, including the public part of each. This is only possible in a vault with soft-delete + enabled. Requires the keys/list permission. + + :returns: An iterator of deleted keys + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.keys.models.DeletedKey] + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START list_deleted_keys] + :end-before: [END list_deleted_keys] + :language: python + :caption: List all the deleted keys + :dedent: 8 + """ + max_page_size = kwargs.get("max_page_size", None) + return self._client.get_deleted_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) + + @distributed_trace + def list_keys(self, **kwargs): + # type: (Mapping[str, Any]) -> ItemPaged[KeyBase] + """List identifiers, attributes, and tags of all keys in the vault. Requires the keys/list permission. + + :returns: An iterator of keys without their cryptographic material or version information + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.keys.models.KeyBase] + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START list_keys] + :end-before: [END list_keys] + :language: python + :caption: List all keys + :dedent: 8 + """ + max_page_size = kwargs.get("max_page_size", None) + return self._client.get_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) + + @distributed_trace + def list_key_versions(self, name, **kwargs): + # type: (str, Mapping[str, Any]) -> ItemPaged[KeyBase] + """List the identifiers, attributes, and tags of a key's versions. Requires the keys/list permission. + + :param str name: The name of the key + :returns: An iterator of keys without their cryptographic material + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.keys.models.KeyBase] + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START list_key_versions] + :end-before: [END list_key_versions] + :language: python + :caption: List all versions of a key + :dedent: 8 + """ + max_page_size = kwargs.get("max_page_size", None) + return self._client.get_key_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) + + @distributed_trace + def purge_deleted_key(self, name, **kwargs): + # type: (str, Mapping[str, Any]) -> None + """Permanently delete the specified key. This is only possible in vaults with soft-delete enabled. If a vault + does not have soft-delete enabled, :func:`delete_key` is permanent, and this method will return an error. + + Requires the keys/purge permission. + + :param str name: The name of the key + :returns: None + + Example: + .. code-block:: python + + # if the vault has soft-delete enabled, purge permanently deletes a deleted key + # (with soft-delete disabled, delete_key is permanent) + key_client.purge_deleted_key("key-name") + + """ + self._client.purge_deleted_key(self.vault_url, name, kwargs) + + @distributed_trace + def recover_deleted_key(self, name, **kwargs): + # type: (str, Mapping[str, Any]) -> Key + """Recover a deleted key to its latest version. This is only possible in vaults with soft-delete enabled. If a + vault does not have soft-delete enabled, :func:`delete_key` is permanent, and this method will return an error. + Attempting to recover an non-deleted key will also return an error. + + Requires the keys/recover permission. + + :param str name: The name of the deleted key + :returns: The recovered key + :rtype: ~azure.keyvault.keys.models.Key + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START recover_deleted_key] + :end-before: [END recover_deleted_key] + :language: python + :caption: Recover a deleted key + :dedent: 8 + """ + bundle = self._client.recover_deleted_key(self.vault_url, name, kwargs) + return Key._from_key_bundle(bundle) + + @distributed_trace + def update_key( + self, name, version=None, key_operations=None, enabled=None, expires=None, not_before=None, tags=None, **kwargs + ): + # type: (str, Optional[str], Optional[List[str]], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> Key + """Change attributes of a key. Cannot change a key's cryptographic material. Requires the keys/update + permission. + + :param str name: The name of key to update + :param str version: (optional) The version of the key to update + :param key_operations: (optional) Allowed key operations + :type key_operations: list(str or ~azure.keyvault.keys.enums.JsonWebKeyOperation) + :param bool enabled: (optional) Whether the key is enabled for use + :param datetime.datetime expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :returns: The updated key + :rtype: ~azure.keyvault.keys.models.Key + :raises: ~azure.core.exceptions.ResourceNotFoundError if the key doesn't exist + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START update_key] + :end-before: [END update_key] + :language: python + :caption: Update a key's attributes + :dedent: 8 + """ + if enabled is not None or not_before is not None or expires is not None: + attributes = self._client.models.KeyAttributes(enabled=enabled, not_before=not_before, expires=expires) + else: + attributes = None + bundle = self._client.update_key( + self.vault_url, + name, + key_version=version or "", + key_ops=key_operations, + tags=tags, + key_attributes=attributes, + error_map={404: ResourceNotFoundError}, + **kwargs + ) + return Key._from_key_bundle(bundle) + + @distributed_trace + def backup_key(self, name, **kwargs): + # type: (str, Mapping[str, Any]) -> bytes + """Back up a key in a protected form that can't be used outside Azure Key Vault. This is intended to allow + copying a key from one vault to another. Requires the key/backup permission. + + Backup / restore cannot be performed across geopolitical boundaries. For example, a backup from a vault in a + USA region cannot be restored to a vault in an EU region. + + :param str name: The name of the key + :returns: The raw bytes of the key backup + :rtype: bytes + :raises: ~azure.core.exceptions.ResourceNotFoundError if the key doesn't exist + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START backup_key] + :end-before: [END backup_key] + :language: python + :caption: Get a key backup + :dedent: 8 + """ + backup_result = self._client.backup_key(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) + return backup_result.value + + @distributed_trace + def restore_key(self, backup, **kwargs): + # type: (bytes, Mapping[str, Any]) -> Key + """Restore a key backup to the vault. This imports all versions of the key, with its name, attributes, and + access control policies. Requires the keys/restore permission. + + If the backed up key's name is already in use in the target vault, restoring it will fail. Also, the target + vault must be owned by the same Microsoft Azure subscription as the source vault. + + :param bytes backup: The raw bytes of the key backup + :returns: The restored key + :rtype: ~azure.keyvault.keys.models.Key + :raises: ~azure.core.exceptions.ResourceExistsError if the backed up key's name is already in use + + Example: + .. literalinclude:: ../tests/test_samples_keys.py + :start-after: [START restore_key] + :end-before: [END restore_key] + :language: python + :caption: Restore a key backup + :dedent: 8 + """ + bundle = self._client.restore_key(self.vault_url, backup, error_map={409: ResourceExistsError}, **kwargs) + return Key._from_key_bundle(bundle) + + @distributed_trace + def import_key(self, name, key, hsm=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs): + # type: (str, List[str], Optional[bool], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> Key + """Import an externally created key. If ``name`` is already in use, import the key as a new version. Requires + the keys/import permission. + + :param str name: Name for the imported key + :param key: The JSON web key to import + :type key: ~azure.keyvault.keys.models.JsonWebKey + :param bool hsm: (optional) Whether to import as a hardware key (HSM) or software key + :param bool enabled: (optional) Whether the key is enabled for use + :param expires: (optional) Expiry date of the key in UTC + :param datetime.datetime not_before: (optional) Not before date of the key in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :returns: The imported key + :rtype: ~azure.keyvault.keys.models.Key + + """ + if enabled is not None or not_before is not None or expires is not None: + attributes = self._client.models.KeyAttributes(enabled=enabled, not_before=not_before, expires=expires) + else: + attributes = None + bundle = self._client.import_key( + self.vault_url, name, key=key, hsm=hsm, key_attributes=attributes, tags=tags, **kwargs + ) + return Key._from_key_bundle(bundle) + + @distributed_trace + def wrap_key(self, name, algorithm, value, version=None, **kwargs): + # type: (str, str, Optional[str], bytes, Mapping[str, Any]) -> KeyOperationResult + """Wraps a symmetric key using a specified key. + + The WRAP operation supports encryption of a symmetric key using a key + encryption key that has previously been stored in an Azure Key Vault. + The WRAP operation is only strictly necessary for symmetric keys stored + in Azure Key Vault since protection with an asymmetric key can be + performed using the public portion of the key. This operation is + supported for asymmetric keys as a convenience for callers that have a + key-reference but do not have access to the public key material. This + operation requires the keys/wrapKey permission. + + :param str name: The name of the key + :param str version: The version of the key. + :param algorithm: algorithm identifier. Possible values include: + 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + :type algorithm: str or + ~azure.security.keyvault.v7_0.models.JsonWebKeyEncryptionAlgorithm + :param value: + :type value: bytes + :returns: The wrapped symmetric key. + :rtype: ~azure.keyvault.keys.models.Key + + """ + if version is None: + version = "" + + bundle = self._client.wrap_key( + self.vault_url, name, key_version=version, algorithm=algorithm, value=value, **kwargs + ) + return KeyOperationResult(id=bundle.kid, value=bundle.result) + + @distributed_trace + def unwrap_key(self, name, algorithm, value, version=None, **kwargs): + # type: (str, str, Optional[str], bytes, Mapping[str, Any]) -> KeyOperationResult + """Unwraps a symmetric key using the specified key that was initially used + for wrapping that key. + + The UNWRAP operation supports decryption of a symmetric key using the + target key encryption key. This operation is the reverse of the WRAP + operation. The UNWRAP operation applies to asymmetric and symmetric + keys stored in Azure Key Vault since it uses the private portion of the + key. This operation requires the keys/unwrapKey permission. + + :param str name: The name of the key + :param str version: The version of the key. + :param algorithm: algorithm identifier. Possible values include: + 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + :type algorithm: str or + ~azure.security.keyvault.v7_0.models.JsonWebKeyEncryptionAlgorithm + :param value: + :type value: bytes + :returns: The unwrapped symmetric key. + :rtype: ~azure.keyvault.keys.models.Key + + """ + if version is None: + version = "" + + bundle = self._client.unwrap_key( + self.vault_url, name, key_version=version, algorithm=algorithm, value=value, **kwargs + ) + return KeyOperationResult(id=bundle.kid, value=bundle.result) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/enums.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/enums.py new file mode 100644 index 000000000000..228e0a6d4095 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/enums.py @@ -0,0 +1,35 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from enum import Enum + + +class JsonWebKeyCurveName(str, Enum): + """Supported elliptic curves""" + + p_256 = "P-256" #: The NIST P-256 elliptic curve, AKA SECG curve SECP256R1. + p_384 = "P-384" #: The NIST P-384 elliptic curve, AKA SECG curve SECP384R1. + p_521 = "P-521" #: The NIST P-521 elliptic curve, AKA SECG curve SECP521R1. + p_256_k = "P-256K" #: The SECG SECP256K1 elliptic curve. + + +class JsonWebKeyOperation(str, Enum): + """Supported key operations""" + + encrypt = "encrypt" + decrypt = "decrypt" + sign = "sign" + verify = "verify" + wrap_key = "wrapKey" + unwrap_key = "unwrapKey" + + +class JsonWebKeyType(str, Enum): + """Supported key types""" + + ec = "EC" #: Elliptic Curve + ec_hsm = "EC-HSM" #: Elliptic Curve with a private key which is not exportable from the HSM + rsa = "RSA" #: RSA (https://tools.ietf.org/html/rfc3447) + rsa_hsm = "RSA-HSM" #: RSA with a private key which is not exportable from the HSM + oct = "oct" #: Octet sequence (used to represent symmetric keys) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/models.py similarity index 55% rename from sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py rename to sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/models.py index 19ceda29966a..4e1518db97ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/models.py @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------- -import datetime +from collections import namedtuple try: from typing import TYPE_CHECKING @@ -10,20 +10,66 @@ TYPE_CHECKING = False if TYPE_CHECKING: + # pylint:disable=unused-import + from datetime import datetime from typing import Any, Dict, Generator, Mapping, Optional + from ._shared._generated.v7_0 import models as _models -from collections import namedtuple from ._shared import parse_vault_id -from ._shared._generated.v7_0 import models KeyOperationResult = namedtuple("KeyOperationResult", ["id", "value"]) +class JsonWebKey(object): + """As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18. All parameters are optional. + + :param str kid: Key identifier. + :param kty: Key Type (kty), as defined in https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40 + :type kty: str or ~azure.keyvault.keys.enums.JsonWebKeyType + :param key_ops: Allowed operations for the key + :type key_ops: list(~azure.keyvault.keys.enums.JsonWebKeyOperation) + :param bytes n: RSA modulus. + :param bytes e: RSA public exponent. + :param bytes d: RSA private exponent, or the D component of an EC private key. + :param bytes dp: RSA private key parameter. + :param bytes dq: RSA private key parameter. + :param bytes qi: RSA private key parameter. + :param bytes p: RSA secret prime. + :param bytes q: RSA secret prime, with p < q. + :param bytes k: Symmetric key. + :param bytes t: HSM Token, used with 'Bring Your Own Key'. + :param crv: Elliptic curve name. + :type crv: str or ~azure.keyvault.keys.enums.JsonWebKeyCurveName + :param bytes x: X component of an EC public key. + :param bytes y: Y component of an EC public key. + """ + + def __init__(self, **kwargs): + # type: (Any) -> None + super(JsonWebKey, self).__init__(**kwargs) + self.kid = kwargs.get("kid", None) + self.kty = kwargs.get("kty", None) + self.key_ops = kwargs.get("key_ops", None) + self.n = kwargs.get("n", None) + self.e = kwargs.get("e", None) + self.d = kwargs.get("d", None) + self.dp = kwargs.get("dp", None) + self.dq = kwargs.get("dq", None) + self.qi = kwargs.get("qi", None) + self.p = kwargs.get("p", None) + self.q = kwargs.get("q", None) + self.k = kwargs.get("k", None) + self.t = kwargs.get("t", None) + self.crv = kwargs.get("crv", None) + self.x = kwargs.get("x", None) + self.y = kwargs.get("y", None) + + class KeyBase(object): """A key's id and attributes.""" def __init__(self, attributes, vault_id, **kwargs): - # type: (models.KeyAttributes, str, Mapping[str, Any]) -> None + # type: (_models.KeyAttributes, str, Mapping[str, Any]) -> None self._attributes = attributes self._id = vault_id self._vault_id = parse_vault_id(vault_id) @@ -32,106 +78,122 @@ def __init__(self, attributes, vault_id, **kwargs): @classmethod def _from_key_bundle(cls, key_bundle): - # type: (models.KeyBundle) -> KeyBase + # type: (_models.KeyBundle) -> KeyBase """Construct a KeyBase from an autorest-generated KeyBundle""" return cls(key_bundle.attributes, key_bundle.key.kid, managed=key_bundle.managed, tags=key_bundle.tags) @classmethod def _from_key_item(cls, key_item): - # type: (models.KeyItem) -> KeyBase + # type: (_models.KeyItem) -> KeyBase """Construct a KeyBase from an autorest-generated KeyItem""" return cls(key_item.attributes, key_item.kid, managed=key_item.managed, tags=key_item.tags) @property def id(self): # type: () -> str - """The key id - :rtype: str""" + """:rtype: str""" return self._id @property def name(self): # type: () -> str - """The name of the key - :rtype: str""" + """:rtype: str""" return self._vault_id.name @property def version(self): # type: () -> str - """The version of the key - :rtype: str""" + """:rtype: str""" return self._vault_id.version @property def enabled(self): # type: () -> bool - """The Key's 'enabled' attribute - :rtype: bool""" + """:rtype: bool""" return self._attributes.enabled @property def not_before(self): # type: () -> datetime - """The Key's not_before date in UTC - :rtype: datetime""" + """ + The key's not-before time, in UTC + + :rtype: datetime.datetime + """ return self._attributes.not_before @property def expires(self): # type: () -> datetime - """The Key's expiry date in UTC - :rtype: datetime""" + """ + When the key will expire, in UTC + + :rtype: datetime.datetime + """ return self._attributes.expires @property def created(self): # type: () -> datetime - """The Key's creation time in UTC - :rtype: datetime""" + """ + When the key was created, in UTC + + :rtype: datetime.datetime + """ return self._attributes.created @property def updated(self): # type: () -> datetime - """The Key's last updated time in UTC - :rtype: datetime""" + """ + When the key was last updated, in UTC + + :rtype: datetime.datetime + """ return self._attributes.updated @property def vault_url(self): # type: () -> str - """The url of the vault containing the key - :rtype: str""" + """ + URL of the vault containing the key + + :rtype: str + """ return self._vault_id.vault_url @property def recovery_level(self): # type: () -> str - """The vault's deletion recovery level for keys - :rtype: str""" + """ + The vault's deletion recovery level for keys + + :rtype: str + """ return self._attributes.recovery_level @property def tags(self): # type: () -> Dict[str, str] - """Application specific metadata in the form of key-value pairs. - :rtype: dict""" + """ + Application specific metadata in the form of key-value pairs + + :rtype: dict + """ return self._tags class Key(KeyBase): - """A key consisting of all KeyBase and key_material information. - """ + """A key's attributes and cryptographic material""" def __init__(self, attributes, vault_id, key_material, **kwargs): - # type: (models.KeyAttributes, str, models.JsonWebKey, Mapping[str, Any]) -> None + # type: (_models.KeyAttributes, str, _models.JsonWebKey, Mapping[str, Any]) -> None super(Key, self).__init__(attributes, vault_id, **kwargs) self._key_material = key_material @classmethod def _from_key_bundle(cls, key_bundle): - # type: (models.KeyBundle) -> Key + # type: (_models.KeyBundle) -> Key """Construct a Key from an autorest-generated KeyBundle""" return cls( attributes=key_bundle.attributes, @@ -143,15 +205,13 @@ def _from_key_bundle(cls, key_bundle): @property def key_material(self): - # type: () -> models.JsonWebKey - """The Json web key""" + # type: () -> _models.JsonWebKey + """The JSON web key""" return self._key_material class DeletedKey(Key): - """A Deleted key consisting of its id, attributes, and tags, as - well as when it will be purged, if soft-delete is enabled for the vault. - """ + """A deleted key's id, attributes, and cryptographic material, as well as when it will be purged""" def __init__( self, @@ -163,7 +223,7 @@ def __init__( scheduled_purge_date=None, **kwargs ): - # type: (models.KeyAttributes, str, models.JsonWebKey, Optional[datetime], Optional[str], Optional[datetime], Mapping[str, Any]) -> None + # type: (_models.KeyAttributes, str, _models.JsonWebKey, Optional[datetime], Optional[str], Optional[datetime], Mapping[str, Any]) -> None super(DeletedKey, self).__init__(attributes, vault_id, key_material, **kwargs) self._deleted_date = deleted_date self._recovery_id = recovery_id @@ -171,7 +231,7 @@ def __init__( @classmethod def _from_deleted_key_bundle(cls, deleted_key_bundle): - # type: (models.DeletedKeyBundle) -> DeletedKey + # type: (_models.DeletedKeyBundle) -> DeletedKey """Construct a DeletedKey from an autorest-generated DeletedKeyBundle""" return cls( attributes=deleted_key_bundle.attributes, @@ -186,7 +246,7 @@ def _from_deleted_key_bundle(cls, deleted_key_bundle): @classmethod def _from_deleted_key_item(cls, deleted_key_item): - # type: (models.DeletedKeyItem) -> DeletedKey + # type: (_models.DeletedKeyItem) -> DeletedKey """Construct a DeletedKey from an autorest-generated DeletedKeyItem""" return cls( attributes=deleted_key_item.attributes, @@ -201,20 +261,29 @@ def _from_deleted_key_item(cls, deleted_key_item): @property def deleted_date(self): # type: () -> datetime - """The time when the key was deleted, in UTC - :rtype: datetime""" + """ + When the key was deleted, in UTC + + :rtype: datetime.datetime + """ return self._deleted_date @property def recovery_id(self): # type: () -> str - """The url of the recovery object, used to identify and recover the deleted key - :rtype: str""" + """ + An identifier used to recover the deleted key + + :rtype: str + """ return self._recovery_id @property def scheduled_purge_date(self): # type: () -> datetime - """The time when the key is scheduled to be purged, in UTC - :rtype: datetime""" + """ + When the key is scheduled to be purged, in UTC + + :rtype: datetime.datetime + """ return self._scheduled_purge_date diff --git a/sdk/keyvault/azure-keyvault-keys/setup.py b/sdk/keyvault/azure-keyvault-keys/setup.py index 7ace5d61bfcd..0ae136fe914d 100644 --- a/sdk/keyvault/azure-keyvault-keys/setup.py +++ b/sdk/keyvault/azure-keyvault-keys/setup.py @@ -36,7 +36,7 @@ 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"), "r") as fd: VERSION = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not VERSION: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/__init__.py index 44967833f2df..af10d9edd183 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/__init__.py @@ -2,6 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from ._client import SecretClient +from .client import SecretClient __all__ = ["SecretClient"] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/version.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_version.py similarity index 100% rename from sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/version.py rename to sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_version.py diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/__init__.py index 44967833f2df..af10d9edd183 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/__init__.py @@ -2,6 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from ._client import SecretClient +from .client import SecretClient __all__ = ["SecretClient"] 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 similarity index 56% rename from sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py rename to sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/client.py index 9a4a92375ad9..2dbc6944adcc 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 @@ -9,19 +9,19 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async -from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes +from azure.keyvault.secrets.models import Secret, DeletedSecret, SecretAttributes from .._shared import AsyncKeyVaultClientBase class SecretClient(AsyncKeyVaultClientBase): - """SecretClient is a high-level interface for managing a vault's secrets. + """A high-level interface for managing a vault's secrets. Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START create_secret_client] :end-before: [END create_secret_client] :language: python - :caption: Creates a new instance of the Secret client + :caption: Create a new ``SecretClient`` :dedent: 4 """ @@ -29,24 +29,19 @@ class SecretClient(AsyncKeyVaultClientBase): @distributed_trace_async async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: Mapping[str, Any]) -> Secret: - """Get a specified secret from the vault. + """Get a secret. Requires the secrets/get permission. - The GET operation is applicable to any secret stored in Azure Key - Vault. This operation requires the secrets/get permission. - - :param str name: The name of the secret. - :param str version: The version of the secret. If version is None or an empty string, the latest version of - the secret is returned. - :returns: An instance of Secret - :rtype: ~azure.keyvault.secrets._models.Secret - :raises: ~azure.core.exceptions.ResourceNotFoundError if client failed to retrieve the secret + :param str name: The name of the secret + :param str version: (optional) Version of the secret to get. If unspecified, gets the latest version. + :rtype: ~azure.keyvault.secrets.models.Secret + :raises: ~azure.core.exceptions.ResourceNotFoundError if the secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START get_secret] :end-before: [END get_secret] :language: python - :caption: Get secret from the key vault + :caption: Get a secret :dedent: 8 """ bundle = await self._client.get_secret( @@ -66,32 +61,24 @@ async def set_secret( tags: Optional[Dict[str, str]] = None, **kwargs: Mapping[str, Any] ) -> Secret: - """Sets a secret in the vault. - - The SET operation adds a secret to the Azure Key Vault. If the named - secret already exists, Azure Key Vault creates a new version of that - secret. This operation requires the secrets/set permission. + """Set a secret value. Create a new secret if ``name`` is not in use. If it is, create a new version of the + secret. :param str name: The name of the secret :param str value: The value of the secret - :param str content_type: Type of the secret value such as a password - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param not_before: Not before date of the secret in UTC - :type not_before: datetime.datetime - :param expires: Expiry date of the secret in UTC. - :type expires: datetime.datetime - :param tags: Application specific metadata in the form of key-value pairs. - :type tags: dict(str, str) - :returns: The created secret - :rtype: ~azure.keyvault.secrets._models.Secret + :param str content_type: (optional) An arbitrary string indicating the type of the secret, e.g. 'password' + :param bool enabled: (optional) Whether the secret is enabled for use + :param datetime.datetime not_before: (optional) Not before date of the secret in UTC + :param datetime.datetime expires: (optional) Expiry date of the secret in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :rtype: ~azure.keyvault.secrets.models.Secret Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START set_secret] :end-before: [END set_secret] :language: python - :caption: Get secret from the key vault + :caption: Set a secret's value :dedent: 8 """ if enabled is not None or not_before is not None or expires is not None: @@ -115,33 +102,26 @@ async def update_secret( tags: Optional[Dict[str, str]] = None, **kwargs: Mapping[str, Any] ) -> SecretAttributes: - """Updates the attributes associated with a specified secret in the key vault. + """Update a secret's attributes, such as its tags or whether it's enabled. Requires the secrets/set permission. - The UPDATE operation changes specified attributes of an existing stored secret. - Attributes that are not specified in the request are left unchanged. The value - of a secret itself cannot be changed. This operation requires the secrets/set permission. + **This method can't change a secret's value.** Use :func:`set_secret` to change values. - :param str name: The name of the secret - :param str version: The version of the secret. - :param str content_type: Type of the secret value such as a password - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param not_before: Not before date of the secret in UTC - :type not_before: datetime.datetime - :param expires: Expiry date of the secret in UTC. - :type expires: datetime.datetime - :param tags: Application specific metadata in the form of key-value pairs. - :type tags: dict(str, str) - :returns: The created secret - :rtype: ~azure.keyvault.secrets._models.SecretAttributes - :raises: ~azure.core.exceptions.ResourceNotFoundError, if client failed to retrieve the secret + :param str name: Name of the secret + :param str version: (optional) Version of the secret to update. If unspecified, the latest version is updated. + :param str content_type: (optional) An arbitrary string indicating the type of the secret, e.g. 'password' + :param bool enabled: (optional) Whether the secret is enabled for use + :param datetime.datetime not_before: (optional) Not before date of the secret in UTC + :param datetime.datetime expires: (optional) Expiry date of the secret in UTC. + :param dict(str, str) tags: (optional) Application specific metadata in the form of key-value pairs. + :rtype: ~azure.keyvault.secrets.models.SecretAttributes + :raises: ~azure.core.exceptions.ResourceNotFoundError if the secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START update_secret] :end-before: [END update_secret] :language: python - :caption: Updates the attributes associated with a specified secret in the key vault + :caption: Updates a secret's attributes :dedent: 8 """ if enabled is not None or not_before is not None or expires is not None: @@ -162,23 +142,18 @@ async def update_secret( @distributed_trace def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: - """List secrets in the vault. - - The Get Secrets operation is applicable to the entire vault. However, - only the latest secret identifier and its attributes are provided in the - response. No secret values are returned and individual secret versions are - not listed in the response. This operation requires the secrets/list permission. + """List the latest identifier and attributes of all secrets in the vault, not including their values. Requires + the secrets/list permission. - :returns: An iterator like instance of Secrets - :rtype: - typing.AsyncIterable[~azure.keyvault.secrets._models.SecretAttributes] + :returns: An iterator of secrets + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.secrets.models.SecretAttributes] Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START list_secrets] :end-before: [END list_secrets] :language: python - :caption: Lists all the secrets in the vault + :caption: Lists all secrets :dedent: 8 """ max_results = kwargs.get("max_page_size") @@ -191,23 +166,19 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: - """List all versions of the specified secret. - - The full secret identifier and attributes are provided in the response. - No values are returned for the secrets. This operation requires the + """List all versions of a secret, including their identifiers and attributes but not their values. Requires the secrets/list permission. - :param str name: The name of the secret. - :returns: An iterator like instance of SecretAttributes - :rtype: - typing.AsyncIterable[~azure.keyvault.secrets._models.SecretAttributes] + :param str name: Name of the secret + :returns: An iterator of secrets + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.secrets.models.SecretAttributes] Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START list_secret_versions] :end-before: [END list_secret_versions] :language: python - :caption: List all versions of the specified secret + :caption: List all versions of a secret :dedent: 8 """ max_results = kwargs.get("max_page_size") @@ -221,23 +192,19 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: - """Backs up the specified secret. - - Requests that a backup of the specified secret be downloaded to the - client. All versions of the secret will be downloaded. This operation - requires the secrets/backup permission. + """Get a backup of all versions of a secret. Requires the secrets/backup permission. - :param str name: The name of the secret. - :returns: The raw bytes of the secret backup. + :param str name: Name of the secret + :returns: The raw bytes of the secret backup :rtype: bytes - :raises: ~azure.core.exceptions.ResourceNotFoundError, if client failed to retrieve the secret + :raises: ~azure.core.exceptions.ResourceNotFoundError if the secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START backup_secret] :end-before: [END backup_secret] :language: python - :caption: Backs up the specified secret + :caption: Back up a secret :dedent: 8 """ backup_result = await self._client.backup_secret( @@ -247,22 +214,19 @@ async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @distributed_trace_async async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> SecretAttributes: - """Restores a backed up secret to a vault. - - Restores a backed up secret, and all its versions, to a vault. This - operation requires the secrets/restore permission. + """Restore a backed up secret. Requires the secrets/restore permission. :param bytes backup: The raw bytes of the secret backup :returns: The restored secret - :rtype: ~azure.keyvault.secrets._models.SecretAttributes - :raises: ~azure.core.exceptions.ResourceExistsError, if client failed to restore the secret + :rtype: ~azure.keyvault.secrets.models.SecretAttributes + :raises: ~azure.core.exceptions.ResourceExistsError if the secret's name is already in use Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START restore_secret] :end-before: [END restore_secret] :language: python - :caption: Restores a backed up secret to the vault + :caption: Restore a backed up secret :dedent: 8 """ bundle = await self._client.restore_secret( @@ -272,23 +236,18 @@ async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> Se @distributed_trace_async async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: - """Deletes a secret from the vault. + """Delete all versions of a secret. Requires the secrets/delete permission. - The DELETE operation applies to any secret stored in Azure Key Vault. - DELETE cannot be applied to an individual version of a secret. This - operation requires the secrets/delete permission. - - :param str name: The name of the secret - :returns: The deleted secret. - :rtype: ~azure.keyvault.secrets._models.DeletedSecret - :raises: ~azure.core.exceptions.ClientRequestError, if client failed to delete the secret + :param str name: Name of the secret + :rtype: ~azure.keyvault.secrets.models.DeletedSecret + :raises: ~azure.core.exceptions.ResourceNotFoundError if the secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START delete_secret] :end-before: [END delete_secret] :language: python - :caption: Deletes a secret + :caption: Delete a secret :dedent: 8 """ bundle = await self._client.delete_secret( @@ -298,22 +257,19 @@ async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> Deleted @distributed_trace_async async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: - """Gets the specified deleted secret. - - The Get Deleted Secret operation returns the specified deleted secret - along with its attributes. This operation requires the secrets/get permission. + """Get a deleted secret. This is only possible in vaults with soft-delete enabled. Requires the secrets/get + permission. - :param str name: The name of the secret - :returns: The deleted secret. - :rtype: ~azure.keyvault.secrets._models.DeletedSecret - :raises: ~azure.core.exceptions.ResourceNotFoundError, if client failed to retrieve the secret + :param str name: Name of the secret + :rtype: ~azure.keyvault.secrets.models.DeletedSecret + :raises: ~azure.core.exceptions.ResourceNotFoundError if the deleted secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START get_deleted_secret] :end-before: [END get_deleted_secret] :language: python - :caption: Gets the deleted secret + :caption: Get a deleted secret :dedent: 8 """ bundle = await self._client.get_deleted_secret( @@ -323,22 +279,18 @@ async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> De @distributed_trace def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[DeletedSecret]: - """Lists deleted secrets of the vault. - - The Get Deleted Secrets operation returns the secrets that have - been deleted for a vault enabled for soft-delete. This - operation requires the secrets/list permission. + """Lists all deleted secrets. This is only possible in vaults with soft-delete enabled. Requires the + secrets/list permission. - :returns: An iterator like instance of DeletedSecrets - :rtype: - typing.AsyncIterable[~azure.keyvault.secrets._models.DeletedSecret] + :returns: An iterator of deleted secrets + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.secrets.models.DeletedSecret] Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START list_deleted_secrets] :end-before: [END list_deleted_secrets] :language: python - :caption: Lists the deleted secrets of the vault + :caption: Lists deleted secrets :dedent: 8 """ max_results = kwargs.get("max_page_size") @@ -351,20 +303,19 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: - """Permanently deletes the specified secret. + """Permanently delete a secret. This is only possible in vaults with soft-delete enabled. If a vault + doesn't have soft-delete enabled, :func:`delete_secret` is permanent, and this method will return an error. - The purge deleted secret operation removes the secret permanently, without the - possibility of recovery. This operation can only be enabled on a soft-delete enabled - vault. This operation requires the secrets/purge permission. + Requires the secrets/purge permission. - :param str name: The name of the secret + :param str name: Name of the secret :returns: None Example: .. code-block:: python # if the vault has soft-delete enabled, purge permanently deletes the secret - # (with soft-delete disabled, delete itself is permanent) + # (with soft-delete disabled, delete_secret is permanent) await secret_client.purge_deleted_secret("secret-name") """ @@ -372,22 +323,19 @@ async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> @distributed_trace_async async def recover_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> SecretAttributes: - """Recovers the deleted secret to the latest version. + """Recover a deleted secret to its latest version. This is only possible in vaults with soft-delete enabled. + Requires the secrets/recover permission. - Recovers the deleted secret in the specified vault. - This operation can only be performed on a soft-delete enabled - vault. This operation requires the secrets/recover permission. - - :param str name: The name of the secret - :returns: The recovered deleted secret - :rtype: ~azure.keyvault.secrets._models.SecretAttributes + :param str name: Name of the secret + :returns: The recovered secret + :rtype: ~azure.keyvault.secrets.models.SecretAttributes Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START recover_deleted_secret] :end-before: [END recover_deleted_secret] :language: python - :caption: Restores a backed up secret to the vault + :caption: Recover a deleted secret :dedent: 8 """ bundle = await self._client.recover_deleted_secret(self.vault_url, name, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/client.py similarity index 54% rename from sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py rename to sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/client.py index 40678aabf7d4..1246e49769cb 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/client.py @@ -10,24 +10,26 @@ TYPE_CHECKING = False if TYPE_CHECKING: - from typing import Any, Dict, Generator, Mapping, Optional + # pylint:disable=unused-import + from typing import Any, Dict, Mapping, Optional + from azure.core.paging import ItemPaged from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError from azure.core.tracing.decorator import distributed_trace from ._shared import KeyVaultClientBase -from ._models import Secret, DeletedSecret, SecretAttributes +from .models import Secret, DeletedSecret, SecretAttributes class SecretClient(KeyVaultClientBase): - """SecretClient is a high-level interface for managing a vault's secrets. + """A high-level interface for managing a vault's secrets. Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START create_secret_client] :end-before: [END create_secret_client] :language: python - :caption: Creates a new instance of the Secret client + :caption: Create a new ``SecretClient`` :dedent: 4 """ @@ -36,24 +38,19 @@ class SecretClient(KeyVaultClientBase): @distributed_trace def get_secret(self, name, version=None, **kwargs): # type: (str, str, Mapping[str, Any]) -> Secret - """Get a specified secret from the vault. + """Get a secret. Requires the secrets/get permission. - The GET operation is applicable to any secret stored in Azure Key - Vault. This operation requires the secrets/get permission. - - :param str name: The name of the secret. - :param str version: The version of the secret. If version is None or the empty string, the latest version of - the secret is returned - :returns: An instance of Secret - :rtype: ~azure.keyvault.secrets._models.Secret - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to retrieve the secret + :param str name: The name of the secret + :param str version: (optional) Version of the secret to get. If unspecified, gets the latest version. + :rtype: ~azure.keyvault.secrets.models.Secret + :raises: ~azure.core.exceptions.ResourceNotFoundError if the secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START get_secret] :end-before: [END get_secret] :language: python - :caption: Get secret from the key vault + :caption: Get a secret :dedent: 8 """ bundle = self._client.get_secret( @@ -66,32 +63,24 @@ def set_secret( self, name, value, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): # type: (str, str, Optional[str], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> Secret - """Sets a secret in the vault. - - The SET operation adds a secret to the Azure Key Vault. If the named - secret already exists, Azure Key Vault creates a new version of that - secret. This operation requires the secrets/set permission. + """Set a secret value. Create a new secret if ``name`` is not in use. If it is, create a new version of the + secret. :param str name: The name of the secret :param str value: The value of the secret - :param str content_type: Type of the secret value such as a password - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param not_before: Not before date of the secret in UTC - :type not_before: datetime.datetime - :param expires: Expiry date of the secret in UTC. - :type expires: datetime.datetime - :param tags: Application specific metadata in the form of key-value pairs. - :type tags: dict(str, str) - :returns: The created secret - :rtype: ~azure.keyvault.secrets._models.Secret + :param str content_type: (optional) An arbitrary string indicating the type of the secret, e.g. 'password' + :param bool enabled: (optional) Whether the secret is enabled for use + :param datetime.datetime not_before: (optional) Not before date of the secret in UTC + :param datetime.datetime expires: (optional) Expiry date of the secret in UTC + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :rtype: ~azure.keyvault.secrets.models.Secret Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START set_secret] :end-before: [END set_secret] :language: python - :caption: Set a secret in the key vault + :caption: Set a secret's value :dedent: 8 """ @@ -109,33 +98,26 @@ def update_secret( self, name, version=None, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): # type: (str, Optional[str], Optional[str], Optional[bool], Optional[datetime], Optional[datetime], Optional[Dict[str, str]], Mapping[str, Any]) -> SecretAttributes - """Updates the attributes associated with a specified secret in the key vault. + """Update a secret's attributes, such as its tags or whether it's enabled. Requires the secrets/set permission. - The UPDATE operation changes specified attributes of an existing stored secret. - Attributes that are not specified in the request are left unchanged. The value - of a secret itself cannot be changed. This operation requires the secrets/set permission. + **This method can't change a secret's value.** Use :func:`set_secret` to change values. - :param str name: The name of the secret - :param str version: The version of the secret. - :param str content_type: Type of the secret value such as a password - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param not_before: Not before date of the secret in UTC - :type not_before: datetime.datetime - :param expires: Expiry date of the secret in UTC. - :type expires: datetime.datetime - :param tags: Application specific metadata in the form of key-value pairs. - :type tags: dict(str, str) - :returns: The created secret - :rtype: ~azure.keyvault.secrets._models.SecretAttributes - :raises: ~azure.core.exceptions.ResourceNotFoundError if the client failed to create the secret + :param str name: Name of the secret + :param str version: (optional) Version of the secret to update. If unspecified, the latest version is updated. + :param str content_type: (optional) An arbitrary string indicating the type of the secret, e.g. 'password' + :param bool enabled: (optional) Whether the secret is enabled for use + :param datetime.datetime not_before: (optional) Not before date of the secret in UTC + :param datetime.datetime expires: (optional) Expiry date of the secret in UTC. + :param dict tags: (optional) Application specific metadata in the form of key-value pairs + :rtype: ~azure.keyvault.secrets.models.SecretAttributes + :raises: ~azure.core.exceptions.ResourceNotFoundError if the secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START update_secret] :end-before: [END update_secret] :language: python - :caption: Updates the attributes associated with a specified secret in the key vault + :caption: Update a secret's attributes :dedent: 8 """ @@ -157,24 +139,19 @@ def update_secret( @distributed_trace def list_secrets(self, **kwargs): - # type: (Mapping[str, Any]) -> Generator[SecretAttributes] - """List secrets in the vault. - - The Get Secrets operation is applicable to the entire vault. However, - only the latest secret identifier and its attributes are provided in the - response. No secret values are returned and individual secret versions are - not listed in the response. This operation requires the secrets/list permission. + # type: (Mapping[str, Any]) -> ItemPaged[SecretAttributes] + """List the latest identifier and attributes of all secrets in the vault, not including their values. Requires + the secrets/list permission. - :returns: An iterator like instance of Secrets - :rtype: - Generator[~azure.keyvault.secrets._models.SecretAttributes] + :returns: An iterator of secrets + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.secrets.models.SecretAttributes] Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START list_secrets] :end-before: [END list_secrets] :language: python - :caption: Lists all the secrets in the vault + :caption: List all secrets :dedent: 8 """ @@ -188,24 +165,20 @@ def list_secrets(self, **kwargs): @distributed_trace def list_secret_versions(self, name, **kwargs): - # type: (str, Mapping[str, Any]) -> Generator[SecretAttributes] - """List all versions of the specified secret. - - The full secret identifier and attributes are provided in the response. - No values are returned for the secrets. This operations requires the + # type: (str, Mapping[str, Any]) -> ItemPaged[SecretAttributes] + """List all versions of a secret, including their identifiers and attributes but not their values. Requires the secrets/list permission. - :param str name: The name of the secret. - :returns: An iterator like instance of Secret - :rtype: - Generator[~azure.keyvault.secrets._models.SecretAttributes] + :param str name: Name of the secret + :returns: An iterator of secrets + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.secrets.models.SecretAttributes] Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START list_secret_versions] :end-before: [END list_secret_versions] :language: python - :caption: List all versions of the specified secret + :caption: List all versions of a secret :dedent: 8 """ @@ -221,23 +194,19 @@ def list_secret_versions(self, name, **kwargs): @distributed_trace def backup_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> bytes - """Backs up the specified secret. - - Requests that a backup of the specified secret be downloaded to the - client. All versions of the secret will be downloaded. This operation - requires the secrets/backup permission. + """Get a backup of all versions of a secret. Requires the secrets/backup permission. - :param str name: The name of the secret. - :returns: The raw bytes of the secret backup. + :param str name: Name of the secret + :returns: The raw bytes of the secret backup :rtype: bytes - :raises: ~azure.core.exceptions.ResourceNotFoundError, if client failed to back up the secret + :raises: ~azure.core.exceptions.ResourceNotFoundError if the secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START backup_secret] :end-before: [END backup_secret] :language: python - :caption: Backs up the specified secret + :caption: Back up a secret :dedent: 8 """ @@ -249,22 +218,19 @@ def backup_secret(self, name, **kwargs): @distributed_trace def restore_secret(self, backup, **kwargs): # type: (bytes, Mapping[str, Any]) -> SecretAttributes - """Restore a backed up secret to the vault. - - Restores a backed up secret, and all its versions, to a vault. This - operation requires the secrets/restore permission. + """Restore a backed up secret. Requires the secrets/restore permission. :param bytes backup: The raw bytes of the secret backup :returns: The restored secret - :rtype: ~azure.keyvault.secrets._models.SecretAttributes - :raises: ~azure.core.exceptions.ResourceExistsError, if client failed to restore the secret + :rtype: ~azure.keyvault.secrets.models.SecretAttributes + :raises: ~azure.core.exceptions.ResourceExistsError if the secret's name is already in use Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START restore_secret] :end-before: [END restore_secret] :language: python - :caption: Restores a backed up secret to the vault + :caption: Restore a backed up secret :dedent: 8 """ @@ -274,23 +240,18 @@ def restore_secret(self, backup, **kwargs): @distributed_trace def delete_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret - """Deletes a secret from the vault. + """Delete all versions of a secret. Requires the secrets/delete permission. - The DELETE operation applies to any secret stored in Azure Key Vault. - DELETE cannot be applied to an individual version of a secret. This - operation requires the secrets/delete permission. - - :param str name: The name of the secret - :return: The deleted secret. - :rtype: ~azure.keyvault.secrets._models.DeletedSecret - :raises: ~azure.core.exceptions.ResourceNotFoundError, if client failed to delete the secret + :param str name: Name of the secret + :rtype: ~azure.keyvault.secrets.models.DeletedSecret + :raises: ~azure.core.exceptions.ResourceNotFoundError if the secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START delete_secret] :end-before: [END delete_secret] :language: python - :caption: Deletes a secret + :caption: Delete a secret :dedent: 8 """ @@ -300,22 +261,19 @@ def delete_secret(self, name, **kwargs): @distributed_trace def get_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret - """Gets the specified deleted secret. - - The Get Deleted Secret operation returns the specified deleted secret - along with its attributes. This operation requires the secrets/get permission. + """Get a deleted secret. This is only possible in vaults with soft-delete enabled. Requires the secrets/get + permission. - :param str name: The name of the secret - :return: The deleted secret. - :rtype: ~azure.keyvault.secrets._models.DeletedSecret - :raises: ~azure.core.exceptions.ResourceNotFoundError, if client failed to get the deleted secret + :param str name: Name of the secret + :rtype: ~azure.keyvault.secrets.models.DeletedSecret + :raises: ~azure.core.exceptions.ResourceNotFoundError if the deleted secret doesn't exist Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START get_deleted_secret] :end-before: [END get_deleted_secret] :language: python - :caption: Gets the deleted secret + :caption: Get a deleted secret :dedent: 8 """ @@ -324,23 +282,19 @@ def get_deleted_secret(self, name, **kwargs): @distributed_trace def list_deleted_secrets(self, **kwargs): - # type: (Mapping[str, Any]) -> Generator[DeletedSecret] - """Lists deleted secrets of the vault. - - The Get Deleted Secrets operation returns the secrets that have - been deleted for a vault enabled for soft-delete. This - operation requires the secrets/list permission. + # type: (Mapping[str, Any]) -> ItemPaged[DeletedSecret] + """Lists all deleted secrets. This is only possible in vaults with soft-delete enabled. Requires the + secrets/list permission. - :returns: An iterator like instance of DeletedSecrets - :rtype: - Generator[~azure.keyvault.secrets._models.DeletedSecret] + :returns: An iterator of deleted secrets + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.secrets.models.DeletedSecret] Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START list_deleted_secrets] :end-before: [END list_deleted_secrets] :language: python - :caption: Lists the deleted secrets of the vault + :caption: List deleted secrets :dedent: 8 """ @@ -355,21 +309,19 @@ def list_deleted_secrets(self, **kwargs): @distributed_trace def purge_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> None - """Permanently deletes the specified secret. + """Permanently delete a secret. This is only possible in vaults with soft-delete enabled. If a vault + doesn't have soft-delete enabled, :func:`delete_secret` is permanent, and this method will return an error. - The purge deleted secret operation removes the secret permanently, without the - possibility of recovery. This operation can only be enabled on a soft-delete enabled - vault. This operation requires the secrets/purge permission. + Requires the secrets/purge permission. - :param str name: The name of the secret + :param str name: Name of the secret :returns: None - :raises: ~azure.core.exceptions.HttpResponseError, if client failed to return the purged secret Example: .. code-block:: python # if the vault has soft-delete enabled, purge permanently deletes the secret - # (with soft-delete disabled, delete itself is permanent) + # (with soft-delete disabled, delete_secret is permanent) secret_client.purge_deleted_secret("secret-name") """ @@ -378,23 +330,19 @@ def purge_deleted_secret(self, name, **kwargs): @distributed_trace def recover_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> SecretAttributes - """Recovers the deleted secret to the latest version. + """Recover a deleted secret to its latest version. This is only possible in vaults with soft-delete enabled. + Requires the secrets/recover permission. - Recovers the deleted secret in the specified vault. - This operation can only be performed on a soft-delete enabled - vault. This operation requires the secrets/recover permission. - - :param str name: The name of the secret - :returns: The recovered deleted secret - :rtype: ~azure.keyvault.secrets._models.SecretAttributes - :raises: ~azure.core.exceptions.HttpResponseError, if client failed to recover the deleted secret + :param str name: Name of the secret + :returns: The recovered secret + :rtype: ~azure.keyvault.secrets.models.SecretAttributes Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START recover_deleted_secret] :end-before: [END recover_deleted_secret] :language: python - :caption: Restores a backed up secret to the vault + :caption: Recover a deleted secret :dedent: 8 """ diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/models.py similarity index 72% rename from sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_models.py rename to sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/models.py index a8629aeeee28..ee802d052ef7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/models.py @@ -2,25 +2,25 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -import datetime - try: from typing import TYPE_CHECKING except ImportError: TYPE_CHECKING = False if TYPE_CHECKING: + # pylint:disable=unused-import + from datetime import datetime from typing import Any, Dict, Mapping, Optional + from ._shared._generated.v7_0 import models as _models from ._shared import parse_vault_id -from ._shared._generated.v7_0 import models class SecretAttributes(object): """A secret's id and attributes.""" def __init__(self, attributes, vault_id, **kwargs): - # type: (models.SecretAttributes, str, Mapping[str, Any]) -> None + # type: (_models.SecretAttributes, str, Mapping[str, Any]) -> None self._attributes = attributes self._id = vault_id self._vault_id = parse_vault_id(vault_id) @@ -31,7 +31,7 @@ def __init__(self, attributes, vault_id, **kwargs): @classmethod def _from_secret_bundle(cls, secret_bundle): - # type: (models.SecretBundle) -> SecretAttributes + # type: (_models.SecretBundle) -> SecretAttributes """Construct a SecretAttributes from an autorest-generated SecretBundle""" return cls( secret_bundle.attributes, @@ -44,7 +44,7 @@ def _from_secret_bundle(cls, secret_bundle): @classmethod def _from_secret_item(cls, secret_item): - # type: (models.SecretItem) -> SecretAttributes + # type: (_models.SecretItem) -> SecretAttributes """Construct a SecretAttributes from an autorest-generated SecretItem""" return cls( secret_item.attributes, @@ -57,98 +57,115 @@ def _from_secret_item(cls, secret_item): @property def content_type(self): # type: () -> str - """Type of the secret value such as a password - :rtype: str""" + """:rtype: str""" return self._content_type @property def id(self): # type: () -> str - """The secret id - :rtype: str""" + """:rtype: str""" return self._id @property def key_id(self): # type: () -> str - """Specifies the corresponding key id backing the KV certificate - :rtype: str""" + """ + If this secret backs a certificate, this property is the identifier of the corresponding key. + + :rtype: str + """ return self._key_id @property def enabled(self): # type: () -> bool - """The Secret's 'enabled' attribute - :rtype: bool""" + """:rtype: bool""" return self._attributes.enabled @property def not_before(self): # type: () -> datetime - """The Secret's not_before date in UTC - :rtype: datetime""" + """ + Not-before time, in UTC + + :rtype: datetime.datetime + """ return self._attributes.not_before @property def expires(self): # type: () -> datetime - """The Secret's expiry date in UTC - :rtype: datetime""" + """ + When the secret expires, in UTC + + :rtype: datetime.datetime + """ return self._attributes.expires @property def created(self): # type: () -> datetime - """The Secret's creation time in UTC - :rtype: datetime""" + """ + When the secret was created, in UTC + + :rtype: datetime.datetime + """ return self._attributes.created @property def updated(self): # type: () -> datetime - """The Secret's last updated time in UTC - :rtype: datetime""" + """ + When the secret was last updated, in UTC + + :rtype: datetime.datetime + """ return self._attributes.updated @property def recovery_level(self): # type: () -> str - """Reflects the deletion recovery level currently in effect for secrets in the current vault - :rtype: str""" + """ + The vault's deletion recovery level for secrets + + :rtype: str + """ return self._attributes.recovery_level @property def vault_url(self): # type: () -> str - """The url of the vault containing the secret - :rtype: str""" + """ + URL of the vault containing the secret + + :rtype: str + """ return self._vault_id.vault_url @property def name(self): # type: () -> str - """The name of the secret - :rtype: str""" + """:rtype: str""" return self._vault_id.name @property def version(self): # type: () -> str - """The version of the secret - :rtype: str""" + """:rtype: str""" return self._vault_id.version @property def tags(self): # type: () -> Dict[str, str] - """Application specific metadata in the form of key-value pairs. + """ + Application specific metadata in the form of key-value pairs + :rtype: dict""" return self._tags class Secret(SecretAttributes): - """A secret consisting of all SecretAttributes and value information. - """ + """All a secret's attributes, and its value.""" def __init__(self, attributes, vault_id, value, **kwargs): super(Secret, self).__init__(attributes, vault_id, **kwargs) @@ -156,7 +173,7 @@ def __init__(self, attributes, vault_id, value, **kwargs): @classmethod def _from_secret_bundle(cls, secret_bundle): - # type: (models.SecretBundle) -> Secret + # type: (_models.SecretBundle) -> Secret """Construct a Secret from an autorest-generated SecretBundle""" return cls( secret_bundle.attributes, @@ -171,18 +188,19 @@ def _from_secret_bundle(cls, secret_bundle): @property def value(self): # type: () -> str - """The secret's value. - :rtype: str""" + """ + The secret value + + :rtype: str + """ return self._value class DeletedSecret(SecretAttributes): - """A Deleted Secret consisting of its id, attributes, and tags, as - well as when it will be purged, if soft-delete is enabled for the vault. - """ + """A deleted secret's attributes, as well as when it will be purged, if soft-delete is enabled for its vault.""" def __init__(self, attributes, vault_id, deleted_date=None, recovery_id=None, scheduled_purge_date=None, **kwargs): - # type: (models.SecretAttributes, str, Optional[datetime], Optional[str], Optional[datetime], Mapping[str, Any]) -> None + # type: (_models.SecretAttributes, str, Optional[datetime], Optional[str], Optional[datetime], Mapping[str, Any]) -> None super(DeletedSecret, self).__init__(attributes, vault_id, **kwargs) self._deleted_date = deleted_date self._recovery_id = recovery_id @@ -190,7 +208,7 @@ def __init__(self, attributes, vault_id, deleted_date=None, recovery_id=None, sc @classmethod def _from_deleted_secret_bundle(cls, deleted_secret_bundle): - # type: (models.DeletedSecretBundle) -> DeletedSecret + # type: (_models.DeletedSecretBundle) -> DeletedSecret """Construct a DeletedSecret from an autorest-generated DeletedSecretBundle""" return cls( deleted_secret_bundle.attributes, @@ -206,7 +224,7 @@ def _from_deleted_secret_bundle(cls, deleted_secret_bundle): @classmethod def _from_deleted_secret_item(cls, deleted_secret_item): - # type: (models.DeletedSecretItem) -> DeletedSecret + # type: (_models.DeletedSecretItem) -> DeletedSecret """Construct a DeletedSecret from an autorest-generated DeletedSecretItem""" return cls( deleted_secret_item.attributes, @@ -222,20 +240,29 @@ def _from_deleted_secret_item(cls, deleted_secret_item): @property def deleted_date(self): # type: () -> datetime - """The time when the secret was deleted, in UTC - :rtype: datetime""" + """ + When the secret was deleted, in UTC + + :rtype: datetime.datetime + """ return self._deleted_date @property def recovery_id(self): # type: () -> str - """The url of the recovery object, used to identify and recover the deleted secret - :rtype: str""" + """ + An identifier used to recover the deleted secret + + :rtype: str + """ return self._recovery_id @property def scheduled_purge_date(self): # type: () -> datetime - """The time when the secret is scheduled to be purged, in UTC - :rtype: datetime""" + """ + When the secret is scheduled to be purged, in UTC + + :rtype: datetime.datetime + """ return self._scheduled_purge_date diff --git a/sdk/keyvault/azure-keyvault-secrets/setup.py b/sdk/keyvault/azure-keyvault-secrets/setup.py index fcec5d8c9ded..7ffb60b443c9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/setup.py +++ b/sdk/keyvault/azure-keyvault-secrets/setup.py @@ -36,7 +36,7 @@ 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"), "r") as fd: VERSION = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not VERSION: From 2a7a965083108f1813f5d3b705d8e3ec7627772c Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Fri, 2 Aug 2019 12:42:00 -0700 Subject: [PATCH 25/32] Update Key Vault user agent (#6640) --- .../azure/keyvault/keys/_shared/__init__.py | 6 ++++++ .../keys/_shared/async_client_base.py | 19 ++++++++++--------- .../keyvault/keys/_shared/client_base.py | 17 +++++++++-------- .../azure/keyvault/keys/aio/client.py | 6 +++++- .../azure/keyvault/keys/client.py | 4 ++++ .../azure/keyvault/secrets/aio/client.py | 6 +++++- .../azure/keyvault/secrets/client.py | 4 ++++ 7 files changed, 43 insertions(+), 19 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py index 72fb27441900..f4b6c6c3563a 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py @@ -3,6 +3,8 @@ # Licensed under the MIT License. # ------------------------------------ from collections import namedtuple +import platform +from .._version import VERSION try: import urllib.parse as parse @@ -10,6 +12,10 @@ # pylint:disable=import-error import urlparse as parse # type: ignore +USER_AGENT = "azsdk-python-keyvault-keys/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() +) + from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase from .client_base import KeyVaultClientBase from .http_challenge import HttpChallenge 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 193e6e324c7e..8018b3110248 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 @@ -3,14 +3,16 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING + from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies import UserAgentPolicy from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient -from . import AsyncChallengeAuthPolicy +from . import AsyncChallengeAuthPolicy, USER_AGENT if TYPE_CHECKING: @@ -22,14 +24,7 @@ class AsyncKeyVaultClientBase: - """ - :param credential: A credential or credential provider which can be used to authenticate to the vault, - a ValueError will be raised if the entity is not provided - :type credential: azure.authentication.Credential or azure.authentication.CredentialProvider - :param str vault_url: The url of the vault to which the client will connect, - a ValueError will be raised if the entity is not provided - :param ~azure.core.configuration.Configuration config: The configuration for the SecretClient - """ + """Base class for async Key Vault clients""" @staticmethod def _create_config( @@ -39,6 +34,11 @@ def _create_config( api_version = KeyVaultClient.DEFAULT_API_VERSION config = KeyVaultClient.get_configuration_class(api_version, aio=True)(credential, **kwargs) config.authentication_policy = AsyncChallengeAuthPolicy(credential) + + # replace the autorest-generated UserAgentPolicy and its hard-coded user agent + # https://github.com/Azure/azure-sdk-for-python/issues/6637 + config.user_agent_policy = UserAgentPolicy(base_user_agent=USER_AGENT, **kwargs) + return config def __init__( @@ -86,6 +86,7 @@ def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwar if transport is None: from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) 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 6b57476d8d3b..a521c09a1585 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 @@ -3,8 +3,10 @@ # Licensed under the MIT License. # ------------------------------------ from typing import TYPE_CHECKING + from azure.core import Configuration from azure.core.pipeline import Pipeline +from azure.core.pipeline.policies import UserAgentPolicy from azure.core.pipeline.transport import RequestsTransport from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from ._generated import KeyVaultClient @@ -16,20 +18,14 @@ from azure.core.pipeline.transport import HttpTransport from .challenge_auth_policy import ChallengeAuthPolicy +from . import USER_AGENT KEY_VAULT_SCOPE = "https://vault.azure.net/.default" class KeyVaultClientBase(object): - """ - :param credential: A credential or credential provider which can be used to authenticate to the vault, - a ValueError will be raised if the entity is not provided - :type credential: azure.core.credentials.TokenCredential - :param str vault_url: The url of the vault to which the client will connect, - a ValueError will be raised if the entity is not provided - :param ~azure.core.configuration.Configuration config: The configuration for the KeyClient - """ + """Base class for Key Vault clients""" @staticmethod def _create_config(credential, api_version=None, **kwargs): @@ -38,6 +34,11 @@ def _create_config(credential, api_version=None, **kwargs): api_version = KeyVaultClient.DEFAULT_API_VERSION config = KeyVaultClient.get_configuration_class(api_version, aio=False)(credential, **kwargs) config.authentication_policy = ChallengeAuthPolicy(credential) + + # replace the autorest-generated UserAgentPolicy and its hard-coded user agent + # https://github.com/Azure/azure-sdk-for-python/issues/6637 + config.user_agent_policy = UserAgentPolicy(base_user_agent=USER_AGENT, **kwargs) + return config def __init__(self, vault_url, credential, transport=None, api_version=None, **kwargs): 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 390bd77a6602..7f345a4143ce 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 @@ -13,7 +13,11 @@ class KeyClient(AsyncKeyVaultClientBase): - """A high-level interface for managing a vault's keys. + """A high-level asynchronous interface for managing a vault's keys. + + :param credential: An object which can provide an access token for the vault, such as a credential from + :mod:`azure.identity.aio` + :param str vault_url: URL of the vault the client will access Example: .. literalinclude:: ../tests/test_samples_keys_async.py diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/client.py index dd5854d00533..57275b9ab954 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/client.py @@ -25,6 +25,10 @@ class KeyClient(KeyVaultClientBase): """A high-level interface for managing a vault's keys. + :param credential: An object which can provide an access token for the vault, such as a credential from + :mod:`azure.identity` + :param str vault_url: URL of the vault the client will access + Example: .. literalinclude:: ../tests/test_samples_keys.py :start-after: [START create_key_client] 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 2dbc6944adcc..7dbee4a3d421 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 @@ -14,7 +14,11 @@ class SecretClient(AsyncKeyVaultClientBase): - """A high-level interface for managing a vault's secrets. + """A high-level asynchronous interface for managing a vault's secrets. + + :param credential: An object which can provide an access token for the vault, such as a credential from + :mod:`azure.identity.aio` + :param str vault_url: URL of the vault the client will access Example: .. literalinclude:: ../tests/test_samples_secrets_async.py diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/client.py index 1246e49769cb..4b6ed8a78356 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/client.py @@ -24,6 +24,10 @@ class SecretClient(KeyVaultClientBase): """A high-level interface for managing a vault's secrets. + :param credential: An object which can provide an access token for the vault, such as a credential from + :mod:`azure.identity` + :param str vault_url: URL of the vault the client will access + Example: .. literalinclude:: ../tests/test_samples_secrets.py :start-after: [START create_secret_client] From b647582722fa6fd051d68ff99feea8985448035e Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Fri, 2 Aug 2019 12:43:44 -0700 Subject: [PATCH 26/32] Update README.md (#6635) --- sdk/core/azure-core/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index e1538798cba6..c0f2ff5ca18b 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -41,6 +41,7 @@ class FooServiceClient: config.redirect_policy = kwargs.get('redirect_policy', RedirectPolicy(**kwargs)) config.logging_policy = kwargs.get('logging_policy', NetworkTraceLoggingPolicy(**kwargs)) config.proxy_policy = kwargs.get('proxy_policy', ProxyPolicy(**kwargs)) + return config def __init__(self, **kwargs): transport = kwargs.get('transport', RequestsTransport(**kwargs)) From f9ab732fe17af00b180a20313acdc3ad6272055b Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Fri, 2 Aug 2019 15:44:29 -0600 Subject: [PATCH 27/32] mypy fixes (#6641) * mypy fixes * use six --- .../pipeline/policies/distributed_tracing.py | 37 ++++++++++--------- .../azure-core/azure/core/tracing/context.py | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py index ee6c1a36109f..6c2c10a881be 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py @@ -25,17 +25,12 @@ # -------------------------------------------------------------------------- """Traces network calls using the implementation library from the settings.""" -from azure.core.pipeline import PipelineRequest, PipelineResponse from azure.core.tracing.context import tracing_context -from azure.core.tracing.abstract_span import AbstractSpan from azure.core.tracing.common import set_span_contexts from azure.core.pipeline.policies import SansIOHTTPPolicy from azure.core.settings import settings -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse +from six.moves import urllib try: from typing import TYPE_CHECKING @@ -43,8 +38,11 @@ TYPE_CHECKING = False if TYPE_CHECKING: - from typing import Any, Optional - from azure.core.pipeline.transport import HttpRequest, HttpResponse + # the HttpRequest and HttpResponse related type ignores stem from this issue: #5796 + from azure.core.pipeline.transport import HttpRequest, HttpResponse # pylint: disable=ungrouped-imports + from azure.core.tracing.abstract_span import AbstractSpan # pylint: disable=ungrouped-imports + from azure.core.pipeline import PipelineRequest, PipelineResponse # pylint: disable=ungrouped-imports + from typing import Any, Optional, Dict, List, Union class DistributedTracingPolicy(SansIOHTTPPolicy): @@ -52,20 +50,20 @@ class DistributedTracingPolicy(SansIOHTTPPolicy): def __init__(self): # type: () -> None - self.parent_span_dict = {} + self.parent_span_dict = {} # type: Dict[AbstractSpan, List[Union[AbstractSpan, Any]]] self._request_id = "x-ms-client-request-id" self._response_id = "x-ms-request-id" def set_header(self, request, span): - # type: (PipelineRequest[HttpRequest], Any) -> None + # type: (PipelineRequest, Any) -> None """ Sets the header information on the span. """ headers = span.to_header() - request.http_request.headers.update(headers) + request.http_request.headers.update(headers) # type: ignore def on_request(self, request): - # type: (PipelineRequest[HttpRequest], Any) -> None + # type: (PipelineRequest) -> None parent_span = tracing_context.current_span.get() wrapper_class = settings.tracing_implementation() original_context = [parent_span, None] @@ -77,7 +75,7 @@ def on_request(self, request): if parent_span is None: return - path = urlparse(request.http_request.url).path + path = urllib.parse.urlparse(request.http_request.url).path # type: ignore if not path: path = "/" child = parent_span.span(name=path) @@ -99,12 +97,15 @@ def end_span(self, request, response=None): if response and self._response_id in response.headers: span.add_attribute(self._response_id, response.headers[self._response_id]) span.finish() - set_span_contexts(*self.parent_span_dict.pop(span, None)) + original_context = self.parent_span_dict.pop(span, None) + if original_context: + set_span_contexts(original_context[0], original_context[1]) def on_response(self, request, response): - # type: (PipelineRequest[HttpRequest], PipelineResponse[HttpRequest, HttpResponse], Any) -> None - self.end_span(request.http_request, response=response.http_response) + # type: (PipelineRequest, PipelineResponse) -> None + self.end_span(request.http_request, response=response.http_response) # type: ignore def on_exception(self, _request): # pylint: disable=unused-argument - # type: (PipelineRequest[HttpRequest], Any) -> bool - self.end_span(_request.http_request) + # type: (PipelineRequest) -> bool + self.end_span(_request.http_request) # type: ignore + return False diff --git a/sdk/core/azure-core/azure/core/tracing/context.py b/sdk/core/azure-core/azure/core/tracing/context.py index ecf822bf6fd7..f3cc91f0d978 100644 --- a/sdk/core/azure-core/azure/core/tracing/context.py +++ b/sdk/core/azure-core/azure/core/tracing/context.py @@ -123,7 +123,7 @@ def __init__(self): self.current_span = _ThreadLocalContext("current_span", None) def with_current_context(self, func): - # type: (Callable[[Any], Any]) -> Any + # type: (Callable) -> Any """ Passes the current spans to the new context the function will be run in. :param func: The function that will be run in the new context From 46c7ad666ef2c42683b5c761d297b4f53a61a075 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Fri, 2 Aug 2019 17:14:54 -0700 Subject: [PATCH 28/32] Policies as kwargs for KeyVault (#6616) --- .../azure/keyvault/keys/_shared/__init__.py | 6 ---- .../keys/_shared/async_client_base.py | 20 ++++++++++- .../keyvault/keys/_shared/client_base.py | 19 +++++++++- .../azure/keyvault/keys/_user_agent.py | 10 ++++++ .../secrets/_shared/async_client_base.py | 34 +++++++++++++----- .../keyvault/secrets/_shared/client_base.py | 35 ++++++++++++++----- .../azure/keyvault/secrets/_user_agent.py | 10 ++++++ 7 files changed, 109 insertions(+), 25 deletions(-) create mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_user_agent.py create mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_user_agent.py diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py index f4b6c6c3563a..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py @@ -3,8 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from collections import namedtuple -import platform -from .._version import VERSION try: import urllib.parse as parse @@ -12,10 +10,6 @@ # pylint:disable=import-error import urlparse as parse # type: ignore -USER_AGENT = "azsdk-python-keyvault-keys/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform() -) - from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase from .client_base import KeyVaultClientBase from .http_challenge import HttpChallenge 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 8018b3110248..974e96d32b3c 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 @@ -12,7 +12,8 @@ from msrest.serialization import Model from ._generated import KeyVaultClient -from . import AsyncChallengeAuthPolicy, USER_AGENT +from . import AsyncChallengeAuthPolicy +from .._user_agent import USER_AGENT if TYPE_CHECKING: @@ -39,6 +40,23 @@ def _create_config( # https://github.com/Azure/azure-sdk-for-python/issues/6637 config.user_agent_policy = UserAgentPolicy(base_user_agent=USER_AGENT, **kwargs) + # Override config policies if found in kwargs + # TODO: should be unnecessary after next regeneration (written 2019-08-02) + if "user_agent_policy" in kwargs: + config.user_agent_policy = kwargs["user_agent_policy"] + if "headers_policy" in kwargs: + config.headers_policy = kwargs["headers_policy"] + if "proxy_policy" in kwargs: + config.proxy_policy = kwargs["proxy_policy"] + if "logging_policy" in kwargs: + config.logging_policy = kwargs["logging_policy"] + if "retry_policy" in kwargs: + config.retry_policy = kwargs["retry_policy"] + if "custom_hook_policy" in kwargs: + config.custom_hook_policy = kwargs["custom_hook_policy"] + if "redirect_policy" in kwargs: + config.redirect_policy = kwargs["redirect_policy"] + return config def __init__( 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 a521c09a1585..0cbb2c68f1b8 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 @@ -18,7 +18,7 @@ from azure.core.pipeline.transport import HttpTransport from .challenge_auth_policy import ChallengeAuthPolicy -from . import USER_AGENT +from .._user_agent import USER_AGENT KEY_VAULT_SCOPE = "https://vault.azure.net/.default" @@ -39,6 +39,23 @@ def _create_config(credential, api_version=None, **kwargs): # https://github.com/Azure/azure-sdk-for-python/issues/6637 config.user_agent_policy = UserAgentPolicy(base_user_agent=USER_AGENT, **kwargs) + # Override config policies if found in kwargs + # TODO: should be unnecessary after next regeneration (written 2019-08-02) + if "user_agent_policy" in kwargs: + config.user_agent_policy = kwargs["user_agent_policy"] + if "headers_policy" in kwargs: + config.headers_policy = kwargs["headers_policy"] + if "proxy_policy" in kwargs: + config.proxy_policy = kwargs["proxy_policy"] + if "logging_policy" in kwargs: + config.logging_policy = kwargs["logging_policy"] + if "retry_policy" in kwargs: + config.retry_policy = kwargs["retry_policy"] + if "custom_hook_policy" in kwargs: + config.custom_hook_policy = kwargs["custom_hook_policy"] + if "redirect_policy" in kwargs: + config.redirect_policy = kwargs["redirect_policy"] + return config def __init__(self, vault_url, credential, transport=None, api_version=None, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_user_agent.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_user_agent.py new file mode 100644 index 000000000000..ad189cea275f --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_user_agent.py @@ -0,0 +1,10 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import platform +from ._version import VERSION + +USER_AGENT = "azsdk-python-keyvault-keys/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() +) 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 193e6e324c7e..84b2d367a30b 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 @@ -3,14 +3,17 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING + from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies import UserAgentPolicy from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient from . import AsyncChallengeAuthPolicy +from .._user_agent import USER_AGENT if TYPE_CHECKING: @@ -22,14 +25,7 @@ class AsyncKeyVaultClientBase: - """ - :param credential: A credential or credential provider which can be used to authenticate to the vault, - a ValueError will be raised if the entity is not provided - :type credential: azure.authentication.Credential or azure.authentication.CredentialProvider - :param str vault_url: The url of the vault to which the client will connect, - a ValueError will be raised if the entity is not provided - :param ~azure.core.configuration.Configuration config: The configuration for the SecretClient - """ + """Base class for async Key Vault clients""" @staticmethod def _create_config( @@ -39,6 +35,27 @@ def _create_config( api_version = KeyVaultClient.DEFAULT_API_VERSION config = KeyVaultClient.get_configuration_class(api_version, aio=True)(credential, **kwargs) config.authentication_policy = AsyncChallengeAuthPolicy(credential) + + # replace the autorest-generated UserAgentPolicy and its hard-coded user agent + # https://github.com/Azure/azure-sdk-for-python/issues/6637 + config.user_agent_policy = UserAgentPolicy(base_user_agent=USER_AGENT, **kwargs) + + # Override config policies if found in kwargs + if "user_agent_policy" in kwargs: + config.user_agent_policy = kwargs["user_agent_policy"] + if "headers_policy" in kwargs: + config.headers_policy = kwargs["headers_policy"] + if "proxy_policy" in kwargs: + config.proxy_policy = kwargs["proxy_policy"] + if "logging_policy" in kwargs: + config.logging_policy = kwargs["logging_policy"] + if "retry_policy" in kwargs: + config.retry_policy = kwargs["retry_policy"] + if "custom_hook_policy" in kwargs: + config.custom_hook_policy = kwargs["custom_hook_policy"] + if "redirect_policy" in kwargs: + config.redirect_policy = kwargs["redirect_policy"] + return config def __init__( @@ -86,6 +103,7 @@ def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwar if transport is None: from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) 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 dbde6d74f640..8b358c513233 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 @@ -3,9 +3,12 @@ # Licensed under the MIT License. # ------------------------------------ from typing import TYPE_CHECKING + from azure.core import Configuration from azure.core.pipeline import Pipeline +from azure.core.pipeline.policies import UserAgentPolicy from azure.core.pipeline.transport import RequestsTransport +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from ._generated import KeyVaultClient if TYPE_CHECKING: @@ -15,21 +18,14 @@ from azure.core.pipeline.transport import HttpTransport from .challenge_auth_policy import ChallengeAuthPolicy -from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy +from .._user_agent import USER_AGENT KEY_VAULT_SCOPE = "https://vault.azure.net/.default" class KeyVaultClientBase(object): - """ - :param credential: A credential or credential provider which can be used to authenticate to the vault, - a ValueError will be raised if the entity is not provided - :type credential: azure.core.credentials.TokenCredential - :param str vault_url: The url of the vault to which the client will connect, - a ValueError will be raised if the entity is not provided - :param ~azure.core.configuration.Configuration config: The configuration for the KeyClient - """ + """Base class for Key Vault clients""" @staticmethod def _create_config(credential, api_version=None, **kwargs): @@ -38,6 +34,27 @@ def _create_config(credential, api_version=None, **kwargs): api_version = KeyVaultClient.DEFAULT_API_VERSION config = KeyVaultClient.get_configuration_class(api_version, aio=False)(credential, **kwargs) config.authentication_policy = ChallengeAuthPolicy(credential) + + # replace the autorest-generated UserAgentPolicy and its hard-coded user agent + # https://github.com/Azure/azure-sdk-for-python/issues/6637 + config.user_agent_policy = UserAgentPolicy(base_user_agent=USER_AGENT, **kwargs) + + # Override config policies if found in kwargs + if "user_agent_policy" in kwargs: + config.user_agent_policy = kwargs["user_agent_policy"] + if "headers_policy" in kwargs: + config.headers_policy = kwargs["headers_policy"] + if "proxy_policy" in kwargs: + config.proxy_policy = kwargs["proxy_policy"] + if "logging_policy" in kwargs: + config.logging_policy = kwargs["logging_policy"] + if "retry_policy" in kwargs: + config.retry_policy = kwargs["retry_policy"] + if "custom_hook_policy" in kwargs: + config.custom_hook_policy = kwargs["custom_hook_policy"] + if "redirect_policy" in kwargs: + config.redirect_policy = kwargs["redirect_policy"] + return config def __init__(self, vault_url, credential, transport=None, api_version=None, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_user_agent.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_user_agent.py new file mode 100644 index 000000000000..507849d98ba9 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_user_agent.py @@ -0,0 +1,10 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import platform +from ._version import VERSION + +USER_AGENT = "azsdk-python-keyvault-secrets/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() +) From 5b5ed2609691e0b84f51440213f73b1f2cb4d2fc Mon Sep 17 00:00:00 2001 From: Xiang Yan Date: Fri, 2 Aug 2019 22:30:45 -0700 Subject: [PATCH 29/32] Mypy fixes (#6646) --- sdk/core/azure-core/azure/core/polling/poller.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator.py | 6 +++--- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/core/azure-core/azure/core/polling/poller.py b/sdk/core/azure-core/azure/core/polling/poller.py index fe6f1de79f3a..65844358f12d 100644 --- a/sdk/core/azure-core/azure/core/polling/poller.py +++ b/sdk/core/azure-core/azure/core/polling/poller.py @@ -183,7 +183,7 @@ def result(self, timeout=None): if one is available. :raises CloudError: Server problem with the query. """ - self.wait(timeout) + self.wait(timeout) # type: ignore return self._polling_method.resource() @distributed_trace diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7b6ebb26cf45..bd60bf86b875 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -58,18 +58,18 @@ def wrapper_use_tracer(*args, **kwargs): ans = None if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) - name = name_of_span or common.get_function_and_class_name(func, *args) + name = name_of_span or common.get_function_and_class_name(func, *args) # type: ignore child = parent_span.span(name=name) child.start() common.set_span_contexts(child) - ans = func(*args, **kwargs) + ans = func(*args, **kwargs) # type: ignore child.finish() common.set_span_contexts(parent_span) if orig_wrapped_span is None and passed_in_parent is None and original_span_instance is None: parent_span.finish() common.set_span_contexts(orig_wrapped_span, span_instance=original_span_instance) else: - ans = func(*args, **kwargs) + ans = func(*args, **kwargs) # type: ignore return ans return wrapper_use_tracer diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 0719a9c016c3..875fbe34f06d 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -58,18 +58,18 @@ async def wrapper_use_tracer(*args, **kwargs): ans = None if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) - name = name_of_span or common.get_function_and_class_name(func, *args) + name = name_of_span or common.get_function_and_class_name(func, *args) # type: ignore child = parent_span.span(name=name) child.start() common.set_span_contexts(child) - ans = await func(*args, **kwargs) + ans = await func(*args, **kwargs) # type: ignore child.finish() common.set_span_contexts(parent_span) if orig_wrapped_span is None and passed_in_parent is None and original_span_instance is None: parent_span.finish() common.set_span_contexts(orig_wrapped_span, span_instance=original_span_instance) else: - ans = await func(*args, **kwargs) + ans = await func(*args, **kwargs) # type: ignore return ans return wrapper_use_tracer From 8d17ca3732ec214dd2fd1fa7a15d7fccc5bb8750 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sun, 4 Aug 2019 18:40:18 -0700 Subject: [PATCH 30/32] [AutoPR healthcareapis/resource-manager] Fixed healthcareapi readme.md (#6652) * Generated from 06bfc11dfa82fb5c140c82c3496fd59adc6f3b8b just triggereing rebuild * Packaging update of azure-mgmt-healthcareapis * fixed release date --- .../azure-mgmt-healthcareapis/HISTORY.rst | 9 + .../azure-mgmt-healthcareapis/MANIFEST.in | 5 + .../azure-mgmt-healthcareapis/README.rst | 33 + .../azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/healthcareapis/__init__.py | 19 + .../mgmt/healthcareapis/_configuration.py | 48 ++ .../_healthcare_apis_management_client.py | 59 ++ .../mgmt/healthcareapis/models/__init__.py | 75 +++ ...healthcare_apis_management_client_enums.py | 47 ++ .../mgmt/healthcareapis/models/_models.py | 543 ++++++++++++++++ .../mgmt/healthcareapis/models/_models_py3.py | 543 ++++++++++++++++ .../healthcareapis/models/_paged_models.py | 40 ++ .../healthcareapis/operations/__init__.py | 20 + .../_operation_results_operations.py | 100 +++ .../healthcareapis/operations/_operations.py | 100 +++ .../operations/_services_operations.py | 585 ++++++++++++++++++ .../azure/mgmt/healthcareapis/version.py | 13 + .../sdk_packaging.toml | 8 + .../azure-mgmt-healthcareapis/setup.cfg | 2 + .../azure-mgmt-healthcareapis/setup.py | 87 +++ 21 files changed, 2338 insertions(+) create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/HISTORY.rst create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/MANIFEST.in create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/README.rst create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/__init__.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/__init__.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/__init__.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/version.py create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/sdk_packaging.toml create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/setup.cfg create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/HISTORY.rst b/sdk/healthcareapis/azure-mgmt-healthcareapis/HISTORY.rst new file mode 100644 index 000000000000..25dd1b56ea24 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (2019-08-03) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/MANIFEST.in b/sdk/healthcareapis/azure-mgmt-healthcareapis/MANIFEST.in new file mode 100644 index 000000000000..e4884efef41b --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/MANIFEST.in @@ -0,0 +1,5 @@ +recursive-include tests *.py *.yaml +include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/README.rst b/sdk/healthcareapis/azure-mgmt-healthcareapis/README.rst new file mode 100644 index 000000000000..c4945c69391f --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/README.rst @@ -0,0 +1,33 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure MyService Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Usage +===== + +For code examples, see `MyService Management +`__ +on docs.microsoft.com. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-healthcareapis%2FREADME.png diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/__init__.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/__init__.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/__init__.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/__init__.py new file mode 100644 index 000000000000..74676ff31aac --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/__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 ._configuration import HealthcareApisManagementClientConfiguration +from ._healthcare_apis_management_client import HealthcareApisManagementClient +__all__ = ['HealthcareApisManagementClient', 'HealthcareApisManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py new file mode 100644 index 000000000000..351baa8a13f5 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class HealthcareApisManagementClientConfiguration(AzureConfiguration): + """Configuration for HealthcareApisManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(HealthcareApisManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-healthcareapis/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py new file mode 100644 index 000000000000..61807f835bc4 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 Serializer, Deserializer + +from ._configuration import HealthcareApisManagementClientConfiguration +from .operations import ServicesOperations +from .operations import Operations +from .operations import OperationResultsOperations +from . import models + + +class HealthcareApisManagementClient(SDKClient): + """Azure Healthcare APIs Client + + :ivar config: Configuration for client. + :vartype config: HealthcareApisManagementClientConfiguration + + :ivar services: Services operations + :vartype services: azure.mgmt.healthcareapis.operations.ServicesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.healthcareapis.operations.Operations + :ivar operation_results: OperationResults operations + :vartype operation_results: azure.mgmt.healthcareapis.operations.OperationResultsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = HealthcareApisManagementClientConfiguration(credentials, subscription_id, base_url) + super(HealthcareApisManagementClient, 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-08-20-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.services = ServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.operation_results = OperationResultsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py new file mode 100644 index 000000000000..cb27d5affb6e --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 CheckNameAvailabilityParameters + from ._models_py3 import ErrorDetails, ErrorDetailsException + from ._models_py3 import ErrorDetailsInternal + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationResultsDescription + from ._models_py3 import Resource + from ._models_py3 import ServiceAccessPolicyEntry + from ._models_py3 import ServiceAuthenticationConfigurationInfo + from ._models_py3 import ServiceCorsConfigurationInfo + from ._models_py3 import ServiceCosmosDbConfigurationInfo + from ._models_py3 import ServicesDescription + from ._models_py3 import ServicesNameAvailabilityInfo + from ._models_py3 import ServicesPatchDescription + from ._models_py3 import ServicesProperties +except (SyntaxError, ImportError): + from ._models import CheckNameAvailabilityParameters + from ._models import ErrorDetails, ErrorDetailsException + from ._models import ErrorDetailsInternal + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationResultsDescription + from ._models import Resource + from ._models import ServiceAccessPolicyEntry + from ._models import ServiceAuthenticationConfigurationInfo + from ._models import ServiceCorsConfigurationInfo + from ._models import ServiceCosmosDbConfigurationInfo + from ._models import ServicesDescription + from ._models import ServicesNameAvailabilityInfo + from ._models import ServicesPatchDescription + from ._models import ServicesProperties +from ._paged_models import OperationPaged +from ._paged_models import ServicesDescriptionPaged +from ._healthcare_apis_management_client_enums import ( + ProvisioningState, + Kind, + ServiceNameUnavailabilityReason, + OperationResultStatus, +) + +__all__ = [ + 'CheckNameAvailabilityParameters', + 'ErrorDetails', 'ErrorDetailsException', + 'ErrorDetailsInternal', + 'Operation', + 'OperationDisplay', + 'OperationResultsDescription', + 'Resource', + 'ServiceAccessPolicyEntry', + 'ServiceAuthenticationConfigurationInfo', + 'ServiceCorsConfigurationInfo', + 'ServiceCosmosDbConfigurationInfo', + 'ServicesDescription', + 'ServicesNameAvailabilityInfo', + 'ServicesPatchDescription', + 'ServicesProperties', + 'ServicesDescriptionPaged', + 'OperationPaged', + 'ProvisioningState', + 'Kind', + 'ServiceNameUnavailabilityReason', + 'OperationResultStatus', +] diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py new file mode 100644 index 000000000000..a910aebf78d1 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.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 enum import Enum + + +class ProvisioningState(str, Enum): + + deleting = "Deleting" + succeeded = "Succeeded" + creating = "Creating" + accepted = "Accepted" + verifying = "Verifying" + updating = "Updating" + failed = "Failed" + canceled = "Canceled" + deprovisioned = "Deprovisioned" + + +class Kind(str, Enum): + + fhir = "fhir" + fhir_stu3 = "fhir-Stu3" + fhir_r4 = "fhir-R4" + + +class ServiceNameUnavailabilityReason(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class OperationResultStatus(str, Enum): + + canceled = "Canceled" + succeeded = "Succeeded" + failed = "Failed" + requested = "Requested" + running = "Running" diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py new file mode 100644 index 000000000000..5993183ed587 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py @@ -0,0 +1,543 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 +from msrest.exceptions import HttpOperationError + + +class CheckNameAvailabilityParameters(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the service instance to check. + :type name: str + :param type: Required. The fully qualified resource type which includes + provider namespace. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorDetails(Model): + """Error details. + + :param error: Object containing error details. + :type error: ~azure.mgmt.healthcareapis.models.ErrorDetailsInternal + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetailsInternal'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class ErrorDetailsInternal(Model): + """Error details. + + 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 target: The target of the particular error. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetailsInternal, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class Operation(Model): + """Service REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :ivar origin: Default value is 'user,system'. + :vartype origin: str + :param display: The information displayed about the operation. + :type display: ~azure.mgmt.healthcareapis.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.HealthcareApis + :vartype provider: str + :ivar resource: Resource Type: Services + :vartype resource: str + :ivar operation: Name of the operation + :vartype operation: str + :ivar description: Friendly description for the operation, + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _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(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationResultsDescription(Model): + """The properties indicating the operation result of an operation on a + service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the operation returned. + :vartype id: str + :ivar name: The name of the operation result. + :vartype name: str + :ivar status: The status of the operation being performed. Possible values + include: 'Canceled', 'Succeeded', 'Failed', 'Requested', 'Running' + :vartype status: str or + ~azure.mgmt.healthcareapis.models.OperationResultStatus + :ivar start_time: The time that the operation was started. + :vartype start_time: str + :param properties: Additional properties of the operation result. + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'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'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OperationResultsDescription, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + self.properties = kwargs.get('properties', None) + + +class Resource(Model): + """The common properties of a service. + + 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 id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Valid values are: fhir, + fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', + 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.etag = kwargs.get('etag', None) + + +class ServiceAccessPolicyEntry(Model): + """An access policy entry. + + All required parameters must be populated in order to send to Azure. + + :param object_id: Required. An object ID that is allowed access to the + FHIR service. + :type object_id: str + """ + + _validation = { + 'object_id': {'required': True, 'pattern': r'^(([0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}){1})+$'}, + } + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceAccessPolicyEntry, self).__init__(**kwargs) + self.object_id = kwargs.get('object_id', None) + + +class ServiceAuthenticationConfigurationInfo(Model): + """Authentication configuration information. + + :param authority: The authority url for the service + :type authority: str + :param audience: The audience url for the service + :type audience: str + :param smart_proxy_enabled: If the SMART on FHIR proxy is enabled + :type smart_proxy_enabled: bool + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'smart_proxy_enabled': {'key': 'smartProxyEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceAuthenticationConfigurationInfo, self).__init__(**kwargs) + self.authority = kwargs.get('authority', None) + self.audience = kwargs.get('audience', None) + self.smart_proxy_enabled = kwargs.get('smart_proxy_enabled', None) + + +class ServiceCorsConfigurationInfo(Model): + """The settings for the CORS configuration of the service instance. + + :param origins: The origins to be allowed via CORS. + :type origins: list[str] + :param headers: The headers to be allowed via CORS. + :type headers: list[str] + :param methods: The methods to be allowed via CORS. + :type methods: list[str] + :param max_age: The max age to be allowed via CORS. + :type max_age: int + :param allow_credentials: If credentials are allowed via CORS. + :type allow_credentials: bool + """ + + _validation = { + 'max_age': {'maximum': 99999, 'minimum': 0}, + } + + _attribute_map = { + 'origins': {'key': 'origins', 'type': '[str]'}, + 'headers': {'key': 'headers', 'type': '[str]'}, + 'methods': {'key': 'methods', 'type': '[str]'}, + 'max_age': {'key': 'maxAge', 'type': 'int'}, + 'allow_credentials': {'key': 'allowCredentials', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceCorsConfigurationInfo, self).__init__(**kwargs) + self.origins = kwargs.get('origins', None) + self.headers = kwargs.get('headers', None) + self.methods = kwargs.get('methods', None) + self.max_age = kwargs.get('max_age', None) + self.allow_credentials = kwargs.get('allow_credentials', None) + + +class ServiceCosmosDbConfigurationInfo(Model): + """The settings for the Cosmos DB database backing the service. + + :param offer_throughput: The provisioned throughput for the backing + database. + :type offer_throughput: int + """ + + _validation = { + 'offer_throughput': {'maximum': 10000, 'minimum': 400}, + } + + _attribute_map = { + 'offer_throughput': {'key': 'offerThroughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServiceCosmosDbConfigurationInfo, self).__init__(**kwargs) + self.offer_throughput = kwargs.get('offer_throughput', None) + + +class ServicesDescription(Resource): + """The description of the service. + + 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 id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Valid values are: fhir, + fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', + 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + :param properties: The common properties of a service. + :type properties: ~azure.mgmt.healthcareapis.models.ServicesProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ServicesProperties'}, + } + + def __init__(self, **kwargs): + super(ServicesDescription, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ServicesNameAvailabilityInfo(Model): + """The properties indicating whether a given service name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The value which indicates whether the provided name + is available. + :vartype name_available: bool + :ivar reason: The reason for unavailability. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.healthcareapis.models.ServiceNameUnavailabilityReason + :param message: The detailed reason message. + :type message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'ServiceNameUnavailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicesNameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = kwargs.get('message', None) + + +class ServicesPatchDescription(Model): + """The description of the service. + + :param tags: Instance tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ServicesPatchDescription, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ServicesProperties(Model): + """The properties of a service instance. + + 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: The provisioning state. Possible values include: + 'Deleting', 'Succeeded', 'Creating', 'Accepted', 'Verifying', 'Updating', + 'Failed', 'Canceled', 'Deprovisioned' + :vartype provisioning_state: str or + ~azure.mgmt.healthcareapis.models.ProvisioningState + :param access_policies: Required. The access policies of the service + instance. + :type access_policies: + list[~azure.mgmt.healthcareapis.models.ServiceAccessPolicyEntry] + :param cosmos_db_configuration: The settings for the Cosmos DB database + backing the service. + :type cosmos_db_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCosmosDbConfigurationInfo + :param authentication_configuration: The authentication configuration for + the service instance. + :type authentication_configuration: + ~azure.mgmt.healthcareapis.models.ServiceAuthenticationConfigurationInfo + :param cors_configuration: The settings for the CORS configuration of the + service instance. + :type cors_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCorsConfigurationInfo + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'access_policies': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[ServiceAccessPolicyEntry]'}, + 'cosmos_db_configuration': {'key': 'cosmosDbConfiguration', 'type': 'ServiceCosmosDbConfigurationInfo'}, + 'authentication_configuration': {'key': 'authenticationConfiguration', 'type': 'ServiceAuthenticationConfigurationInfo'}, + 'cors_configuration': {'key': 'corsConfiguration', 'type': 'ServiceCorsConfigurationInfo'}, + } + + def __init__(self, **kwargs): + super(ServicesProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.access_policies = kwargs.get('access_policies', None) + self.cosmos_db_configuration = kwargs.get('cosmos_db_configuration', None) + self.authentication_configuration = kwargs.get('authentication_configuration', None) + self.cors_configuration = kwargs.get('cors_configuration', None) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py new file mode 100644 index 000000000000..8070f9eec9dc --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py @@ -0,0 +1,543 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 +from msrest.exceptions import HttpOperationError + + +class CheckNameAvailabilityParameters(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the service instance to check. + :type name: str + :param type: Required. The fully qualified resource type which includes + provider namespace. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str, type: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name + self.type = type + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorDetails(Model): + """Error details. + + :param error: Object containing error details. + :type error: ~azure.mgmt.healthcareapis.models.ErrorDetailsInternal + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetailsInternal'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.error = error + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class ErrorDetailsInternal(Model): + """Error details. + + 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 target: The target of the particular error. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetailsInternal, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class Operation(Model): + """Service REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :ivar origin: Default value is 'user,system'. + :vartype origin: str + :param display: The information displayed about the operation. + :type display: ~azure.mgmt.healthcareapis.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.HealthcareApis + :vartype provider: str + :ivar resource: Resource Type: Services + :vartype resource: str + :ivar operation: Name of the operation + :vartype operation: str + :ivar description: Friendly description for the operation, + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _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) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationResultsDescription(Model): + """The properties indicating the operation result of an operation on a + service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the operation returned. + :vartype id: str + :ivar name: The name of the operation result. + :vartype name: str + :ivar status: The status of the operation being performed. Possible values + include: 'Canceled', 'Succeeded', 'Failed', 'Requested', 'Running' + :vartype status: str or + ~azure.mgmt.healthcareapis.models.OperationResultStatus + :ivar start_time: The time that the operation was started. + :vartype start_time: str + :param properties: Additional properties of the operation result. + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'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'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(OperationResultsDescription, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + self.properties = properties + + +class Resource(Model): + """The common properties of a service. + + 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 id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Valid values are: fhir, + fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', + 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, kind, location: str, tags=None, etag: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kind + self.location = location + self.tags = tags + self.etag = etag + + +class ServiceAccessPolicyEntry(Model): + """An access policy entry. + + All required parameters must be populated in order to send to Azure. + + :param object_id: Required. An object ID that is allowed access to the + FHIR service. + :type object_id: str + """ + + _validation = { + 'object_id': {'required': True, 'pattern': r'^(([0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}){1})+$'}, + } + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__(self, *, object_id: str, **kwargs) -> None: + super(ServiceAccessPolicyEntry, self).__init__(**kwargs) + self.object_id = object_id + + +class ServiceAuthenticationConfigurationInfo(Model): + """Authentication configuration information. + + :param authority: The authority url for the service + :type authority: str + :param audience: The audience url for the service + :type audience: str + :param smart_proxy_enabled: If the SMART on FHIR proxy is enabled + :type smart_proxy_enabled: bool + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'smart_proxy_enabled': {'key': 'smartProxyEnabled', 'type': 'bool'}, + } + + def __init__(self, *, authority: str=None, audience: str=None, smart_proxy_enabled: bool=None, **kwargs) -> None: + super(ServiceAuthenticationConfigurationInfo, self).__init__(**kwargs) + self.authority = authority + self.audience = audience + self.smart_proxy_enabled = smart_proxy_enabled + + +class ServiceCorsConfigurationInfo(Model): + """The settings for the CORS configuration of the service instance. + + :param origins: The origins to be allowed via CORS. + :type origins: list[str] + :param headers: The headers to be allowed via CORS. + :type headers: list[str] + :param methods: The methods to be allowed via CORS. + :type methods: list[str] + :param max_age: The max age to be allowed via CORS. + :type max_age: int + :param allow_credentials: If credentials are allowed via CORS. + :type allow_credentials: bool + """ + + _validation = { + 'max_age': {'maximum': 99999, 'minimum': 0}, + } + + _attribute_map = { + 'origins': {'key': 'origins', 'type': '[str]'}, + 'headers': {'key': 'headers', 'type': '[str]'}, + 'methods': {'key': 'methods', 'type': '[str]'}, + 'max_age': {'key': 'maxAge', 'type': 'int'}, + 'allow_credentials': {'key': 'allowCredentials', 'type': 'bool'}, + } + + def __init__(self, *, origins=None, headers=None, methods=None, max_age: int=None, allow_credentials: bool=None, **kwargs) -> None: + super(ServiceCorsConfigurationInfo, self).__init__(**kwargs) + self.origins = origins + self.headers = headers + self.methods = methods + self.max_age = max_age + self.allow_credentials = allow_credentials + + +class ServiceCosmosDbConfigurationInfo(Model): + """The settings for the Cosmos DB database backing the service. + + :param offer_throughput: The provisioned throughput for the backing + database. + :type offer_throughput: int + """ + + _validation = { + 'offer_throughput': {'maximum': 10000, 'minimum': 400}, + } + + _attribute_map = { + 'offer_throughput': {'key': 'offerThroughput', 'type': 'int'}, + } + + def __init__(self, *, offer_throughput: int=None, **kwargs) -> None: + super(ServiceCosmosDbConfigurationInfo, self).__init__(**kwargs) + self.offer_throughput = offer_throughput + + +class ServicesDescription(Resource): + """The description of the service. + + 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 id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Valid values are: fhir, + fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', + 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + :param properties: The common properties of a service. + :type properties: ~azure.mgmt.healthcareapis.models.ServicesProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ServicesProperties'}, + } + + def __init__(self, *, kind, location: str, tags=None, etag: str=None, properties=None, **kwargs) -> None: + super(ServicesDescription, self).__init__(kind=kind, location=location, tags=tags, etag=etag, **kwargs) + self.properties = properties + + +class ServicesNameAvailabilityInfo(Model): + """The properties indicating whether a given service name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The value which indicates whether the provided name + is available. + :vartype name_available: bool + :ivar reason: The reason for unavailability. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.healthcareapis.models.ServiceNameUnavailabilityReason + :param message: The detailed reason message. + :type message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'ServiceNameUnavailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, **kwargs) -> None: + super(ServicesNameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = message + + +class ServicesPatchDescription(Model): + """The description of the service. + + :param tags: Instance tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ServicesPatchDescription, self).__init__(**kwargs) + self.tags = tags + + +class ServicesProperties(Model): + """The properties of a service instance. + + 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: The provisioning state. Possible values include: + 'Deleting', 'Succeeded', 'Creating', 'Accepted', 'Verifying', 'Updating', + 'Failed', 'Canceled', 'Deprovisioned' + :vartype provisioning_state: str or + ~azure.mgmt.healthcareapis.models.ProvisioningState + :param access_policies: Required. The access policies of the service + instance. + :type access_policies: + list[~azure.mgmt.healthcareapis.models.ServiceAccessPolicyEntry] + :param cosmos_db_configuration: The settings for the Cosmos DB database + backing the service. + :type cosmos_db_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCosmosDbConfigurationInfo + :param authentication_configuration: The authentication configuration for + the service instance. + :type authentication_configuration: + ~azure.mgmt.healthcareapis.models.ServiceAuthenticationConfigurationInfo + :param cors_configuration: The settings for the CORS configuration of the + service instance. + :type cors_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCorsConfigurationInfo + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'access_policies': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[ServiceAccessPolicyEntry]'}, + 'cosmos_db_configuration': {'key': 'cosmosDbConfiguration', 'type': 'ServiceCosmosDbConfigurationInfo'}, + 'authentication_configuration': {'key': 'authenticationConfiguration', 'type': 'ServiceAuthenticationConfigurationInfo'}, + 'cors_configuration': {'key': 'corsConfiguration', 'type': 'ServiceCorsConfigurationInfo'}, + } + + def __init__(self, *, access_policies, cosmos_db_configuration=None, authentication_configuration=None, cors_configuration=None, **kwargs) -> None: + super(ServicesProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.access_policies = access_policies + self.cosmos_db_configuration = cosmos_db_configuration + self.authentication_configuration = authentication_configuration + self.cors_configuration = cors_configuration diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py new file mode 100644 index 000000000000..646be2a168cc --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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.paging import Paged + + +class ServicesDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServicesDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServicesDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(ServicesDescriptionPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py new file mode 100644 index 000000000000..6bca9ee351e6 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._services_operations import ServicesOperations +from ._operations import Operations +from ._operation_results_operations import OperationResultsOperations + +__all__ = [ + 'ServicesOperations', + 'Operations', + 'OperationResultsOperations', +] diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py new file mode 100644 index 000000000000..7050fa3cc564 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class OperationResultsOperations(object): + """OperationResultsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2018-08-20-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-20-preview" + + self.config = config + + def get( + self, location_name, operation_result_id, custom_headers=None, raw=False, **operation_config): + """Get the operation result for a long running operation. + + :param location_name: The location of the operation. + :type location_name: str + :param operation_result_id: The ID of the operation result to get. + :type operation_result_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationResultId': self._serialize.url("operation_result_id", operation_result_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResultsDescription', response) + if response.status_code == 404: + deserialized = self._deserialize('ErrorDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/locations/{locationName}/operationresults/{operationResultId}'} diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py new file mode 100644 index 000000000000..e60e1aff1e7d --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2018-08-20-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-20-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Healthcare service REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.healthcareapis.models.OperationPaged[~azure.mgmt.healthcareapis.models.Operation] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.HealthcareApis/operations'} diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py new file mode 100644 index 000000000000..76ee198c35a8 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py @@ -0,0 +1,585 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ServicesOperations(object): + """ServicesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2018-08-20-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-20-preview" + + self.config = config + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the metadata of a service instance. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServicesDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.healthcareapis.models.ServicesDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}'} + + + def _create_or_update_initial( + self, resource_group_name, resource_name, service_description, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_description, 'ServicesDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServicesDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, resource_name, service_description, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update the metadata of a service instance. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param service_description: The service instance metadata. + :type service_description: + ~azure.mgmt.healthcareapis.models.ServicesDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ServicesDescription or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.healthcareapis.models.ServicesDescription] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.healthcareapis.models.ServicesDescription]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + service_description=service_description, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}'} + + + def _update_initial( + self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): + service_patch_description = models.ServicesPatchDescription(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_patch_description, 'ServicesPatchDescription') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the metadata of a service instance. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param tags: Instance tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ServicesDescription or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.healthcareapis.models.ServicesDescription] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.healthcareapis.models.ServicesDescription]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}'} + + + def _delete_initial( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.ErrorDetailsException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a service instance. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all the service instances in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServicesDescription + :rtype: + ~azure.mgmt.healthcareapis.models.ServicesDescriptionPaged[~azure.mgmt.healthcareapis.models.ServicesDescription] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServicesDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/services'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all the service instances in a resource group. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServicesDescription + :rtype: + ~azure.mgmt.healthcareapis.models.ServicesDescriptionPaged[~azure.mgmt.healthcareapis.models.ServicesDescription] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServicesDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services'} + + def check_name_availability( + self, name, type, custom_headers=None, raw=False, **operation_config): + """Check if a service instance name is available. + + :param name: The name of the service instance to check. + :type name: str + :param type: The fully qualified resource type which includes provider + namespace. + :type type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServicesNameAvailabilityInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.healthcareapis.models.ServicesNameAvailabilityInfo + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + check_name_availability_inputs = models.CheckNameAvailabilityParameters(name=name, type=type) + + # Construct URL + url = self.check_name_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(check_name_availability_inputs, 'CheckNameAvailabilityParameters') + + # 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 models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServicesNameAvailabilityInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/checkNameAvailability'} diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/version.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/version.py new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/version.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. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/sdk_packaging.toml b/sdk/healthcareapis/azure-mgmt-healthcareapis/sdk_packaging.toml new file mode 100644 index 000000000000..c100847826ee --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/sdk_packaging.toml @@ -0,0 +1,8 @@ +[packaging] +package_name = "azure-mgmt-healthcareapis" +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/healthcareapis/azure-mgmt-healthcareapis/setup.cfg b/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py new file mode 100644 index 000000000000..871317f35cde --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py @@ -0,0 +1,87 @@ +#!/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-healthcareapis" +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'), '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.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', + license='MIT License', + author='Microsoft Corporation', + author_email='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', + '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'], + } +) From c25700694fcab42f021b2de2e0e1ff87cb2c8c0d Mon Sep 17 00:00:00 2001 From: Srinath Narayanan Date: Mon, 5 Aug 2019 10:24:09 -0700 Subject: [PATCH 31/32] fixed bug in maxItemCount propagation for Order by queries (#6608) * fixed bug with maxItemCount in order by queries * fixed merge conflicts --- .../_execution_context/document_producer.py | 5 +-- .../multi_execution_aggregator.py | 2 +- sdk/cosmos/azure-cosmos/test/query_tests.py | 42 +++++++++++++++++++ 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py index f6f7db7e911e..0d4c47aef3df 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py @@ -35,12 +35,11 @@ class _DocumentProducer(object): When handling an orderby query, MultiExecutionContextAggregator instantiates one instance of this class per target partition key range and aggregates the result of each. ''' - def __init__(self, partition_key_target_range, client, collection_link, query, document_producer_comp): + def __init__(self, partition_key_target_range, client, collection_link, query, document_producer_comp, options): ''' Constructor ''' - # TODO: is that fine we build the options dict and we don't inherit it? - self._options = {} + self._options = options self._partition_key_target_range = partition_key_target_range self._doc_producer_comp = document_producer_comp self._client = client diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py index f0bfb8887fd1..8d2d2dc304ce 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py @@ -142,7 +142,7 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range else: query = self._query - return document_producer._DocumentProducer(partition_key_target_range, self._client, self._resource_link, query, self._document_producer_comparator) + return document_producer._DocumentProducer(partition_key_target_range, self._client, self._resource_link, query, self._document_producer_comparator, self._options) def _get_target_parition_key_range(self): diff --git a/sdk/cosmos/azure-cosmos/test/query_tests.py b/sdk/cosmos/azure-cosmos/test/query_tests.py index 4a313a2e1785..ca6c8a377fc0 100644 --- a/sdk/cosmos/azure-cosmos/test/query_tests.py +++ b/sdk/cosmos/azure-cosmos/test/query_tests.py @@ -1,5 +1,7 @@ import unittest +import uuid import azure.cosmos.cosmos_client as cosmos_client +import azure.cosmos._retry_utility as retry_utility import pytest import test_config @@ -172,6 +174,46 @@ def test_populate_query_metrics(self): self.assertTrue(len(metrics) > 1) self.assertTrue(all(['=' in x for x in metrics])) + def test_max_item_count_honored_in_order_by_query(self): + created_collection = self.config.create_multi_partition_collection_with_custom_pk_if_not_exist(self.client) + docs = [] + for i in range(10): + document_definition = {'pk': 'pk', 'id': 'myId' + str(uuid.uuid4())} + docs.append(created_collection.create_item(body=document_definition)) + + query = 'SELECT * from c ORDER BY c._ts' + query_iterable = created_collection.query_items( + query=query, + max_item_count=1, + enable_cross_partition_query=True + ) + # 1 call to get query plans, 1 call to get pkr, 10 calls to one partion with the documents, 1 call each to other 4 partitions + self.validate_query_requests_count(query_iterable, 16 * 2) + + query_iterable = created_collection.query_items( + query=query, + max_item_count=100, + enable_cross_partition_query=True + ) + + # 1 call to get query plan 1 calls to one partition with the documents, 1 call each to other 4 partitions + self.validate_query_requests_count(query_iterable, 6 * 2) + + def validate_query_requests_count(self, query_iterable, expected_count): + self.count = 0 + self.OriginalExecuteFunction = retry_utility.ExecuteFunction + retry_utility.ExecuteFunction = self._MockExecuteFunction + block = query_iterable.fetch_next_block() + while block: + block = query_iterable.fetch_next_block() + retry_utility.ExecuteFunction = self.OriginalExecuteFunction + self.assertEquals(self.count, expected_count) + self.count = 0 + + def _MockExecuteFunction(self, function, *args, **kwargs): + self.count += 1 + return self.OriginalExecuteFunction(function, *args, **kwargs) + if __name__ == "__main__": unittest.main() \ No newline at end of file From 4470f7998a43d260a89ae1cb79f0852df31cb096 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 5 Aug 2019 14:33:19 -0700 Subject: [PATCH 32/32] Final azure-identity preview 2 changes (#6664) --- sdk/identity/azure-identity/HISTORY.md | 20 +++++++ sdk/identity/azure-identity/README.md | 59 +++++++++++++------ .../azure-identity/azure/identity/__init__.py | 6 +- .../azure/identity/_authn_client.py | 14 +++-- .../azure-identity/azure/identity/_base.py | 2 +- .../{browser_auth.py => _browser_auth.py} | 10 ++-- .../identity/{constants.py => _constants.py} | 0 .../azure/identity/_managed_identity.py | 2 +- .../identity/{version.py => _version.py} | 2 +- .../azure/identity/aio/__init__.py | 4 +- .../azure/identity/aio/_managed_identity.py | 2 +- .../azure/identity/aio/credentials.py | 30 ++++++---- .../azure/identity/credentials.py | 40 ++++++------- sdk/identity/azure-identity/conftest.py | 2 +- sdk/identity/azure-identity/setup.py | 10 +++- .../azure-identity/tests/test_identity.py | 8 +-- .../tests/test_identity_async.py | 2 +- .../azure-identity/tests/test_live_async.py | 1 - .../tests/test_managed_identity.py | 2 +- .../tests/test_managed_identity_async.py | 2 +- sdk/keyvault/azure-keyvault-keys/setup.py | 2 +- sdk/keyvault/azure-keyvault-secrets/setup.py | 2 +- sdk/storage/azure-storage-blob/setup.py | 2 +- sdk/storage/azure-storage-file/setup.py | 2 +- sdk/storage/azure-storage-queue/setup.py | 2 +- shared_requirements.txt | 3 +- 26 files changed, 144 insertions(+), 87 deletions(-) rename sdk/identity/azure-identity/azure/identity/{browser_auth.py => _browser_auth.py} (92%) rename sdk/identity/azure-identity/azure/identity/{constants.py => _constants.py} (100%) rename sdk/identity/azure-identity/azure/identity/{version.py => _version.py} (88%) diff --git a/sdk/identity/azure-identity/HISTORY.md b/sdk/identity/azure-identity/HISTORY.md index 13f091b5a392..2699bc18381c 100644 --- a/sdk/identity/azure-identity/HISTORY.md +++ b/sdk/identity/azure-identity/HISTORY.md @@ -1,5 +1,25 @@ # Release History +## 1.0.0b2 (2019-08-05) +### Breaking changes: +- Removed `azure.core.Configuration` from the public API in preparation for a +revamped configuration API. Static `create_config` methods have been renamed +`_create_config`, and will be removed in a future release. + +### Dependency changes: +- Adopted [azure-core](https://pypi.org/project/azure-core/) 1.0.0b2 + - If you later want to revert to azure-identity 1.0.0b1, or another Azure SDK + library requiring azure-core 1.0.0b1, you'll need to `pip uninstall azure-core` +- Adopted [MSAL](https://pypi.org/project/msal/) 0.4.1 +- New dependency for Python 2.7: [mock](https://pypi.org/project/mock/) + +### New features: +- Added credentials for authenticating users: +[`DeviceCodeCredential`](https://azure.github.io/azure-sdk-for-python/ref/azure.identity.html#azure.identity.DeviceCodeCredential), +[`InteractiveBrowserCredential`](https://azure.github.io/azure-sdk-for-python/ref/azure.identity.html#azure.identity.InteractiveBrowserCredential), +[`UsernamePasswordCredential`](https://azure.github.io/azure-sdk-for-python/ref/azure.identity.html#azure.identity.UsernamePasswordCredential) + - async versions of these credentials will be added in a future release + ## 1.0.0b1 (2019-06-28) Version 1.0.0b1 is the first preview of our efforts to create a user-friendly and Pythonic authentication API for Azure SDK client libraries. For more diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index 22b1bf6c2019..5df7ef702a6c 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -5,6 +5,7 @@ It supports token authentication using an Azure Active Directory This library is in preview and currently supports: - [Service principal authentication](https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals) - [Managed identity authentication](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview) + - User authentication [Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity/azure/identity) | [Package (PyPI)](https://pypi.org/project/azure-identity/) @@ -61,18 +62,22 @@ configuration: |credential class|identity|configuration |-|-|- -|`DefaultAzureCredential`|service principal or managed identity|none for managed identity; [environment variables](#environment-variables) for service principal +|`DefaultAzureCredential`|service principal, managed identity or user|none for managed identity; [environment variables](#environment-variables) for service principal or user authentication |`ManagedIdentityCredential`|managed identity|none |`EnvironmentCredential`|service principal|[environment variables](#environment-variables) |`ClientSecretCredential`|service principal|constructor parameters |`CertificateCredential`|service principal|constructor parameters +|[`DeviceCodeCredential`](https://azure.github.io/azure-sdk-for-python/ref/azure.identity.html#azure.identity.credentials.DeviceCodeCredential)|user|constructor parameters +|[`InteractiveBrowserCredential`](https://azure.github.io/azure-sdk-for-python/ref/azure.identity.html#azure.identity.InteractiveBrowserCredential)|user|constructor parameters +|[`UsernamePasswordCredential`](https://azure.github.io/azure-sdk-for-python/ref/azure.identity.html#azure.identity.credentials.UsernamePasswordCredential)|user|constructor parameters Credentials can be chained together and tried in turn until one succeeds; see [chaining credentials](#chaining-credentials) for details. -All credentials have an async equivalent in the `azure.identity.aio` namespace. -These are supported on Python 3.5.3+. See the -[async credentials](#async-credentials) example for details. +Service principal and managed identity credentials have an async equivalent in +the `azure.identity.aio` namespace, supported on Python 3.5.3+. See the +[async credentials](#async-credentials) example for details. Async user +credentials will be part of a future release. ## DefaultAzureCredential `DefaultAzureCredential` is appropriate for most applications intended to run @@ -90,18 +95,34 @@ for more information. ## Environment variables -`DefaultAzureCredential` and `EnvironmentCredential` are configured for service -principal authentication with these environment variables: - -|variable name|value -|-|- -|`AZURE_CLIENT_ID`|service principal's app id -|`AZURE_TENANT_ID`|id of the principal's Azure Active Directory tenant -|`AZURE_CLIENT_SECRET`|one of the service principal's client secrets -|`AZURE_CLIENT_CERTIFICATE_PATH`|path to a PEM-encoded certificate file including private key (without password) - -Either `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` must be set. -If both are set, the client secret will be used. +`DefaultAzureCredential` and `EnvironmentCredential` can be configured with +environment variables. Each type of authentication requires values for specific +variables: + +#### Service principal with secret +>|variable name|value +>|-|- +>|`AZURE_CLIENT_ID`|service principal's app id +>|`AZURE_TENANT_ID`|id of the principal's Azure Active Directory tenant +>|`AZURE_CLIENT_SECRET`|one of the service principal's client secrets + +#### Service principal with certificate +>|variable name|value +>|-|- +>|`AZURE_CLIENT_ID`|service principal's app id +>|`AZURE_TENANT_ID`|id of the principal's Azure Active Directory tenant +>|`AZURE_CLIENT_CERTIFICATE_PATH`|path to a PEM-encoded certificate file including private key (without password) + +#### Username and password +>|variable name|value +>|-|- +>|`AZURE_CLIENT_ID`|id of an Azure Active Directory application +>|`AZURE_USERNAME`|a username (usually an email address) +>|`AZURE_PASSWORD`|that user's password + +Configuration is attempted in the above order. For example, if both +`AZURE_CLIENT_SECRET` and `AZURE_CLIENT_CERTIFICATE_PATH` have values, +`AZURE_CLIENT_SECRET` will be used. # Examples ## Authenticating with `DefaultAzureCredential` @@ -173,9 +194,9 @@ client = EventHubClient(host, event_hub_path, credential) ``` ## Async credentials: -This library includes a complete async API supported on Python 3.5+. To use the -async credentials in `azure.identity.aio`, you must first install an async -transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). See +This library includes an async API supported on Python 3.5+. To use the async +credentials in `azure.identity.aio`, you must first install an async transport, +such as [`aiohttp`](https://pypi.org/project/aiohttp/). See [azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) for more information. diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index 5a9ccc7aad36..73ae14193dde 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .browser_auth import InteractiveBrowserCredential +from ._browser_auth import InteractiveBrowserCredential from .credentials import ( CertificateCredential, ChainedTokenCredential, @@ -19,10 +19,10 @@ class DefaultAzureCredential(ChainedTokenCredential): A default credential capable of handling most Azure SDK authentication scenarios. When environment variable configuration is present, it authenticates as a service principal - using :class:`identity.EnvironmentCredential`. + using :class:`azure.identity.EnvironmentCredential`. When environment configuration is not present, it authenticates with a managed identity - using :class:`identity.ManagedIdentityCredential`. + using :class:`azure.identity.ManagedIdentityCredential`. """ def __init__(self, **kwargs): diff --git a/sdk/identity/azure-identity/azure/identity/_authn_client.py b/sdk/identity/azure-identity/azure/identity/_authn_client.py index 65f61f090ccd..95ded9b38177 100644 --- a/sdk/identity/azure-identity/azure/identity/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/_authn_client.py @@ -19,8 +19,9 @@ except ImportError: TYPE_CHECKING = False if TYPE_CHECKING: + # pylint:disable=unused-import from time import struct_time - from typing import Any, Dict, Iterable, Mapping, Optional + from typing import Any, Dict, Iterable, Mapping, Optional, Union from azure.core.pipeline import PipelineResponse from azure.core.pipeline.policies import HTTPPolicy @@ -60,13 +61,13 @@ def _deserialize_and_cache_token(self, response, scopes, request_time): token = payload["access_token"] # AccessToken wants expires_on as an int - expires_on = payload.get("expires_on") or int(payload["expires_in"]) + request_time + expires_on = payload.get("expires_on") or int(payload["expires_in"]) + request_time # type: Union[str, int] try: expires_on = int(expires_on) except ValueError: # probably an App Service MSI response, convert it to epoch seconds try: - t = self._parse_app_service_expires_on(expires_on) + t = self._parse_app_service_expires_on(expires_on) # type: ignore expires_on = calendar.timegm(t) except ValueError: # have a token but don't know when it expires -> treat it as single-use @@ -120,7 +121,12 @@ class AuthnClient(AuthnClientBase): def __init__(self, auth_url, config=None, policies=None, transport=None, **kwargs): # type: (str, Optional[Configuration], Optional[Iterable[HTTPPolicy]], Optional[HttpTransport], Mapping[str, Any]) -> None config = config or self._create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.retry_policy, config.logging_policy, DistributedTracingPolicy()] + policies = policies or [ + ContentDecodePolicy(), + config.retry_policy, + config.logging_policy, + DistributedTracingPolicy(), + ] if not transport: transport = RequestsTransport(**kwargs) self._pipeline = Pipeline(transport=transport, policies=policies) diff --git a/sdk/identity/azure-identity/azure/identity/_base.py b/sdk/identity/azure-identity/azure/identity/_base.py index 5938ce608288..d239f308abca 100644 --- a/sdk/identity/azure-identity/azure/identity/_base.py +++ b/sdk/identity/azure-identity/azure/identity/_base.py @@ -9,7 +9,7 @@ from cryptography.hazmat.backends import default_backend from msal.oauth2cli import JwtSigner -from .constants import Endpoints +from ._constants import Endpoints try: from typing import TYPE_CHECKING diff --git a/sdk/identity/azure-identity/azure/identity/browser_auth.py b/sdk/identity/azure-identity/azure/identity/_browser_auth.py similarity index 92% rename from sdk/identity/azure-identity/azure/identity/browser_auth.py rename to sdk/identity/azure-identity/azure/identity/_browser_auth.py index 921d70e635f2..aaf4451f630e 100644 --- a/sdk/identity/azure-identity/azure/identity/browser_auth.py +++ b/sdk/identity/azure-identity/azure/identity/_browser_auth.py @@ -30,13 +30,13 @@ class InteractiveBrowserCredential(ConfidentialClientCredential): https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code :param str client_id: the application's client ID - :param str secret: one of the application's client secrets + :param str client_secret: one of the application's client secrets - **Keyword arguments:** + Keyword arguments + - *tenant (str)*: a tenant ID or a domain associated with a tenant. Defaults to the 'organizations' tenant, + which can authenticate work or school accounts. + - *timeout (int)*: seconds to wait for the user to complete authentication. Defaults to 300 (5 minutes). - *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the - 'organizations' tenant, which can authenticate work or school accounts. - *timeout (str)* - seconds to wait for the user to complete authentication. Defaults to 300 (5 minutes). """ def __init__(self, client_id, client_secret, **kwargs): diff --git a/sdk/identity/azure-identity/azure/identity/constants.py b/sdk/identity/azure-identity/azure/identity/_constants.py similarity index 100% rename from sdk/identity/azure-identity/azure/identity/constants.py rename to sdk/identity/azure-identity/azure/identity/_constants.py diff --git a/sdk/identity/azure-identity/azure/identity/_managed_identity.py b/sdk/identity/azure-identity/azure/identity/_managed_identity.py index 9c3c0cd7d982..97946fd38e0c 100644 --- a/sdk/identity/azure-identity/azure/identity/_managed_identity.py +++ b/sdk/identity/azure-identity/azure/identity/_managed_identity.py @@ -19,7 +19,7 @@ from azure.core.pipeline.policies import ContentDecodePolicy, HeadersPolicy, NetworkTraceLoggingPolicy, RetryPolicy from ._authn_client import AuthnClient -from .constants import Endpoints, EnvironmentVariables +from ._constants import Endpoints, EnvironmentVariables class _ManagedIdentityBase(object): diff --git a/sdk/identity/azure-identity/azure/identity/version.py b/sdk/identity/azure-identity/azure/identity/_version.py similarity index 88% rename from sdk/identity/azure-identity/azure/identity/version.py rename to sdk/identity/azure-identity/azure/identity/_version.py index a4040f093c86..946e62e8cf55 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.0.0b1" +VERSION = "1.0.0b2" diff --git a/sdk/identity/azure-identity/azure/identity/aio/__init__.py b/sdk/identity/azure-identity/azure/identity/aio/__init__.py index a720d5e285bd..7610e4d26df3 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/aio/__init__.py @@ -16,10 +16,10 @@ class DefaultAzureCredential(ChainedTokenCredential): A default credential capable of handling most Azure SDK authentication scenarios. When environment variable configuration is present, it authenticates as a service principal - using :class:`identity.aio.EnvironmentCredential`. + using :class:`azure.identity.aio.EnvironmentCredential`. When environment configuration is not present, it authenticates with a managed identity - using :class:`identity.aio.ManagedIdentityCredential`. + using :class:`azure.identity.aio.ManagedIdentityCredential`. """ def __init__(self, **kwargs): diff --git a/sdk/identity/azure-identity/azure/identity/aio/_managed_identity.py b/sdk/identity/azure-identity/azure/identity/aio/_managed_identity.py index 9d8eeb46a67c..84d7e7409c32 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_managed_identity.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_managed_identity.py @@ -11,7 +11,7 @@ from azure.core.pipeline.policies import ContentDecodePolicy, HeadersPolicy, NetworkTraceLoggingPolicy, AsyncRetryPolicy from ._authn_client import AsyncAuthnClient -from ..constants import Endpoints, EnvironmentVariables +from .._constants import Endpoints, EnvironmentVariables from .._managed_identity import _ManagedIdentityBase diff --git a/sdk/identity/azure-identity/azure/identity/aio/credentials.py b/sdk/identity/azure-identity/azure/identity/aio/credentials.py index fd80e2bc1051..4d8011c65016 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/aio/credentials.py @@ -16,8 +16,8 @@ from ._authn_client import AsyncAuthnClient from ._managed_identity import ImdsCredential, MsiCredential from .._base import ClientSecretCredentialBase, CertificateCredentialBase -from ..constants import Endpoints, EnvironmentVariables -from ..credentials import ChainedTokenCredential +from .._constants import Endpoints, EnvironmentVariables +from ..credentials import ChainedTokenCredential as SyncChainedTokenCredential # pylint:disable=too-few-public-methods @@ -80,18 +80,24 @@ async def get_token(self, *scopes: str) -> AccessToken: class EnvironmentCredential: """ - Authenticates as a service principal using a client ID/secret pair or a certificate, - depending on environment variable settings. - - These environment variables are required: + Authenticates as a service principal using a client secret or a certificate, or as a user with a username and + password, depending on environment variable settings. Configuration is attempted in this order, using these + environment variables: + Service principal with secret: - **AZURE_CLIENT_ID**: the service principal's client ID + - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. - Additionally, set **one** of these to configure client secret or certificate authentication: - - - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets + Service principal with certificate: + - **AZURE_CLIENT_ID**: the service principal's client ID - **AZURE_CLIENT_CERTIFICATE_PATH**: path to a PEM-encoded certificate file including the private key + - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. + + User with username and password: + - **AZURE_CLIENT_ID**: the application's client ID + - **AZURE_USERNAME**: a username (usually an email address) + - **AZURE_PASSWORD**: that user's password """ def __init__(self, **kwargs: Mapping[str, Any]) -> None: @@ -156,7 +162,7 @@ async def get_token(self, *scopes: str) -> AccessToken: return AccessToken() -class ChainedTokenCredential(ChainedTokenCredential): +class ChainedTokenCredential(SyncChainedTokenCredential): """ A sequence of credentials that is itself a credential. Its ``get_token`` method calls ``get_token`` on each credential in the sequence, in order, returning the first valid token received. @@ -165,7 +171,7 @@ class ChainedTokenCredential(ChainedTokenCredential): :type credentials: :class:`azure.core.credentials.TokenCredential` """ - async def get_token(self, *scopes: str) -> AccessToken: # type: ignore + async def get_token(self, *scopes: str) -> AccessToken: """ Asynchronously request a token from each credential, in order, returning the first token received. If none provides a token, raises :class:`azure.core.exceptions.ClientAuthenticationError` @@ -175,7 +181,7 @@ async def get_token(self, *scopes: str) -> AccessToken: # type: ignore :raises: :class:`azure.core.exceptions.ClientAuthenticationError` """ history = [] - for credential in self._credentials: + for credential in self.credentials: try: return await credential.get_token(*scopes) except ClientAuthenticationError as ex: diff --git a/sdk/identity/azure-identity/azure/identity/credentials.py b/sdk/identity/azure-identity/azure/identity/credentials.py index 2465198c53ac..6e107ac63f1e 100644 --- a/sdk/identity/azure-identity/azure/identity/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/credentials.py @@ -14,10 +14,11 @@ from azure.core.pipeline.policies import ContentDecodePolicy, HeadersPolicy, NetworkTraceLoggingPolicy, RetryPolicy from ._authn_client import AuthnClient +from ._browser_auth import InteractiveBrowserCredential from ._base import ClientSecretCredentialBase, CertificateCredentialBase from ._internal import PublicClientCredential, wrap_exceptions from ._managed_identity import ImdsCredential, MsiCredential -from .constants import Endpoints, EnvironmentVariables +from ._constants import Endpoints, EnvironmentVariables try: from typing import TYPE_CHECKING @@ -200,7 +201,7 @@ def __init__(self, *credentials): # type: (*TokenCredential) -> None if not credentials: raise ValueError("at least one credential is required") - self._credentials = credentials + self.credentials = credentials def get_token(self, *scopes): # type (*str) -> AccessToken @@ -213,7 +214,7 @@ def get_token(self, *scopes): :raises: :class:`azure.core.exceptions.ClientAuthenticationError` """ history = [] - for credential in self._credentials: + for credential in self.credentials: try: return credential.get_token(*scopes) except ClientAuthenticationError as ex: @@ -238,7 +239,8 @@ class DeviceCodeCredential(PublicClientCredential): """ Authenticates users through the device code flow. When ``get_token`` is called, this credential acquires a verification URL and code from Azure Active Directory. A user must browse to the URL, enter the code, and - authenticate with Directory. If the user authenticates successfully, the credential receives an access token. + authenticate with Azure Active Directory. If the user authenticates successfully, the credential receives + an access token. This credential doesn't cache tokens--each ``get_token`` call begins a new authentication flow. @@ -246,20 +248,19 @@ class DeviceCodeCredential(PublicClientCredential): https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code :param str client_id: the application's ID - :param prompt_callback: (optional) A callback enabling control of how authentication instructions are presented. + :param prompt_callback: + (optional) A callback enabling control of how authentication instructions are presented. + Must accept arguments (``verification_uri``, ``user_code``, ``expires_in``): + - ``verification_uri`` (str) the URL the user must visit + - ``user_code`` (str) the code the user must enter there + - ``expires_in`` (int) the number of seconds the code will be valid If not provided, the credential will print instructions to stdout. - :type prompt_callback: A callable accepting arguments (``verification_uri``, ``user_code``, ``expires_in``): - - ``verification_uri`` (str) the URL the user must visit - - ``user_code`` (str) the code the user must enter there - - ``expires_in`` (int) the number of seconds the code will be valid - **Keyword arguments:** - - - *tenant (str)* - tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the - 'organizations' tenant, which supports only Azure Active Directory work or school accounts. - - - *timeout (int)* - seconds to wait for the user to authenticate. Defaults to the validity period of the device code - as set by Azure Active Directory, which also prevails when ``timeout`` is longer. + Keyword arguments + - *tenant (str)* - 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. + - *timeout (int)* - seconds to wait for the user to authenticate. Defaults to the validity period of the device + code as set by Azure Active Directory, which also prevails when ``timeout`` is longer. """ @@ -330,10 +331,9 @@ class UsernamePasswordCredential(PublicClientCredential): :param str username: the user's username (usually an email address) :param str password: the user's password - **Keyword arguments:** - - - **tenant (str)** - a tenant ID or a domain associated with a tenant. If not provided, defaults to the - 'organizations' tenant. + Keyword arguments + - *tenant (str)* - 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. """ diff --git a/sdk/identity/azure-identity/conftest.py b/sdk/identity/azure-identity/conftest.py index 6bdfa4d3ddee..d2e94c1e9cbd 100644 --- a/sdk/identity/azure-identity/conftest.py +++ b/sdk/identity/azure-identity/conftest.py @@ -6,7 +6,7 @@ import sys import pytest -from azure.identity.constants import EnvironmentVariables +from azure.identity._constants import EnvironmentVariables # IMDS tests must be run explicitly collect_ignore_glob = ["*imds*"] # pylint:disable=invalid-name diff --git a/sdk/identity/azure-identity/setup.py b/sdk/identity/azure-identity/setup.py index 783ef669f72a..aeb53fceeda4 100644 --- a/sdk/identity/azure-identity/setup.py +++ b/sdk/identity/azure-identity/setup.py @@ -30,7 +30,7 @@ except ImportError: pass -with open(os.path.join(package_folder_path, "version.py"), "r") as fd: +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") @@ -69,6 +69,10 @@ "azure", ] ), - install_requires=["azure-core<2.0.0,>=1.0.0b1", "cryptography>=2.1.4", "msal~=0.4.1", "six>=1.6"], - extras_require={":python_version<'3.0'": ["azure-nspkg"], ":python_version<'3.5'": ["typing"]}, + install_requires=["azure-core<2.0.0,>=1.0.0b2", "cryptography>=2.1.4", "msal~=0.4.1", "six>=1.6"], + extras_require={ + ":python_version<'3.0'": ["azure-nspkg"], + ":python_version<'3.3'": ["mock"], + ":python_version<'3.5'": ["typing"], + }, ) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 0319e6a2938a..40aa4f8df35d 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -26,7 +26,7 @@ UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential -from azure.identity.constants import EnvironmentVariables +from azure.identity._constants import EnvironmentVariables import pytest from helpers import mock_response, Request, validating_transport @@ -299,7 +299,7 @@ def test_device_code_credential_timeout(): assert "timed out" in ex.value.message.lower() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +@patch("azure.identity._browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser def test_interactive_credential(): oauth_state = "state" expected_token = "access-token" @@ -333,12 +333,12 @@ def test_interactive_credential(): ) # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + with patch("azure.identity._browser_auth.uuid.uuid4", lambda: oauth_state): token = credential.get_token("scope") assert token.token == expected_token -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +@patch("azure.identity._browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser def test_interactive_credential_timeout(): # mock transport handles MSAL's tenant discovery transport = Mock( diff --git a/sdk/identity/azure-identity/tests/test_identity_async.py b/sdk/identity/azure-identity/tests/test_identity_async.py index 70d06ed7f8c7..ce432f62473b 100644 --- a/sdk/identity/azure-identity/tests/test_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_identity_async.py @@ -20,7 +20,7 @@ ManagedIdentityCredential, ) from azure.identity.aio._managed_identity import ImdsCredential -from azure.identity.constants import EnvironmentVariables +from azure.identity._constants import EnvironmentVariables from helpers import mock_response, Request, async_validating_transport diff --git a/sdk/identity/azure-identity/tests/test_live_async.py b/sdk/identity/azure-identity/tests/test_live_async.py index c64279258e97..49a16a328e4f 100644 --- a/sdk/identity/azure-identity/tests/test_live_async.py +++ b/sdk/identity/azure-identity/tests/test_live_async.py @@ -10,7 +10,6 @@ import mock # type: ignore from azure.identity.aio import DefaultAzureCredential, CertificateCredential, ClientSecretCredential -from azure.identity.constants import EnvironmentVariables import pytest ARM_SCOPE = "https://management.azure.com/.default" diff --git a/sdk/identity/azure-identity/tests/test_managed_identity.py b/sdk/identity/azure-identity/tests/test_managed_identity.py index 0840c1f9d4c4..2129da897083 100644 --- a/sdk/identity/azure-identity/tests/test_managed_identity.py +++ b/sdk/identity/azure-identity/tests/test_managed_identity.py @@ -11,7 +11,7 @@ from azure.core.credentials import AccessToken from azure.identity import ManagedIdentityCredential -from azure.identity.constants import Endpoints, EnvironmentVariables +from azure.identity._constants import Endpoints, EnvironmentVariables from helpers import validating_transport, mock_response, Request 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 ee4fd0fdadcc..6f07d0d38d5f 100644 --- a/sdk/identity/azure-identity/tests/test_managed_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_managed_identity_async.py @@ -7,7 +7,7 @@ from azure.core.credentials import AccessToken from azure.identity.aio import ManagedIdentityCredential -from azure.identity.constants import Endpoints, EnvironmentVariables +from azure.identity._constants import Endpoints, EnvironmentVariables import pytest from helpers import async_validating_transport, mock_response, Request diff --git a/sdk/keyvault/azure-keyvault-keys/setup.py b/sdk/keyvault/azure-keyvault-keys/setup.py index 0ae136fe914d..2bf604c00b14 100644 --- a/sdk/keyvault/azure-keyvault-keys/setup.py +++ b/sdk/keyvault/azure-keyvault-keys/setup.py @@ -77,6 +77,6 @@ "azure", ] ), - install_requires=["azure-core<2.0.0,>=1.0.0b1", "azure-common~=1.1", "msrest>=0.5.0"], + install_requires=["azure-core<2.0.0,>=1.0.0b2", "azure-common~=1.1", "msrest>=0.5.0"], extras_require={":python_version<'3.0'": ["azure-nspkg"], ":python_version<'3.5'": ["typing"]}, ) diff --git a/sdk/keyvault/azure-keyvault-secrets/setup.py b/sdk/keyvault/azure-keyvault-secrets/setup.py index 7ffb60b443c9..271061245994 100644 --- a/sdk/keyvault/azure-keyvault-secrets/setup.py +++ b/sdk/keyvault/azure-keyvault-secrets/setup.py @@ -77,6 +77,6 @@ "azure", ] ), - install_requires=["azure-core<2.0.0,>=1.0.0b1", "azure-common~=1.1", "msrest>=0.5.0"], + install_requires=["azure-core<2.0.0,>=1.0.0b2", "azure-common~=1.1", "msrest>=0.5.0"], extras_require={":python_version<'3.0'": ["azure-nspkg"], ":python_version<'3.5'": ["typing"]}, ) diff --git a/sdk/storage/azure-storage-blob/setup.py b/sdk/storage/azure-storage-blob/setup.py index f64bb70470d0..7edf7eb60aa9 100644 --- a/sdk/storage/azure-storage-blob/setup.py +++ b/sdk/storage/azure-storage-blob/setup.py @@ -91,7 +91,7 @@ 'tests.common' ]), install_requires=[ - "azure-core<2.0.0,>=1.0.0b1", + "azure-core<2.0.0,>=1.0.0b2", "msrest>=0.5.0", "cryptography>=2.1.4" ], diff --git a/sdk/storage/azure-storage-file/setup.py b/sdk/storage/azure-storage-file/setup.py index 0258ff7730ec..0d84ca67c99e 100644 --- a/sdk/storage/azure-storage-file/setup.py +++ b/sdk/storage/azure-storage-file/setup.py @@ -79,7 +79,7 @@ 'tests.common' ]), install_requires=[ - "azure-core<2.0.0,>=1.0.0b1", + "azure-core<2.0.0,>=1.0.0b2", "msrest>=0.5.0", "cryptography>=2.1.4" ], diff --git a/sdk/storage/azure-storage-queue/setup.py b/sdk/storage/azure-storage-queue/setup.py index 4202cdce88c7..85086f8f0260 100644 --- a/sdk/storage/azure-storage-queue/setup.py +++ b/sdk/storage/azure-storage-queue/setup.py @@ -79,7 +79,7 @@ 'tests.common' ]), install_requires=[ - "azure-core<2.0.0,>=1.0.0b1", + "azure-core<2.0.0,>=1.0.0b2", "msrest>=0.5.0", "cryptography>=2.1.4" ], diff --git a/shared_requirements.txt b/shared_requirements.txt index e6f96057b574..c03066fba99e 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -6,7 +6,7 @@ azure-cognitiveservices-language-nspkg azure-cognitiveservices-search-nspkg azure-cognitiveservices-vision-nspkg azure-common~=1.1 -azure-core<2.0.0,>=1.0.0b1 +azure-core<2.0.0,>=1.0.0b2 azure-cosmosdb-table~=1.0 azure-datalake-store~=0.0.18 azure-eventgrid~=1.1 @@ -87,6 +87,7 @@ azure-storage-file~=1.3 azure-storage-queue~=1.3 cryptography>=2.1.4 futures +mock typing msal~=0.4.1 msrest>=0.5.0