From f6ce25425a0bac51a703883bc0fe0b81ec0887eb Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Wed, 10 Jul 2019 16:34:51 -0700 Subject: [PATCH 01/37] Update schema in swagger_to_sdk_config.json --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index b993d3ff8785..27852c868bd0 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/lmazuel/swagger-to-sdk/master/swagger_to_sdk_config.schema.json", + "$schema": "https://openapistoragetest.blob.core.windows.net/sdkautomation/test/schemas/swagger_to_sdk_config.schema.json", "meta": { "autorest_options": { "version": "preview", From 915ecd682f44f01d5b2cfc6af036685f4873a50c Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Thu, 11 Jul 2019 14:41:44 -0700 Subject: [PATCH 02/37] Enable generation pull requests --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 27852c868bd0..4bad085c48f9 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -12,7 +12,7 @@ "no-async": "" }, "advanced_options": { - "create_sdk_pull_requests": false, + "create_sdk_pull_requests": true, "sdk_generation_pull_request_base": "integration_branch" }, "repotag": "azure-sdk-for-python", From 1ab2d3e95d6de7c6e505fed45567e96c2a701b2e Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2019 02:44:40 +0000 Subject: [PATCH 03/37] Generated from 7e0f5408fe4fa42660222ec1c5cca8ae9440afde (#27) fix: Batch model validation errors - Add body for RESPONSE_BODY_NOT_IN_EXAMPLE errors - active -> Active for state enum in 2017-09-01 examples --- .../azure/mgmt/batch/__init__.py | 7 +- ..._client.py => _batch_management_client.py} | 59 +- .../azure/mgmt/batch/_configuration.py | 49 + .../azure/mgmt/batch/models/__init__.py | 97 +- .../models/_batch_management_client_enums.py | 146 +- .../azure/mgmt/batch/models/_models.py | 2267 +++++++------- .../azure/mgmt/batch/models/_models_py3.py | 2649 +++++++++-------- .../azure/mgmt/batch/models/_paged_models.py | 10 - .../azure/mgmt/batch/operations/__init__.py | 14 +- ...erations.py => _application_operations.py} | 53 +- ....py => _application_package_operations.py} | 53 +- ...ations.py => _batch_account_operations.py} | 192 +- ...erations.py => _certificate_operations.py} | 165 +- ..._operations.py => _location_operations.py} | 20 +- .../{operations.py => _operations.py} | 27 +- ...pool_operations.py => _pool_operations.py} | 174 +- 16 files changed, 3115 insertions(+), 2867 deletions(-) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/{batch_management_client.py => _batch_management_client.py} (61%) create mode 100644 sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{application_operations.py => _application_operations.py} (92%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{application_package_operations.py => _application_package_operations.py} (92%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{batch_account_operations.py => _batch_account_operations.py} (84%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{certificate_operations.py => _certificate_operations.py} (84%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{location_operations.py => _location_operations.py} (91%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{operations.py => _operations.py} (82%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{pool_operations.py => _pool_operations.py} (85%) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py index da4d07e1222e..bfdd6ac1c466 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_management_client import BatchManagementClient -from .version import VERSION +from ._configuration import BatchManagementClientConfiguration +from ._batch_management_client import BatchManagementClient +__all__ = ['BatchManagementClient', 'BatchManagementClientConfiguration'] -__all__ = ['BatchManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py similarity index 61% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py index d31cfa110ab2..6cdcc5ca3eaf 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py @@ -9,54 +9,21 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.batch_account_operations import BatchAccountOperations -from .operations.application_package_operations import ApplicationPackageOperations -from .operations.application_operations import ApplicationOperations -from .operations.location_operations import LocationOperations -from .operations.operations import Operations -from .operations.certificate_operations import CertificateOperations -from .operations.pool_operations import PoolOperations -from . import models - - -class BatchManagementClientConfiguration(AzureConfiguration): - """Configuration for BatchManagementClient - 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 Azure subscription ID. This is a - GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - :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(BatchManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-batch/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import BatchManagementClientConfiguration +from .operations import BatchAccountOperations +from .operations import ApplicationPackageOperations +from .operations import ApplicationOperations +from .operations import LocationOperations +from .operations import Operations +from .operations import CertificateOperations +from .operations import PoolOperations +from . import models -class BatchManagementClient(object): +class BatchManagementClient(SDKClient): """BatchManagementClient :ivar config: Configuration for client. @@ -90,10 +57,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = BatchManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(BatchManagementClient, 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-12-01' + self.api_version = '2019-04-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py new file mode 100644 index 000000000000..75c9d4004f40 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class BatchManagementClientConfiguration(AzureConfiguration): + """Configuration for BatchManagementClient + 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 Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :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(BatchManagementClientConfiguration, 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-batch/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py index ad7c3fe653cf..b17bdd9834c9 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py @@ -9,21 +9,26 @@ # regenerated. # -------------------------------------------------------------------------- - try: from ._models_py3 import ActivateApplicationPackageParameters + from ._models_py3 import Application + from ._models_py3 import ApplicationPackage from ._models_py3 import ApplicationPackageReference from ._models_py3 import AutoScaleRun from ._models_py3 import AutoScaleRunError from ._models_py3 import AutoScaleSettings from ._models_py3 import AutoStorageBaseProperties + from ._models_py3 import AutoStorageProperties from ._models_py3 import AutoUserSpecification + from ._models_py3 import BatchAccount from ._models_py3 import BatchAccountCreateParameters from ._models_py3 import BatchAccountKeys from ._models_py3 import BatchAccountRegenerateKeyParameters from ._models_py3 import BatchAccountUpdateParameters from ._models_py3 import BatchLocationQuota + from ._models_py3 import Certificate from ._models_py3 import CertificateBaseProperties + from ._models_py3 import CertificateCreateOrUpdateParameters from ._models_py3 import CertificateReference from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import CheckNameAvailabilityResult @@ -44,6 +49,7 @@ from ._models_py3 import NetworkSecurityGroupRule from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import Pool from ._models_py3 import PoolEndpointConfiguration from ._models_py3 import ProxyResource from ._models_py3 import ResizeError @@ -57,29 +63,29 @@ from ._models_py3 import UserAccount from ._models_py3 import UserIdentity from ._models_py3 import VirtualMachineConfiguration + from ._models_py3 import VirtualMachineFamilyCoreQuota from ._models_py3 import WindowsConfiguration from ._models_py3 import WindowsUserConfiguration - from ._models_py3 import Application - from ._models_py3 import ApplicationPackage - from ._models_py3 import AutoStorageProperties - from ._models_py3 import BatchAccount - from ._models_py3 import Certificate - from ._models_py3 import CertificateCreateOrUpdateParameters - from ._models_py3 import Pool except (SyntaxError, ImportError): from ._models import ActivateApplicationPackageParameters + from ._models import Application + from ._models import ApplicationPackage from ._models import ApplicationPackageReference from ._models import AutoScaleRun from ._models import AutoScaleRunError from ._models import AutoScaleSettings from ._models import AutoStorageBaseProperties + from ._models import AutoStorageProperties from ._models import AutoUserSpecification + from ._models import BatchAccount from ._models import BatchAccountCreateParameters from ._models import BatchAccountKeys from ._models import BatchAccountRegenerateKeyParameters from ._models import BatchAccountUpdateParameters from ._models import BatchLocationQuota + from ._models import Certificate from ._models import CertificateBaseProperties + from ._models import CertificateCreateOrUpdateParameters from ._models import CertificateReference from ._models import CheckNameAvailabilityParameters from ._models import CheckNameAvailabilityResult @@ -100,6 +106,7 @@ from ._models import NetworkSecurityGroupRule from ._models import Operation from ._models import OperationDisplay + from ._models import Pool from ._models import PoolEndpointConfiguration from ._models import ProxyResource from ._models import ResizeError @@ -113,58 +120,59 @@ from ._models import UserAccount from ._models import UserIdentity from ._models import VirtualMachineConfiguration + from ._models import VirtualMachineFamilyCoreQuota from ._models import WindowsConfiguration from ._models import WindowsUserConfiguration - from ._models import Application - from ._models import ApplicationPackage - from ._models import AutoStorageProperties - from ._models import BatchAccount - from ._models import Certificate - from ._models import CertificateCreateOrUpdateParameters - from ._models import Pool -from ._paged_models import BatchAccountPaged from ._paged_models import ApplicationPackagePaged from ._paged_models import ApplicationPaged -from ._paged_models import OperationPaged +from ._paged_models import BatchAccountPaged from ._paged_models import CertificatePaged +from ._paged_models import OperationPaged from ._paged_models import PoolPaged -from ._batch_management_client_enums import PoolAllocationMode -from ._batch_management_client_enums import ProvisioningState -from ._batch_management_client_enums import AccountKeyType -from ._batch_management_client_enums import PackageState -from ._batch_management_client_enums import CertificateFormat -from ._batch_management_client_enums import CertificateProvisioningState -from ._batch_management_client_enums import PoolProvisioningState -from ._batch_management_client_enums import AllocationState -from ._batch_management_client_enums import CachingType -from ._batch_management_client_enums import StorageAccountType -from ._batch_management_client_enums import ComputeNodeDeallocationOption -from ._batch_management_client_enums import InterNodeCommunicationState -from ._batch_management_client_enums import InboundEndpointProtocol -from ._batch_management_client_enums import NetworkSecurityGroupRuleAccess -from ._batch_management_client_enums import ComputeNodeFillType -from ._batch_management_client_enums import ElevationLevel -from ._batch_management_client_enums import LoginMode -from ._batch_management_client_enums import AutoUserScope -from ._batch_management_client_enums import CertificateStoreLocation -from ._batch_management_client_enums import CertificateVisibility -from ._batch_management_client_enums import NameAvailabilityReason +from ._batch_management_client_enums import ( + PoolAllocationMode, + ProvisioningState, + AccountKeyType, + PackageState, + CertificateFormat, + CertificateProvisioningState, + PoolProvisioningState, + AllocationState, + CachingType, + StorageAccountType, + ComputeNodeDeallocationOption, + InterNodeCommunicationState, + InboundEndpointProtocol, + NetworkSecurityGroupRuleAccess, + ComputeNodeFillType, + ElevationLevel, + LoginMode, + AutoUserScope, + CertificateStoreLocation, + CertificateVisibility, + NameAvailabilityReason, +) - -__all__=[ +__all__ = [ 'ActivateApplicationPackageParameters', + 'Application', + 'ApplicationPackage', 'ApplicationPackageReference', 'AutoScaleRun', 'AutoScaleRunError', 'AutoScaleSettings', 'AutoStorageBaseProperties', + 'AutoStorageProperties', 'AutoUserSpecification', + 'BatchAccount', 'BatchAccountCreateParameters', 'BatchAccountKeys', 'BatchAccountRegenerateKeyParameters', 'BatchAccountUpdateParameters', 'BatchLocationQuota', + 'Certificate', 'CertificateBaseProperties', + 'CertificateCreateOrUpdateParameters', 'CertificateReference', 'CheckNameAvailabilityParameters', 'CheckNameAvailabilityResult', @@ -185,6 +193,7 @@ 'NetworkSecurityGroupRule', 'Operation', 'OperationDisplay', + 'Pool', 'PoolEndpointConfiguration', 'ProxyResource', 'ResizeError', @@ -198,15 +207,9 @@ 'UserAccount', 'UserIdentity', 'VirtualMachineConfiguration', + 'VirtualMachineFamilyCoreQuota', 'WindowsConfiguration', 'WindowsUserConfiguration', - 'Application', - 'ApplicationPackage', - 'AutoStorageProperties', - 'BatchAccount', - 'Certificate', - 'CertificateCreateOrUpdateParameters', - 'Pool', 'BatchAccountPaged', 'ApplicationPackagePaged', 'ApplicationPaged', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py index da2eba944432..0bd6782557aa 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py @@ -12,137 +12,137 @@ from enum import Enum -class PoolAllocationMode(Enum): +class PoolAllocationMode(str, Enum): - batch_service = "BatchService" - user_subscription = "UserSubscription" + batch_service = "BatchService" #: Pools will be allocated in subscriptions owned by the Batch service. + user_subscription = "UserSubscription" #: Pools will be allocated in a subscription owned by the user. -class ProvisioningState(Enum): +class ProvisioningState(str, Enum): - invalid = "Invalid" - creating = "Creating" - deleting = "Deleting" - succeeded = "Succeeded" - failed = "Failed" - cancelled = "Cancelled" + invalid = "Invalid" #: The account is in an invalid state. + creating = "Creating" #: The account is being created. + deleting = "Deleting" #: The account is being deleted. + succeeded = "Succeeded" #: The account has been created and is ready for use. + failed = "Failed" #: The last operation for the account is failed. + cancelled = "Cancelled" #: The last operation for the account is cancelled. -class AccountKeyType(Enum): +class AccountKeyType(str, Enum): - primary = "Primary" - secondary = "Secondary" + primary = "Primary" #: The primary account key. + secondary = "Secondary" #: The secondary account key. -class PackageState(Enum): +class PackageState(str, Enum): - pending = "Pending" - active = "Active" + pending = "Pending" #: The application package has been created but has not yet been activated. + active = "Active" #: The application package is ready for use. -class CertificateFormat(Enum): +class CertificateFormat(str, Enum): - pfx = "Pfx" - cer = "Cer" + pfx = "Pfx" #: The certificate is a PFX (PKCS#12) formatted certificate or certificate chain. + cer = "Cer" #: The certificate is a base64-encoded X.509 certificate. -class CertificateProvisioningState(Enum): +class CertificateProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" - failed = "Failed" + succeeded = "Succeeded" #: The certificate is available for use in pools. + deleting = "Deleting" #: The user has requested that the certificate be deleted, but the delete operation has not yet completed. You may not reference the certificate when creating or updating pools. + failed = "Failed" #: The user requested that the certificate be deleted, but there are pools that still have references to the certificate, or it is still installed on one or more compute nodes. (The latter can occur if the certificate has been removed from the pool, but the node has not yet restarted. Nodes refresh their certificates only when they restart.) You may use the cancel certificate delete operation to cancel the delete, or the delete certificate operation to retry the delete. -class PoolProvisioningState(Enum): +class PoolProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" + succeeded = "Succeeded" #: The pool is available to run tasks subject to the availability of compute nodes. + deleting = "Deleting" #: The user has requested that the pool be deleted, but the delete operation has not yet completed. -class AllocationState(Enum): +class AllocationState(str, Enum): - steady = "Steady" - resizing = "Resizing" - stopping = "Stopping" + steady = "Steady" #: The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this state when it is created and when no operations are being performed on the pool to change the number of nodes. + resizing = "Resizing" #: The pool is resizing; that is, compute nodes are being added to or removed from the pool. + stopping = "Stopping" #: The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed. -class CachingType(Enum): +class CachingType(str, Enum): - none = "None" - read_only = "ReadOnly" - read_write = "ReadWrite" + none = "None" #: The caching mode for the disk is not enabled. + read_only = "ReadOnly" #: The caching mode for the disk is read only. + read_write = "ReadWrite" #: The caching mode for the disk is read and write. -class StorageAccountType(Enum): +class StorageAccountType(str, Enum): - standard_lrs = "Standard_LRS" - premium_lrs = "Premium_LRS" + standard_lrs = "Standard_LRS" #: The data disk should use standard locally redundant storage. + premium_lrs = "Premium_LRS" #: The data disk should use premium locally redundant storage. -class ComputeNodeDeallocationOption(Enum): +class ComputeNodeDeallocationOption(str, Enum): - requeue = "Requeue" - terminate = "Terminate" - task_completion = "TaskCompletion" - retained_data = "RetainedData" + requeue = "Requeue" #: Terminate running task processes and requeue the tasks. The tasks will run again when a node is available. Remove nodes as soon as tasks have been terminated. + terminate = "Terminate" #: Terminate running tasks. The tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Remove nodes as soon as tasks have been terminated. + task_completion = "TaskCompletion" #: Allow currently running tasks to complete. Schedule no new tasks while waiting. Remove nodes when all tasks have completed. + retained_data = "RetainedData" #: Allow currently running tasks to complete, then wait for all task data retention periods to expire. Schedule no new tasks while waiting. Remove nodes when all task retention periods have expired. -class InterNodeCommunicationState(Enum): +class InterNodeCommunicationState(str, Enum): - enabled = "Enabled" - disabled = "Disabled" + enabled = "Enabled" #: Enable network communication between virtual machines. + disabled = "Disabled" #: Disable network communication between virtual machines. -class InboundEndpointProtocol(Enum): +class InboundEndpointProtocol(str, Enum): - tcp = "TCP" - udp = "UDP" + tcp = "TCP" #: Use TCP for the endpoint. + udp = "UDP" #: Use UDP for the endpoint. -class NetworkSecurityGroupRuleAccess(Enum): +class NetworkSecurityGroupRuleAccess(str, Enum): - allow = "Allow" - deny = "Deny" + allow = "Allow" #: Allow access. + deny = "Deny" #: Deny access. -class ComputeNodeFillType(Enum): +class ComputeNodeFillType(str, Enum): - spread = "Spread" - pack = "Pack" + spread = "Spread" #: Tasks should be assigned evenly across all nodes in the pool. + pack = "Pack" #: As many tasks as possible (maxTasksPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool. -class ElevationLevel(Enum): +class ElevationLevel(str, Enum): - non_admin = "NonAdmin" - admin = "Admin" + non_admin = "NonAdmin" #: The user is a standard user without elevated access. + admin = "Admin" #: The user is a user with elevated access and operates with full Administrator permissions. -class LoginMode(Enum): +class LoginMode(str, Enum): - batch = "Batch" - interactive = "Interactive" + batch = "Batch" #: The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel processes. + interactive = "Interactive" #: The LOGON32_LOGON_INTERACTIVE Win32 login mode. Some applications require having permissions associated with the interactive login mode. If this is the case for an application used in your task, then this option is recommended. -class AutoUserScope(Enum): +class AutoUserScope(str, Enum): - task = "Task" - pool = "Pool" + task = "Task" #: Specifies that the service should create a new user for the task. + pool = "Pool" #: Specifies that the task runs as the common auto user account which is created on every node in a pool. -class CertificateStoreLocation(Enum): +class CertificateStoreLocation(str, Enum): - current_user = "CurrentUser" - local_machine = "LocalMachine" + current_user = "CurrentUser" #: Certificates should be installed to the CurrentUser certificate store. + local_machine = "LocalMachine" #: Certificates should be installed to the LocalMachine certificate store. -class CertificateVisibility(Enum): +class CertificateVisibility(str, Enum): - start_task = "StartTask" - task = "Task" - remote_user = "RemoteUser" + start_task = "StartTask" #: The certificate should be visible to the user account under which the start task is run. + task = "Task" #: The certificate should be visible to the user accounts under which job tasks are run. + remote_user = "RemoteUser" #: The certificate should be visible to the user accounts under which users remotely access the node. -class NameAvailabilityReason(Enum): +class NameAvailabilityReason(str, Enum): - invalid = "Invalid" - already_exists = "AlreadyExists" + invalid = "Invalid" #: The requested name is invalid. + already_exists = "AlreadyExists" #: The requested name is already in use. diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py index c64ee92d4c21..4b01ce194f4f 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() - self.format = format + def __init__(self, **kwargs): + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + + +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Application, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.allow_updates = kwargs.get('allow_updates', None) + self.default_version = kwargs.get('default_version', None) + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,17 +213,19 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() - self.id = id - self.version = version + def __init__(self, **kwargs): + super(ApplicationPackageReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.version = kwargs.get('version', None) class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,21 +246,23 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() - self.evaluation_time = evaluation_time - self.results = results - self.error = error + def __init__(self, **kwargs): + super(AutoScaleRun, self).__init__(**kwargs) + self.evaluation_time = kwargs.get('evaluation_time', None) + self.results = kwargs.get('results', None) + self.error = kwargs.get('error', None) class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,18 +279,20 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(AutoScaleRunError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,31 +309,62 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() - self.formula = formula - self.evaluation_interval = evaluation_interval + def __init__(self, **kwargs): + super(AutoScaleSettings, self).__init__(**kwargs) + self.formula = kwargs.get('formula', None) + self.evaluation_interval = kwargs.get('evaluation_interval', None) class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + """ + + _validation = { + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoStorageBaseProperties, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + + +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime """ _validation = { 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, } _attribute_map = { 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() - self.storage_account_id = storage_account_id + def __init__(self, **kwargs): + super(AutoStorageProperties, self).__init__(**kwargs) + self.last_key_sync = kwargs.get('last_key_sync', None) class AutoUserSpecification(Model): @@ -194,94 +387,261 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() - self.scope = scope - self.elevation_level = elevation_level + def __init__(self, **kwargs): + super(AutoUserSpecification, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.elevation_level = kwargs.get('elevation_level', None) -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. +class Resource(Model): + """A definition of an Azure resource. - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'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}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class BatchAccount(Resource): + """Contains information about an Azure Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str - """ - - _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, - 'secondary': {'key': 'secondary', 'type': 'str'}, - } - - def __init__(self): - super(BatchAccountKeys, self).__init__() - self.account_name = None - self.primary = None - self.secondary = None - - -class BatchAccountRegenerateKeyParameters(Model): + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'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}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, **kwargs): + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) + self.pool_allocation_mode = kwargs.get('pool_allocation_mode', None) + self.key_vault_reference = kwargs.get('key_vault_reference', None) + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, + 'secondary': {'key': 'secondary', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BatchAccountKeys, self).__init__(**kwargs) + self.account_name = None + self.primary = None + self.secondary = None + + +class BatchAccountRegenerateKeyParameters(Model): """Parameters supplied to the RegenerateKey operation. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ @@ -293,9 +653,9 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() - self.key_name = key_name + def __init__(self, **kwargs): + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) class BatchAccountUpdateParameters(Model): @@ -312,10 +672,10 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() - self.tags = tags - self.auto_storage = auto_storage + def __init__(self, **kwargs): + super(BatchAccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) class BatchLocationQuota(Model): @@ -337,11 +697,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs): + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, **kwargs): + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,35 +812,101 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format + def __init__(self, **kwargs): + super(CertificateBaseProperties, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. - This must exist inside the same account as the pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. - :type id: str - :param store_location: The location of the certificate store on the - compute node into which to install the certificate. The default value is - currentUser. This property is applicable only for pools configured with - Windows nodes (that is, created with cloudServiceConfiguration, or with - virtualMachineConfiguration using a Windows image reference). For Linux - compute nodes, the certificates are stored in a directory inside the task - working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - supplied to the task to query for this location. For certificates with - visibility of 'remoteUser', a 'certs' directory is created in the user's - home directory (e.g., /home/{user-name}/certs) and certificates are placed - in that directory. Possible values include: 'CurrentUser', 'LocalMachine' - :type store_location: str or - ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: The name of the certificate store on the compute node - into which to install the certificate. This property is applicable only + 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 ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.data = kwargs.get('data', None) + self.password = kwargs.get('password', None) + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. + This must exist inside the same account as the pool. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. + :type id: str + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' + :type store_location: str or + ~azure.mgmt.batch.models.CertificateStoreLocation + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, @@ -415,12 +930,12 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() - self.id = id - self.store_location = store_location - self.store_name = store_name - self.visibility = visibility + def __init__(self, **kwargs): + super(CertificateReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.store_location = kwargs.get('store_location', None) + self.store_name = kwargs.get('store_name', None) + self.visibility = kwargs.get('visibility', None) class CheckNameAvailabilityParameters(Model): @@ -429,9 +944,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,9 +966,9 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) class CheckNameAvailabilityResult(Model): @@ -485,23 +1002,85 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', 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 CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,10 +1098,10 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() - self.os_family = os_family - self.os_version = os_version + def __init__(self, **kwargs): + super(CloudServiceConfiguration, self).__init__(**kwargs) + self.os_family = kwargs.get('os_family', None) + self.os_version = kwargs.get('os_version', None) class ContainerConfiguration(Model): @@ -531,7 +1110,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,21 +1140,23 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() - self.container_image_names = container_image_names - self.container_registries = container_registries + def __init__(self, **kwargs): + super(ContainerConfiguration, self).__init__(**kwargs) + self.container_image_names = kwargs.get('container_image_names', None) + self.container_registries = kwargs.get('container_registries', None) class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,20 +1171,22 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() - self.registry_server = registry_server - self.user_name = user_name - self.password = password + def __init__(self, **kwargs): + super(ContainerRegistry, self).__init__(**kwargs) + self.registry_server = kwargs.get('registry_server', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) class DataDisk(Model): """Data Disk settings which will be used by the data disks associated to Compute Nodes in the pool. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1198,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,22 +1223,24 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() - self.lun = lun - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,12 +1261,12 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() - self.code = code - self.message = message - self.target = target - self.details = details + def __init__(self, **kwargs): + super(DeleteCertificateError, 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 DeploymentConfiguration(Model): @@ -704,16 +1291,18 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() - self.cloud_service_configuration = cloud_service_configuration - self.virtual_machine_configuration = virtual_machine_configuration + def __init__(self, **kwargs): + super(DeploymentConfiguration, self).__init__(**kwargs) + self.cloud_service_configuration = kwargs.get('cloud_service_configuration', None) + self.virtual_machine_configuration = kwargs.get('virtual_machine_configuration', None) class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,10 +1317,10 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(EnvironmentSetting, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) class FixedScaleSettings(Model): @@ -767,12 +1356,12 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() - self.resize_timeout = resize_timeout - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.node_deallocation_option = node_deallocation_option + def __init__(self, **kwargs): + super(FixedScaleSettings, self).__init__(**kwargs) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) class ImageReference(Model): @@ -815,43 +1404,45 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version - self.id = id + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + self.id = kwargs.get('id', None) class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,24 +1477,26 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() - self.name = name - self.protocol = protocol - self.backend_port = backend_port - self.frontend_port_range_start = frontend_port_range_start - self.frontend_port_range_end = frontend_port_range_end - self.network_security_group_rules = network_security_group_rules + def __init__(self, **kwargs): + super(InboundNatPool, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.protocol = kwargs.get('protocol', None) + self.backend_port = kwargs.get('backend_port', None) + self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) + self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) + self.network_security_group_rules = kwargs.get('network_security_group_rules', None) class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,10 +1510,10 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() - self.id = id - self.url = url + def __init__(self, **kwargs): + super(KeyVaultReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.url = kwargs.get('url', None) class LinuxUserConfiguration(Model): @@ -951,11 +1544,11 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() - self.uid = uid - self.gid = gid - self.ssh_private_key = ssh_private_key + def __init__(self, **kwargs): + super(LinuxUserConfiguration, self).__init__(**kwargs) + self.uid = kwargs.get('uid', None) + self.gid = kwargs.get('gid', None) + self.ssh_private_key = kwargs.get('ssh_private_key', None) class MetadataItem(Model): @@ -964,9 +1557,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,10 +1575,10 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(MetadataItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) class NetworkConfiguration(Model): @@ -1027,31 +1622,34 @@ class NetworkConfiguration(Model): 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() - self.subnet_id = subnet_id - self.endpoint_configuration = endpoint_configuration + def __init__(self, **kwargs): + super(NetworkConfiguration, self).__init__(**kwargs) + self.subnet_id = kwargs.get('subnet_id', None) + self.endpoint_configuration = kwargs.get('endpoint_configuration', None) class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str """ @@ -1067,11 +1665,11 @@ class NetworkSecurityGroupRule(Model): 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() - self.priority = priority - self.access = access - self.source_address_prefix = source_address_prefix + def __init__(self, **kwargs): + super(NetworkSecurityGroupRule, self).__init__(**kwargs) + self.priority = kwargs.get('priority', None) + self.access = kwargs.get('access', None) + self.source_address_prefix = kwargs.get('source_address_prefix', None) class Operation(Model): @@ -1095,12 +1693,12 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) class OperationDisplay(Model): @@ -1124,40 +1722,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools - - -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,6 +1744,123 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus """ _validation = { @@ -1177,6 +1868,16 @@ class ProxyResource(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { @@ -1184,24 +1885,96 @@ class ProxyResource(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, } - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None + def __init__(self, **kwargs): + super(Pool, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = kwargs.get('vm_size', None) + self.deployment_configuration = kwargs.get('deployment_configuration', None) + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = kwargs.get('scale_settings', None) + self.auto_scale_run = None + self.inter_node_communication = kwargs.get('inter_node_communication', None) + self.network_configuration = kwargs.get('network_configuration', None) + self.max_tasks_per_node = kwargs.get('max_tasks_per_node', None) + self.task_scheduling_policy = kwargs.get('task_scheduling_policy', None) + self.user_accounts = kwargs.get('user_accounts', None) + self.metadata = kwargs.get('metadata', None) + self.start_task = kwargs.get('start_task', None) + self.certificates = kwargs.get('certificates', None) + self.application_packages = kwargs.get('application_packages', None) + self.application_licenses = kwargs.get('application_licenses', None) + self.resize_operation_status = None + + +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. + + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] + """ + + _validation = { + 'inbound_nat_pools': {'required': True}, + } + + _attribute_map = { + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, + } + + def __init__(self, **kwargs): + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = kwargs.get('inbound_nat_pools', None) class ResizeError(Model): """An error that occurred when resizing a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.ResizeError] @@ -1218,11 +1991,11 @@ class ResizeError(Model): 'details': {'key': 'details', 'type': '[ResizeError]'}, } - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(ResizeError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) class ResizeOperationStatus(Model): @@ -1267,57 +2040,14 @@ class ResizeOperationStatus(Model): 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'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}'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None + def __init__(self, **kwargs): + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) + self.start_time = kwargs.get('start_time', None) + self.errors = kwargs.get('errors', None) class ResourceFile(Model): @@ -1333,10 +2063,10 @@ class ResourceFile(Model): httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. :type storage_container_url: str :param http_url: The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are @@ -1383,14 +2113,14 @@ class ResourceFile(Model): 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode + def __init__(self, **kwargs): + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = kwargs.get('auto_storage_container_name', None) + self.storage_container_url = kwargs.get('storage_container_url', None) + self.http_url = kwargs.get('http_url', None) + self.blob_prefix = kwargs.get('blob_prefix', None) + self.file_path = kwargs.get('file_path', None) + self.file_mode = kwargs.get('file_mode', None) class ScaleSettings(Model): @@ -1417,16 +2147,23 @@ class ScaleSettings(Model): 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = kwargs.get('fixed_scale', None) + self.auto_scale = kwargs.get('auto_scale', None) class StartTask(Model): """A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged. + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + :param command_line: The command line of the start task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take @@ -1486,28 +2223,30 @@ class StartTask(Model): 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings + def __init__(self, **kwargs): + super(StartTask, self).__init__(**kwargs) + self.command_line = kwargs.get('command_line', None) + self.resource_files = kwargs.get('resource_files', None) + self.environment_settings = kwargs.get('environment_settings', None) + self.user_identity = kwargs.get('user_identity', None) + self.max_task_retry_count = kwargs.get('max_task_retry_count', None) + self.wait_for_success = kwargs.get('wait_for_success', None) + self.container_settings = kwargs.get('container_settings', None) class TaskContainerSettings(Model): """The container settings for a task. + All required parameters must be populated in order to send to Azure. + :param container_run_options: Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. :type image_name: str :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. @@ -1524,18 +2263,20 @@ class TaskContainerSettings(Model): 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, } - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry + def __init__(self, **kwargs): + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = kwargs.get('container_run_options', None) + self.image_name = kwargs.get('image_name', None) + self.registry = kwargs.get('registry', None) class TaskSchedulingPolicy(Model): """Specifies how tasks should be distributed across compute nodes. - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' + All required parameters must be populated in order to send to Azure. + + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ @@ -1547,17 +2288,19 @@ class TaskSchedulingPolicy(Model): 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type + def __init__(self, **kwargs): + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = kwargs.get('node_fill_type', None) class UserAccount(Model): """Properties used to create a user on an Azure Batch node. - :param name: The name of the user account. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the user account. :type name: str - :param password: The password for the user account. + :param password: Required. The password for the user account. :type password: str :param elevation_level: The elevation level of the user account. nonAdmin - The auto user is a standard user without elevated access. admin - The @@ -1591,13 +2334,13 @@ class UserAccount(Model): 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration + def __init__(self, **kwargs): + super(UserAccount, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.password = kwargs.get('password', None) + self.elevation_level = kwargs.get('elevation_level', None) + self.linux_user_configuration = kwargs.get('linux_user_configuration', None) + self.windows_user_configuration = kwargs.get('windows_user_configuration', None) class UserIdentity(Model): @@ -1620,20 +2363,22 @@ class UserIdentity(Model): 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, } - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + self.auto_user = kwargs.get('auto_user', None) class VirtualMachineConfiguration(Model): """The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure. - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. + All required parameters must be populated in order to send to Azure. + + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be provisioned on compute nodes in the pool. The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. @@ -1682,639 +2427,75 @@ class VirtualMachineConfiguration(Model): 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration - - -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. - - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool - """ - - _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - } - - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates - - -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. - - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode - """ - - _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, - } - - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode + def __init__(self, **kwargs): + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.node_agent_sku_id = kwargs.get('node_agent_sku_id', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.data_disks = kwargs.get('data_disks', None) + self.license_type = kwargs.get('license_type', None) + self.container_configuration = kwargs.get('container_configuration', None) -class Application(ProxyResource): - """Contains information about an application in a Batch account. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version - + def __init__(self, **kwargs): + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode """ - _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, - } - _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync - - -class BatchAccount(Resource): - """Contains information about an Azure Batch account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'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}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, - } - - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None - - -class Certificate(ProxyResource): - """Contains information about a certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, - } - - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None - - -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - - -class Pool(ProxyResource): - """Contains information about a pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, - } - - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, **kwargs): + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = kwargs.get('login_mode', None) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py index c64ee92d4c21..edb71960c6fb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() + def __init__(self, *, format: str, **kwargs) -> None: + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) self.format = format +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, allow_updates: bool=None, default_version: str=None, **kwargs) -> None: + super(Application, self).__init__(**kwargs) + self.display_name = display_name + self.allow_updates = allow_updates + self.default_version = default_version + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None + + class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,8 +213,8 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() + def __init__(self, *, id: str, version: str=None, **kwargs) -> None: + super(ApplicationPackageReference, self).__init__(**kwargs) self.id = id self.version = version @@ -66,8 +222,10 @@ def __init__(self, id, version=None): class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,8 +246,8 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() + def __init__(self, *, evaluation_time, results: str=None, error=None, **kwargs) -> None: + super(AutoScaleRun, self).__init__(**kwargs) self.evaluation_time = evaluation_time self.results = results self.error = error @@ -98,11 +256,13 @@ def __init__(self, evaluation_time, results=None, error=None): class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,8 +279,8 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(AutoScaleRunError, self).__init__(**kwargs) self.code = code self.message = message self.details = details @@ -129,8 +289,10 @@ def __init__(self, code, message, details=None): class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,8 +309,8 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() + def __init__(self, *, formula: str, evaluation_interval=None, **kwargs) -> None: + super(AutoScaleSettings, self).__init__(**kwargs) self.formula = formula self.evaluation_interval = evaluation_interval @@ -156,8 +318,10 @@ def __init__(self, formula, evaluation_interval=None): class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str """ @@ -169,11 +333,40 @@ class AutoStorageBaseProperties(Model): 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() + def __init__(self, *, storage_account_id: str, **kwargs) -> None: + super(AutoStorageBaseProperties, self).__init__(**kwargs) self.storage_account_id = storage_account_id +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime + """ + + _validation = { + 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + } + + def __init__(self, *, storage_account_id: str, last_key_sync, **kwargs) -> None: + super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id, **kwargs) + self.last_key_sync = last_key_sync + + class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. @@ -194,84 +387,249 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() + def __init__(self, *, scope=None, elevation_level=None, **kwargs) -> None: + super(AutoUserSpecification, self).__init__(**kwargs) self.scope = scope self.elevation_level = elevation_level -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. +class Resource(Model): + """A definition of an Azure resource. - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'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}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class BatchAccount(Resource): + """Contains information about an Azure Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str - """ - - _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'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}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, *, location: str, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None, **kwargs) -> None: + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.auto_storage = auto_storage + self.pool_allocation_mode = pool_allocation_mode + self.key_vault_reference = key_vault_reference + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, 'secondary': {'key': 'secondary', 'type': 'str'}, } - def __init__(self): - super(BatchAccountKeys, self).__init__() + def __init__(self, **kwargs) -> None: + super(BatchAccountKeys, self).__init__(**kwargs) self.account_name = None self.primary = None self.secondary = None @@ -280,8 +638,10 @@ def __init__(self): class BatchAccountRegenerateKeyParameters(Model): """Parameters supplied to the RegenerateKey operation. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ @@ -293,8 +653,8 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() + def __init__(self, *, key_name, **kwargs) -> None: + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) self.key_name = key_name @@ -312,8 +672,8 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() + def __init__(self, *, tags=None, auto_storage=None, **kwargs) -> None: + super(BatchAccountUpdateParameters, self).__init__(**kwargs) self.tags = tags self.auto_storage = auto_storage @@ -337,11 +697,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs) -> None: + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,36 +812,102 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(CertificateBaseProperties, self).__init__(**kwargs) self.thumbprint_algorithm = thumbprint_algorithm self.thumbprint = thumbprint self.format = format -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. - This must exist inside the same account as the pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. - :type id: str - :param store_location: The location of the certificate store on the - compute node into which to install the certificate. The default value is - currentUser. This property is applicable only for pools configured with - Windows nodes (that is, created with cloudServiceConfiguration, or with - virtualMachineConfiguration using a Windows image reference). For Linux - compute nodes, the certificates are stored in a directory inside the task - working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - supplied to the task to query for this location. For certificates with - visibility of 'remoteUser', a 'certs' directory is created in the user's - home directory (e.g., /home/{user-name}/certs) and certificates are placed - in that directory. Possible values include: 'CurrentUser', 'LocalMachine' - :type store_location: str or - ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: The name of the certificate store on the compute node - into which to install the certificate. This property is applicable only - for pools configured with Windows nodes (that is, created with + 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 ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, data: str, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, password: str=None, **kwargs) -> None: + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.data = data + self.password = password + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. + This must exist inside the same account as the pool. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. + :type id: str + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' + :type store_location: str or + ~azure.mgmt.batch.models.CertificateStoreLocation + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only + for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but @@ -415,8 +930,8 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() + def __init__(self, *, id: str, store_location=None, store_name: str=None, visibility=None, **kwargs) -> None: + super(CertificateReference, self).__init__(**kwargs) self.id = id self.store_location = store_location self.store_name = store_name @@ -429,9 +944,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,8 +966,8 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) self.name = name @@ -485,23 +1002,85 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +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 CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,8 +1098,8 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() + def __init__(self, *, os_family: str, os_version: str=None, **kwargs) -> None: + super(CloudServiceConfiguration, self).__init__(**kwargs) self.os_family = os_family self.os_version = os_version @@ -531,7 +1110,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,8 +1140,8 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() + def __init__(self, *, container_image_names=None, container_registries=None, **kwargs) -> None: + super(ContainerConfiguration, self).__init__(**kwargs) self.container_image_names = container_image_names self.container_registries = container_registries @@ -568,12 +1149,14 @@ def __init__(self, container_image_names=None, container_registries=None): class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,8 +1171,8 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() + def __init__(self, *, user_name: str, password: str, registry_server: str=None, **kwargs) -> None: + super(ContainerRegistry, self).__init__(**kwargs) self.registry_server = registry_server self.user_name = user_name self.password = password @@ -599,9 +1182,11 @@ class DataDisk(Model): """Data Disk settings which will be used by the data disks associated to Compute Nodes in the pool. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1198,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,8 +1223,8 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() + def __init__(self, *, lun: int, disk_size_gb: int, caching=None, storage_account_type=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) self.lun = lun self.caching = caching self.disk_size_gb = disk_size_gb @@ -649,11 +1234,13 @@ def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,8 +1261,8 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() + def __init__(self, *, code: str, message: str, target: str=None, details=None, **kwargs) -> None: + super(DeleteCertificateError, self).__init__(**kwargs) self.code = code self.message = message self.target = target @@ -704,8 +1291,8 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() + def __init__(self, *, cloud_service_configuration=None, virtual_machine_configuration=None, **kwargs) -> None: + super(DeploymentConfiguration, self).__init__(**kwargs) self.cloud_service_configuration = cloud_service_configuration self.virtual_machine_configuration = virtual_machine_configuration @@ -713,7 +1300,9 @@ def __init__(self, cloud_service_configuration=None, virtual_machine_configurati class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,8 +1317,8 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() + def __init__(self, *, name: str, value: str=None, **kwargs) -> None: + super(EnvironmentSetting, self).__init__(**kwargs) self.name = name self.value = value @@ -767,8 +1356,8 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() + def __init__(self, *, resize_timeout=None, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, node_deallocation_option=None, **kwargs) -> None: + super(FixedScaleSettings, self).__init__(**kwargs) self.resize_timeout = resize_timeout self.target_dedicated_nodes = target_dedicated_nodes self.target_low_priority_nodes = target_low_priority_nodes @@ -815,8 +1404,8 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() + def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, id: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(**kwargs) self.publisher = publisher self.offer = offer self.sku = sku @@ -828,30 +1417,32 @@ class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,8 +1477,8 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() + def __init__(self, *, name: str, protocol, backend_port: int, frontend_port_range_start: int, frontend_port_range_end: int, network_security_group_rules=None, **kwargs) -> None: + super(InboundNatPool, self).__init__(**kwargs) self.name = name self.protocol = protocol self.backend_port = backend_port @@ -899,11 +1490,13 @@ def __init__(self, name, protocol, backend_port, frontend_port_range_start, fron class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,8 +1510,8 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() + def __init__(self, *, id: str, url: str, **kwargs) -> None: + super(KeyVaultReference, self).__init__(**kwargs) self.id = id self.url = url @@ -951,8 +1544,8 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() + def __init__(self, *, uid: int=None, gid: int=None, ssh_private_key: str=None, **kwargs) -> None: + super(LinuxUserConfiguration, self).__init__(**kwargs) self.uid = uid self.gid = gid self.ssh_private_key = ssh_private_key @@ -964,9 +1557,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,8 +1575,8 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(MetadataItem, self).__init__(**kwargs) self.name = name self.value = value @@ -1027,8 +1622,8 @@ class NetworkConfiguration(Model): 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() + def __init__(self, *, subnet_id: str=None, endpoint_configuration=None, **kwargs) -> None: + super(NetworkConfiguration, self).__init__(**kwargs) self.subnet_id = subnet_id self.endpoint_configuration = endpoint_configuration @@ -1036,22 +1631,25 @@ def __init__(self, subnet_id=None, endpoint_configuration=None): class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str """ @@ -1067,8 +1665,8 @@ class NetworkSecurityGroupRule(Model): 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() + def __init__(self, *, priority: int, access, source_address_prefix: str, **kwargs) -> None: + super(NetworkSecurityGroupRule, self).__init__(**kwargs) self.priority = priority self.access = access self.source_address_prefix = source_address_prefix @@ -1095,8 +1693,8 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) self.name = name self.display = display self.origin = origin @@ -1124,40 +1722,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) self.provider = provider self.operation = operation self.resource = resource self.description = description -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools - - -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,1151 +1744,758 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None - - -class ResizeError(Model): - """An error that occurred when resizing a pool. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param details: Additional details about the error. - :type details: list[~azure.mgmt.batch.models.ResizeError] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ResizeError]'}, - } - - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details - - -class ResizeOperationStatus(Model): - """Details about the current or last completed resize operation. - - Describes either the current operation (if the pool AllocationState is - Resizing) or the previously completed operation (if the AllocationState is - Steady). - - :param target_dedicated_nodes: The desired number of dedicated compute - nodes in the pool. - :type target_dedicated_nodes: int - :param target_low_priority_nodes: The desired number of low-priority - compute nodes in the pool. - :type target_low_priority_nodes: int - :param resize_timeout: The timeout for allocation of compute nodes to the - pool or removal of compute nodes from the pool. The default value is 15 - minutes. The minimum value is 5 minutes. If you specify a value less than - 5 minutes, the Batch service returns an error; if you are calling the REST - API directly, the HTTP status code is 400 (Bad Request). - :type resize_timeout: timedelta - :param node_deallocation_option: Determines what to do with a node and its - running task(s) if the pool size is decreasing. The default value is - requeue. Possible values include: 'Requeue', 'Terminate', - 'TaskCompletion', 'RetainedData' - :type node_deallocation_option: str or - ~azure.mgmt.batch.models.ComputeNodeDeallocationOption - :param start_time: The time when this resize operation was started. - :type start_time: datetime - :param errors: Details of any errors encountered while performing the last - resize on the pool. This property is set only if an error occurred during - the last pool resize, and only when the pool allocationState is Steady. - :type errors: list[~azure.mgmt.batch.models.ResizeError] - """ - - _attribute_map = { - 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, - 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, - 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, - 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[ResizeError]'}, - } - - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'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}'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None - - -class ResourceFile(Model): - """A single file or multiple files to be downloaded to a compute node. - - :param auto_storage_container_name: The storage container name in the auto - storage account. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. - :type auto_storage_container_name: str - :param storage_container_url: The URL of the blob container within Azure - Blob Storage. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. This URL must be readable and listable using anonymous access; - that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. - :type storage_container_url: str - :param http_url: The URL of the file to download. The - autoStorageContainerName, storageContainerUrl and httpUrl properties are - mutually exclusive and one of them must be specified. If the URL is Azure - Blob Storage, it must be readable using anonymous access; that is, the - Batch service does not present any credentials when downloading the blob. - There are two ways to get such a URL for a blob in Azure storage: include - a Shared Access Signature (SAS) granting read permissions on the blob, or - set the ACL for the blob or its container to allow public access. - :type http_url: str - :param blob_prefix: The blob prefix to use when downloading blobs from an - Azure Storage container. Only the blobs whose names begin with the - specified prefix will be downloaded. The property is valid only when - autoStorageContainerName or storageContainerUrl is used. This prefix can - be a partial filename or a subdirectory. If a prefix is not specified, all - the files in the container will be downloaded. - :type blob_prefix: str - :param file_path: The location on the compute node to which to download - the file, relative to the task's working directory. If the httpUrl - property is specified, the filePath is required and describes the path - which the file will be downloaded to, including the filename. Otherwise, - if the autoStorageContainerName or storageContainerUrl property is - specified, filePath is optional and is the directory to download the files - to. In the case where filePath is used as a directory, any directory - structure already associated with the input data will be retained in full - and appended to the specified filePath directory. The specified relative - path cannot break out of the task's working directory (for example by - using '..'). - :type file_path: str - :param file_mode: The file permission mode attribute in octal format. This - property applies only to files being downloaded to Linux compute nodes. It - will be ignored if it is specified for a resourceFile which will be - downloaded to a Windows node. If this property is not specified for a - Linux node, then a default value of 0770 is applied to the file. - :type file_mode: str - """ - - _attribute_map = { - 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, - 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, - 'http_url': {'key': 'httpUrl', 'type': 'str'}, - 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - 'file_mode': {'key': 'fileMode', 'type': 'str'}, - } - - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode - - -class ScaleSettings(Model): - """Scale settings for the pool. - - Defines the desired size of the pool. This can either be 'fixedScale' where - the requested targetDedicatedNodes is specified, or 'autoScale' which - defines a formula which is periodically reevaluated. If this property is - not specified, the pool will have a fixed scale with 0 - targetDedicatedNodes. - - :param fixed_scale: Fixed scale settings for the pool. This property and - autoScale are mutually exclusive and one of the properties must be - specified. - :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings - :param auto_scale: AutoScale settings for the pool. This property and - fixedScale are mutually exclusive and one of the properties must be - specified. - :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings - """ - - _attribute_map = { - 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, - 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, - } - - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale - - -class StartTask(Model): - """A task which is run when a compute node joins a pool in the Azure Batch - service, or when the compute node is rebooted or reimaged. - - :param command_line: The command line of the start task. The command line - does not run under a shell, and therefore cannot take advantage of shell - features such as environment variable expansion. If you want to take - advantage of such features, you should invoke the shell in the command - line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - MyCommand" in Linux. Required if any other properties of the startTask are - specified. - :type command_line: str - :param resource_files: A list of files that the Batch service will - download to the compute node before running the command line. - :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] - :param environment_settings: A list of environment variable settings for - the start task. - :type environment_settings: - list[~azure.mgmt.batch.models.EnvironmentSetting] - :param user_identity: The user identity under which the start task runs. - If omitted, the task runs as a non-administrative user unique to the task. - :type user_identity: ~azure.mgmt.batch.models.UserIdentity - :param max_task_retry_count: The maximum number of times the task may be - retried. The Batch service retries a task if its exit code is nonzero. - Note that this value specifically controls the number of retries. The - Batch service will try the task once, and may then retry up to this limit. - For example, if the maximum retry count is 3, Batch tries the task up to 4 - times (one initial try and 3 retries). If the maximum retry count is 0, - the Batch service does not retry the task. If the maximum retry count is - -1, the Batch service retries the task without limit. - :type max_task_retry_count: int - :param wait_for_success: Whether the Batch service should wait for the - start task to complete successfully (that is, to exit with exit code 0) - before scheduling any tasks on the compute node. If true and the start - task fails on a compute node, the Batch service retries the start task up - to its maximum retry count (maxTaskRetryCount). If the task has still not - completed successfully after all retries, then the Batch service marks the - compute node unusable, and will not schedule tasks to it. This condition - can be detected via the node state and scheduling error detail. If false, - the Batch service will not wait for the start task to complete. In this - case, other tasks can start executing on the compute node while the start - task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. - :type wait_for_success: bool - :param container_settings: The settings for the container under which the - start task runs. When this is specified, all directories recursively below - the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the - node) are mapped into the container, all task environment variables are - mapped into the container, and the task command line is executed in the - container. - :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings - """ - - _attribute_map = { - 'command_line': {'key': 'commandLine', 'type': 'str'}, - 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, - 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, - 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, - 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, - 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, - 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, - } - - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings - - -class TaskContainerSettings(Model): - """The container settings for a task. - - :param container_run_options: Additional options to the container create - command. These additional options are supplied as arguments to the "docker - create" command, in addition to those controlled by the Batch Service. - :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. - :type image_name: str - :param registry: The private registry which contains the container image. - This setting can be omitted if was already provided at pool creation. - :type registry: ~azure.mgmt.batch.models.ContainerRegistry - """ - - _validation = { - 'image_name': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { - 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, } - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry + def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, **kwargs) -> None: + super(Pool, self).__init__(**kwargs) + self.display_name = display_name + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = vm_size + self.deployment_configuration = deployment_configuration + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = scale_settings + self.auto_scale_run = None + self.inter_node_communication = inter_node_communication + self.network_configuration = network_configuration + self.max_tasks_per_node = max_tasks_per_node + self.task_scheduling_policy = task_scheduling_policy + self.user_accounts = user_accounts + self.metadata = metadata + self.start_task = start_task + self.certificates = certificates + self.application_packages = application_packages + self.application_licenses = application_licenses + self.resize_operation_status = None -class TaskSchedulingPolicy(Model): - """Specifies how tasks should be distributed across compute nodes. +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' - :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] """ _validation = { - 'node_fill_type': {'required': True}, + 'inbound_nat_pools': {'required': True}, } _attribute_map = { - 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, } - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type + def __init__(self, *, inbound_nat_pools, **kwargs) -> None: + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = inbound_nat_pools -class UserAccount(Model): - """Properties used to create a user on an Azure Batch node. +class ResizeError(Model): + """An error that occurred when resizing a pool. - :param name: The name of the user account. - :type name: str - :param password: The password for the user account. - :type password: str - :param elevation_level: The elevation level of the user account. nonAdmin - - The auto user is a standard user without elevated access. admin - The - auto user is a user with elevated access and operates with full - Administrator permissions. The default value is nonAdmin. Possible values - include: 'NonAdmin', 'Admin' - :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel - :param linux_user_configuration: The Linux-specific user configuration for - the user account. This property is ignored if specified on a Windows pool. - If not specified, the user is created with the default options. - :type linux_user_configuration: - ~azure.mgmt.batch.models.LinuxUserConfiguration - :param windows_user_configuration: The Windows-specific user configuration - for the user account. This property can only be specified if the user is - on a Windows pool. If not specified and on a Windows pool, the user is - created with the default options. - :type windows_user_configuration: - ~azure.mgmt.batch.models.WindowsUserConfiguration + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. + :type code: str + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. + :type message: str + :param details: Additional details about the error. + :type details: list[~azure.mgmt.batch.models.ResizeError] """ _validation = { - 'name': {'required': True}, - 'password': {'required': True}, + 'code': {'required': True}, + 'message': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, - 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, - 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ResizeError]'}, } - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(ResizeError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details -class UserIdentity(Model): - """The definition of the user identity under which the task is run. +class ResizeOperationStatus(Model): + """Details about the current or last completed resize operation. - Specify either the userName or autoUser property, but not both. + Describes either the current operation (if the pool AllocationState is + Resizing) or the previously completed operation (if the AllocationState is + Steady). - :param user_name: The name of the user identity under which the task is - run. The userName and autoUser properties are mutually exclusive; you must - specify one but not both. - :type user_name: str - :param auto_user: The auto user under which the task is run. The userName - and autoUser properties are mutually exclusive; you must specify one but - not both. - :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification + :param target_dedicated_nodes: The desired number of dedicated compute + nodes in the pool. + :type target_dedicated_nodes: int + :param target_low_priority_nodes: The desired number of low-priority + compute nodes in the pool. + :type target_low_priority_nodes: int + :param resize_timeout: The timeout for allocation of compute nodes to the + pool or removal of compute nodes from the pool. The default value is 15 + minutes. The minimum value is 5 minutes. If you specify a value less than + 5 minutes, the Batch service returns an error; if you are calling the REST + API directly, the HTTP status code is 400 (Bad Request). + :type resize_timeout: timedelta + :param node_deallocation_option: Determines what to do with a node and its + running task(s) if the pool size is decreasing. The default value is + requeue. Possible values include: 'Requeue', 'Terminate', + 'TaskCompletion', 'RetainedData' + :type node_deallocation_option: str or + ~azure.mgmt.batch.models.ComputeNodeDeallocationOption + :param start_time: The time when this resize operation was started. + :type start_time: datetime + :param errors: Details of any errors encountered while performing the last + resize on the pool. This property is set only if an error occurred during + the last pool resize, and only when the pool allocationState is Steady. + :type errors: list[~azure.mgmt.batch.models.ResizeError] """ _attribute_map = { - 'user_name': {'key': 'userName', 'type': 'str'}, - 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, + 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, + 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, + 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, + 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user + def __init__(self, *, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None, **kwargs) -> None: + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = target_dedicated_nodes + self.target_low_priority_nodes = target_low_priority_nodes + self.resize_timeout = resize_timeout + self.node_deallocation_option = node_deallocation_option + self.start_time = start_time + self.errors = errors -class VirtualMachineConfiguration(Model): - """The configuration for compute nodes in a pool based on the Azure Virtual - Machines infrastructure. +class ResourceFile(Model): + """A single file or multiple files to be downloaded to a compute node. - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. - :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be - provisioned on compute nodes in the pool. The Batch node agent is a - program that runs on each node in the pool, and provides the - command-and-control interface between the node and the Batch service. - There are different implementations of the node agent, known as SKUs, for - different operating systems. You must specify a node agent SKU which - matches the selected image reference. To get the list of supported node - agent SKUs along with their list of verified image references, see the - 'List supported node agent SKUs' operation. - :type node_agent_sku_id: str - :param windows_configuration: Windows operating system settings on the - virtual machine. This property must not be specified if the imageReference - specifies a Linux OS image. - :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration - :param data_disks: The configuration for data disks attached to the - compute nodes in the pool. This property must be specified if the compute - nodes in the pool need to have empty data disks attached to them. - :type data_disks: list[~azure.mgmt.batch.models.DataDisk] - :param license_type: The type of on-premises license to be used when - deploying the operating system. This only applies to images that contain - the Windows operating system, and should only be used when you hold valid - on-premises licenses for the nodes which will be deployed. If omitted, no - on-premises licensing discount is applied. Values are: - Windows_Server - The on-premises license is for Windows Server. - Windows_Client - The on-premises license is for Windows Client. - :type license_type: str - :param container_configuration: The container configuration for the pool. - If specified, setup is performed on each node in the pool to allow tasks - to run in containers. All regular tasks and job manager tasks run on this - pool must specify the containerSettings property, and all other tasks may - specify it. - :type container_configuration: - ~azure.mgmt.batch.models.ContainerConfiguration + :param auto_storage_container_name: The storage container name in the auto + storage account. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. + :type auto_storage_container_name: str + :param storage_container_url: The URL of the blob container within Azure + Blob Storage. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. This URL must be readable and listable using anonymous access; + that is, the Batch service does not present any credentials when + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. + :type storage_container_url: str + :param http_url: The URL of the file to download. The + autoStorageContainerName, storageContainerUrl and httpUrl properties are + mutually exclusive and one of them must be specified. If the URL is Azure + Blob Storage, it must be readable using anonymous access; that is, the + Batch service does not present any credentials when downloading the blob. + There are two ways to get such a URL for a blob in Azure storage: include + a Shared Access Signature (SAS) granting read permissions on the blob, or + set the ACL for the blob or its container to allow public access. + :type http_url: str + :param blob_prefix: The blob prefix to use when downloading blobs from an + Azure Storage container. Only the blobs whose names begin with the + specified prefix will be downloaded. The property is valid only when + autoStorageContainerName or storageContainerUrl is used. This prefix can + be a partial filename or a subdirectory. If a prefix is not specified, all + the files in the container will be downloaded. + :type blob_prefix: str + :param file_path: The location on the compute node to which to download + the file, relative to the task's working directory. If the httpUrl + property is specified, the filePath is required and describes the path + which the file will be downloaded to, including the filename. Otherwise, + if the autoStorageContainerName or storageContainerUrl property is + specified, filePath is optional and is the directory to download the files + to. In the case where filePath is used as a directory, any directory + structure already associated with the input data will be retained in full + and appended to the specified filePath directory. The specified relative + path cannot break out of the task's working directory (for example by + using '..'). + :type file_path: str + :param file_mode: The file permission mode attribute in octal format. This + property applies only to files being downloaded to Linux compute nodes. It + will be ignored if it is specified for a resourceFile which will be + downloaded to a Windows node. If this property is not specified for a + Linux node, then a default value of 0770 is applied to the file. + :type file_mode: str """ - _validation = { - 'image_reference': {'required': True}, - 'node_agent_sku_id': {'required': True}, - } - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, + 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, + 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, + 'http_url': {'key': 'httpUrl', 'type': 'str'}, + 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration + def __init__(self, *, auto_storage_container_name: str=None, storage_container_url: str=None, http_url: str=None, blob_prefix: str=None, file_path: str=None, file_mode: str=None, **kwargs) -> None: + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = auto_storage_container_name + self.storage_container_url = storage_container_url + self.http_url = http_url + self.blob_prefix = blob_prefix + self.file_path = file_path + self.file_mode = file_mode -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. +class ScaleSettings(Model): + """Scale settings for the pool. - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool + Defines the desired size of the pool. This can either be 'fixedScale' where + the requested targetDedicatedNodes is specified, or 'autoScale' which + defines a formula which is periodically reevaluated. If this property is + not specified, the pool will have a fixed scale with 0 + targetDedicatedNodes. + + :param fixed_scale: Fixed scale settings for the pool. This property and + autoScale are mutually exclusive and one of the properties must be + specified. + :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings + :param auto_scale: AutoScale settings for the pool. This property and + fixedScale are mutually exclusive and one of the properties must be + specified. + :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings """ _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, + 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates + def __init__(self, *, fixed_scale=None, auto_scale=None, **kwargs) -> None: + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = fixed_scale + self.auto_scale = auto_scale -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. +class StartTask(Model): + """A task which is run when a compute node joins a pool in the Azure Batch + service, or when the compute node is rebooted or reimaged. - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + + :param command_line: The command line of the start task. The command line + does not run under a shell, and therefore cannot take advantage of shell + features such as environment variable expansion. If you want to take + advantage of such features, you should invoke the shell in the command + line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c + MyCommand" in Linux. Required if any other properties of the startTask are + specified. + :type command_line: str + :param resource_files: A list of files that the Batch service will + download to the compute node before running the command line. + :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] + :param environment_settings: A list of environment variable settings for + the start task. + :type environment_settings: + list[~azure.mgmt.batch.models.EnvironmentSetting] + :param user_identity: The user identity under which the start task runs. + If omitted, the task runs as a non-administrative user unique to the task. + :type user_identity: ~azure.mgmt.batch.models.UserIdentity + :param max_task_retry_count: The maximum number of times the task may be + retried. The Batch service retries a task if its exit code is nonzero. + Note that this value specifically controls the number of retries. The + Batch service will try the task once, and may then retry up to this limit. + For example, if the maximum retry count is 3, Batch tries the task up to 4 + times (one initial try and 3 retries). If the maximum retry count is 0, + the Batch service does not retry the task. If the maximum retry count is + -1, the Batch service retries the task without limit. + :type max_task_retry_count: int + :param wait_for_success: Whether the Batch service should wait for the + start task to complete successfully (that is, to exit with exit code 0) + before scheduling any tasks on the compute node. If true and the start + task fails on a compute node, the Batch service retries the start task up + to its maximum retry count (maxTaskRetryCount). If the task has still not + completed successfully after all retries, then the Batch service marks the + compute node unusable, and will not schedule tasks to it. This condition + can be detected via the node state and scheduling error detail. If false, + the Batch service will not wait for the start task to complete. In this + case, other tasks can start executing on the compute node while the start + task is still running; and even if the start task fails, new tasks will + continue to be scheduled on the node. The default is false. + :type wait_for_success: bool + :param container_settings: The settings for the container under which the + start task runs. When this is specified, all directories recursively below + the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the + node) are mapped into the container, all task environment variables are + mapped into the container, and the task command line is executed in the + container. + :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings """ _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, + 'command_line': {'key': 'commandLine', 'type': 'str'}, + 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, + 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, + 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, + 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, + 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, + 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode + def __init__(self, *, command_line: str=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count: int=None, wait_for_success: bool=None, container_settings=None, **kwargs) -> None: + super(StartTask, self).__init__(**kwargs) + self.command_line = command_line + self.resource_files = resource_files + self.environment_settings = environment_settings + self.user_identity = user_identity + self.max_task_retry_count = max_task_retry_count + self.wait_for_success = wait_for_success + self.container_settings = container_settings -class Application(ProxyResource): - """Contains information about an application in a Batch account. +class TaskContainerSettings(Model): + """The container settings for a task. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str + :param container_run_options: Additional options to the container create + command. These additional options are supplied as arguments to the "docker + create" command, in addition to those controlled by the Batch Service. + :type container_run_options: str + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. + :type image_name: str + :param registry: The private registry which contains the container image. + This setting can be omitted if was already provided at pool creation. + :type registry: ~azure.mgmt.batch.models.ContainerRegistry """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'image_name': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, } - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version + def __init__(self, *, image_name: str, container_run_options: str=None, registry=None, **kwargs) -> None: + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = container_run_options + self.image_name = image_name + self.registry = registry -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. +class TaskSchedulingPolicy(Model): + """Specifies how tasks should be distributed across compute nodes. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' + :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, + 'node_fill_type': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, *, node_fill_type, **kwargs) -> None: + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = node_fill_type -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class UserAccount(Model): + """Properties used to create a user on an Azure Batch node. + + All required parameters must be populated in order to send to Azure. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + :param name: Required. The name of the user account. + :type name: str + :param password: Required. The password for the user account. + :type password: str + :param elevation_level: The elevation level of the user account. nonAdmin + - The auto user is a standard user without elevated access. admin - The + auto user is a user with elevated access and operates with full + Administrator permissions. The default value is nonAdmin. Possible values + include: 'NonAdmin', 'Admin' + :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel + :param linux_user_configuration: The Linux-specific user configuration for + the user account. This property is ignored if specified on a Windows pool. + If not specified, the user is created with the default options. + :type linux_user_configuration: + ~azure.mgmt.batch.models.LinuxUserConfiguration + :param windows_user_configuration: The Windows-specific user configuration + for the user account. This property can only be specified if the user is + on a Windows pool. If not specified and on a Windows pool, the user is + created with the default options. + :type windows_user_configuration: + ~azure.mgmt.batch.models.WindowsUserConfiguration """ _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, + 'name': {'required': True}, + 'password': {'required': True}, } _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, + 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, + 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync + def __init__(self, *, name: str, password: str, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None, **kwargs) -> None: + super(UserAccount, self).__init__(**kwargs) + self.name = name + self.password = password + self.elevation_level = elevation_level + self.linux_user_configuration = linux_user_configuration + self.windows_user_configuration = windows_user_configuration -class BatchAccount(Resource): - """Contains information about an Azure Batch account. +class UserIdentity(Model): + """The definition of the user identity under which the task is run. - Variables are only populated by the server, and will be ignored when - sending a request. + Specify either the userName or autoUser property, but not both. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int + :param user_name: The name of the user identity under which the task is + run. The userName and autoUser properties are mutually exclusive; you must + specify one but not both. + :type user_name: str + :param auto_user: The auto user under which the task is run. The userName + and autoUser properties are mutually exclusive; you must specify one but + not both. + :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'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}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, } - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None + def __init__(self, *, user_name: str=None, auto_user=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.user_name = user_name + self.auto_user = auto_user -class Certificate(ProxyResource): - """Contains information about a certificate. +class VirtualMachineConfiguration(Model): + """The configuration for compute nodes in a pool based on the Azure Virtual + Machines infrastructure. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. + :type image_reference: ~azure.mgmt.batch.models.ImageReference + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be + provisioned on compute nodes in the pool. The Batch node agent is a + program that runs on each node in the pool, and provides the + command-and-control interface between the node and the Batch service. + There are different implementations of the node agent, known as SKUs, for + different operating systems. You must specify a node agent SKU which + matches the selected image reference. To get the list of supported node + agent SKUs along with their list of verified image references, see the + 'List supported node agent SKUs' operation. + :type node_agent_sku_id: str + :param windows_configuration: Windows operating system settings on the + virtual machine. This property must not be specified if the imageReference + specifies a Linux OS image. + :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration + :param data_disks: The configuration for data disks attached to the + compute nodes in the pool. This property must be specified if the compute + nodes in the pool need to have empty data disks attached to them. + :type data_disks: list[~azure.mgmt.batch.models.DataDisk] + :param license_type: The type of on-premises license to be used when + deploying the operating system. This only applies to images that contain + the Windows operating system, and should only be used when you hold valid + on-premises licenses for the nodes which will be deployed. If omitted, no + on-premises licensing discount is applied. Values are: + Windows_Server - The on-premises license is for Windows Server. + Windows_Client - The on-premises license is for Windows Client. + :type license_type: str + :param container_configuration: The container configuration for the pool. + If specified, setup is performed on each node in the pool to allow tasks + to run in containers. All regular tasks and job manager tasks run on this + pool must specify the containerSettings property, and all other tasks may + specify it. + :type container_configuration: + ~azure.mgmt.batch.models.ContainerConfiguration """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, + 'image_reference': {'required': True}, + 'node_agent_sku_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None + def __init__(self, *, image_reference, node_agent_sku_id: str, windows_configuration=None, data_disks=None, license_type: str=None, container_configuration=None, **kwargs) -> None: + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = image_reference + self.node_agent_sku_id = node_agent_sku_id + self.windows_configuration = windows_configuration + self.data_disks = data_disks + self.license_type = license_type + self.container_configuration = container_configuration -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - + def __init__(self, **kwargs) -> None: + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class Pool(ProxyResource): - """Contains information about a pool. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, + _attribute_map = { + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } + def __init__(self, *, enable_automatic_updates: bool=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = enable_automatic_updates + + +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. + + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, *, login_mode=None, **kwargs) -> None: + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = login_mode diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py index 1eb94dd020cd..1865025a41f0 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py @@ -25,8 +25,6 @@ class BatchAccountPaged(Paged): def __init__(self, *args, **kwargs): super(BatchAccountPaged, self).__init__(*args, **kwargs) - - class ApplicationPackagePaged(Paged): """ A paging container for iterating over a list of :class:`ApplicationPackage ` object @@ -40,8 +38,6 @@ class ApplicationPackagePaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPackagePaged, self).__init__(*args, **kwargs) - - class ApplicationPaged(Paged): """ A paging container for iterating over a list of :class:`Application ` object @@ -55,8 +51,6 @@ class ApplicationPaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPaged, self).__init__(*args, **kwargs) - - class OperationPaged(Paged): """ A paging container for iterating over a list of :class:`Operation ` object @@ -70,8 +64,6 @@ class OperationPaged(Paged): def __init__(self, *args, **kwargs): super(OperationPaged, self).__init__(*args, **kwargs) - - class CertificatePaged(Paged): """ A paging container for iterating over a list of :class:`Certificate ` object @@ -85,8 +77,6 @@ class CertificatePaged(Paged): def __init__(self, *args, **kwargs): super(CertificatePaged, self).__init__(*args, **kwargs) - - class PoolPaged(Paged): """ A paging container for iterating over a list of :class:`Pool ` object diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py index 457cbd3470cd..818f748e2734 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py @@ -9,13 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_account_operations import BatchAccountOperations -from .application_package_operations import ApplicationPackageOperations -from .application_operations import ApplicationOperations -from .location_operations import LocationOperations -from .operations import Operations -from .certificate_operations import CertificateOperations -from .pool_operations import PoolOperations +from ._batch_account_operations import BatchAccountOperations +from ._application_package_operations import ApplicationPackageOperations +from ._application_operations import ApplicationOperations +from ._location_operations import LocationOperations +from ._operations import Operations +from ._certificate_operations import CertificateOperations +from ._pool_operations import PoolOperations __all__ = [ 'BatchAccountOperations', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py similarity index 92% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py index b447de1a57b8..2ceacf73cd3c 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py @@ -19,11 +19,13 @@ class ApplicationOperations(object): """ApplicationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -77,6 +79,7 @@ def create( # 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()) @@ -92,9 +95,8 @@ def create( body_content = None # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -102,7 +104,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -150,7 +151,6 @@ def delete( # 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: @@ -159,8 +159,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -210,7 +210,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -219,8 +219,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -228,7 +228,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -279,6 +278,7 @@ def update( # 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()) @@ -291,9 +291,8 @@ def update( body_content = self._serialize.body(parameters, 'Application') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -301,7 +300,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -334,8 +332,7 @@ def list( ~azure.mgmt.batch.models.ApplicationPaged[~azure.mgmt.batch.models.Application] :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'] @@ -358,7 +355,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -367,9 +364,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -379,12 +380,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py similarity index 92% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py index 0823f92e92f0..a3e792b0b3af 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py @@ -19,11 +19,13 @@ class ApplicationPackageOperations(object): """ApplicationPackageOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -82,6 +84,7 @@ def activate( # 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()) @@ -94,9 +97,8 @@ def activate( body_content = self._serialize.body(parameters, 'ActivateApplicationPackageParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -104,7 +106,6 @@ def activate( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -158,6 +159,7 @@ def create( # 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()) @@ -173,9 +175,8 @@ def create( body_content = None # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -183,7 +184,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -234,7 +234,6 @@ def delete( # 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: @@ -243,8 +242,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -297,7 +296,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -306,8 +305,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -315,7 +314,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -351,8 +349,7 @@ def list( ~azure.mgmt.batch.models.ApplicationPackagePaged[~azure.mgmt.batch.models.ApplicationPackage] :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'] @@ -376,7 +373,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -385,9 +382,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -397,12 +398,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py similarity index 84% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py index 70fc40e1b618..635b97d5e875 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class BatchAccountOperations(object): """BatchAccountOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -57,6 +59,7 @@ def _create_initial( # 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()) @@ -69,9 +72,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'BatchAccountCreateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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, 202]: exp = CloudError(response) @@ -90,16 +92,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. @@ -118,13 +117,16 @@ def create( :type parameters: ~azure.mgmt.batch.models.BatchAccountCreateParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns BatchAccount - or ClientRawResponse if raw=true + :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 BatchAccount or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.BatchAccount] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.BatchAccount]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -135,30 +137,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'Location': 'str', 'Retry-After': 'int', @@ -172,12 +152,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} def update( @@ -221,6 +202,7 @@ def update( # 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()) @@ -233,9 +215,8 @@ def update( body_content = self._serialize.body(parameters, 'BatchAccountUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -243,7 +224,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccount', response) @@ -272,7 +252,6 @@ def _delete_initial( # 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: @@ -281,8 +260,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -299,7 +278,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified Batch account. :param resource_group_name: The name of the resource group that @@ -308,12 +287,14 @@ def delete( :param account_name: The name of the Batch account. :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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -323,30 +304,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -355,12 +314,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}'} def get( @@ -397,7 +357,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -406,8 +366,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -415,7 +375,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccount', response) @@ -441,8 +400,7 @@ def list( ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] :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'] @@ -461,7 +419,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -470,9 +428,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -482,12 +444,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts'} @@ -510,8 +470,7 @@ def list_by_resource_group( ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] :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'] @@ -531,7 +490,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -540,9 +499,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -552,12 +515,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts'} @@ -596,7 +557,6 @@ def synchronize_auto_storage_keys( # 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: @@ -605,8 +565,8 @@ def synchronize_auto_storage_keys( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -657,6 +617,7 @@ def regenerate_key( # 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()) @@ -669,9 +630,8 @@ def regenerate_key( body_content = self._serialize.body(parameters, 'BatchAccountRegenerateKeyParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -679,7 +639,6 @@ def regenerate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccountKeys', response) @@ -730,7 +689,7 @@ def get_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -739,8 +698,8 @@ def get_keys( 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, stream=False, **operation_config) + 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) @@ -748,7 +707,6 @@ def get_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccountKeys', response) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py similarity index 84% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py index 8db5cd991d95..eb726f288a3f 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class CertificateOperations(object): """CertificateOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -69,8 +71,7 @@ def list_by_batch_account( ~azure.mgmt.batch.models.CertificatePaged[~azure.mgmt.batch.models.Certificate] :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_batch_account.metadata['url'] @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -106,9 +107,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -118,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates'} @@ -147,6 +150,7 @@ def _create_initial( # 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()) @@ -163,9 +167,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -183,16 +186,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new certificate inside the specified account. :param resource_group_name: The name of the resource group that @@ -217,13 +217,16 @@ def create( will be ignored. :type if_none_match: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Certificate - or ClientRawResponse if raw=true + :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 Certificate or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Certificate] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Certificate]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -237,30 +240,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'ETag': 'str', } @@ -273,12 +254,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} def update( @@ -327,6 +309,7 @@ def update( # 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()) @@ -341,18 +324,16 @@ def update( body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { @@ -386,7 +367,6 @@ def _delete_initial( # 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: @@ -395,8 +375,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -413,7 +393,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified certificate. :param resource_group_name: The name of the resource group that @@ -426,12 +406,14 @@ def delete( match the certificate data in the request. For example SHA1-a3d1c5. :type certificate_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -442,30 +424,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -474,12 +434,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} def get( @@ -521,7 +482,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -530,17 +491,16 @@ def get( 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, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { @@ -603,7 +563,7 @@ def cancel_deletion( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -612,17 +572,16 @@ def cancel_deletion( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py similarity index 91% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py index 84b9be79e2c0..686dc2b3097b 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py @@ -19,11 +19,13 @@ class LocationOperations(object): """LocationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -69,7 +71,7 @@ def get_quotas( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -78,8 +80,8 @@ def get_quotas( 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, stream=False, **operation_config) + 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) @@ -87,7 +89,6 @@ def get_quotas( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchLocationQuota', response) @@ -133,6 +134,7 @@ def check_name_availability( # 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()) @@ -145,9 +147,8 @@ def check_name_availability( body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -155,7 +156,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResult', response) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py similarity index 82% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py index 4774273e7176..799529b363cb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/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: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -51,8 +53,7 @@ def list( ~azure.mgmt.batch.models.OperationPaged[~azure.mgmt.batch.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'] @@ -67,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -76,9 +77,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -88,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.Batch/operations'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py similarity index 85% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py index 02cab779f816..95715cda042a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class PoolOperations(object): """PoolOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -79,8 +81,7 @@ def list_by_batch_account( ~azure.mgmt.batch.models.PoolPaged[~azure.mgmt.batch.models.Pool] :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_batch_account.metadata['url'] @@ -107,7 +108,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -116,9 +117,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -128,12 +133,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools'} @@ -157,6 +160,7 @@ def _create_initial( # 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()) @@ -173,9 +177,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'Pool') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -193,16 +196,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new pool inside the specified account. :param resource_group_name: The name of the resource group that @@ -225,13 +225,16 @@ def create( ignored. :type if_none_match: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Pool or - ClientRawResponse if raw=true + :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 Pool or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Pool] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Pool]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -245,30 +248,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'ETag': 'str', } @@ -281,12 +262,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} def update( @@ -335,6 +317,7 @@ def update( # 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()) @@ -349,18 +332,16 @@ def update( body_content = self._serialize.body(parameters, 'Pool') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -394,7 +375,6 @@ def _delete_initial( # 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: @@ -403,8 +383,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -421,7 +401,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified pool. :param resource_group_name: The name of the resource group that @@ -433,12 +413,14 @@ def delete( account. :type pool_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -449,30 +431,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -481,12 +441,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}/pools/{poolName}'} def get( @@ -527,7 +488,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -536,17 +497,16 @@ def get( 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, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -599,7 +559,7 @@ def disable_auto_scale( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -608,17 +568,16 @@ def disable_auto_scale( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -680,7 +639,7 @@ def stop_resize( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -689,17 +648,16 @@ def stop_resize( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { From 00d03b7a5eb51a597cb6fc6a78668bf11ffc10e1 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2019 02:44:40 +0000 Subject: [PATCH 04/37] Generated from 7e0f5408fe4fa42660222ec1c5cca8ae9440afde (#27) fix: Batch model validation errors - Add body for RESPONSE_BODY_NOT_IN_EXAMPLE errors - active -> Active for state enum in 2017-09-01 examples --- .../azure/mgmt/batch/__init__.py | 7 +- ..._client.py => _batch_management_client.py} | 59 +- .../azure/mgmt/batch/_configuration.py | 49 + .../azure/mgmt/batch/models/__init__.py | 97 +- .../models/_batch_management_client_enums.py | 146 +- .../azure/mgmt/batch/models/_models.py | 2267 +++++++------- .../azure/mgmt/batch/models/_models_py3.py | 2649 +++++++++-------- .../azure/mgmt/batch/models/_paged_models.py | 10 - .../azure/mgmt/batch/operations/__init__.py | 14 +- ...erations.py => _application_operations.py} | 53 +- ....py => _application_package_operations.py} | 53 +- ...ations.py => _batch_account_operations.py} | 192 +- ...erations.py => _certificate_operations.py} | 165 +- ..._operations.py => _location_operations.py} | 20 +- .../{operations.py => _operations.py} | 27 +- ...pool_operations.py => _pool_operations.py} | 174 +- 16 files changed, 3115 insertions(+), 2867 deletions(-) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/{batch_management_client.py => _batch_management_client.py} (61%) create mode 100644 sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{application_operations.py => _application_operations.py} (92%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{application_package_operations.py => _application_package_operations.py} (92%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{batch_account_operations.py => _batch_account_operations.py} (84%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{certificate_operations.py => _certificate_operations.py} (84%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{location_operations.py => _location_operations.py} (91%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{operations.py => _operations.py} (82%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{pool_operations.py => _pool_operations.py} (85%) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py index da4d07e1222e..bfdd6ac1c466 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_management_client import BatchManagementClient -from .version import VERSION +from ._configuration import BatchManagementClientConfiguration +from ._batch_management_client import BatchManagementClient +__all__ = ['BatchManagementClient', 'BatchManagementClientConfiguration'] -__all__ = ['BatchManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py similarity index 61% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py index d31cfa110ab2..6cdcc5ca3eaf 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py @@ -9,54 +9,21 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.batch_account_operations import BatchAccountOperations -from .operations.application_package_operations import ApplicationPackageOperations -from .operations.application_operations import ApplicationOperations -from .operations.location_operations import LocationOperations -from .operations.operations import Operations -from .operations.certificate_operations import CertificateOperations -from .operations.pool_operations import PoolOperations -from . import models - - -class BatchManagementClientConfiguration(AzureConfiguration): - """Configuration for BatchManagementClient - 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 Azure subscription ID. This is a - GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - :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(BatchManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-batch/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import BatchManagementClientConfiguration +from .operations import BatchAccountOperations +from .operations import ApplicationPackageOperations +from .operations import ApplicationOperations +from .operations import LocationOperations +from .operations import Operations +from .operations import CertificateOperations +from .operations import PoolOperations +from . import models -class BatchManagementClient(object): +class BatchManagementClient(SDKClient): """BatchManagementClient :ivar config: Configuration for client. @@ -90,10 +57,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = BatchManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(BatchManagementClient, 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-12-01' + self.api_version = '2019-04-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py new file mode 100644 index 000000000000..75c9d4004f40 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class BatchManagementClientConfiguration(AzureConfiguration): + """Configuration for BatchManagementClient + 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 Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :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(BatchManagementClientConfiguration, 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-batch/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py index ad7c3fe653cf..b17bdd9834c9 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py @@ -9,21 +9,26 @@ # regenerated. # -------------------------------------------------------------------------- - try: from ._models_py3 import ActivateApplicationPackageParameters + from ._models_py3 import Application + from ._models_py3 import ApplicationPackage from ._models_py3 import ApplicationPackageReference from ._models_py3 import AutoScaleRun from ._models_py3 import AutoScaleRunError from ._models_py3 import AutoScaleSettings from ._models_py3 import AutoStorageBaseProperties + from ._models_py3 import AutoStorageProperties from ._models_py3 import AutoUserSpecification + from ._models_py3 import BatchAccount from ._models_py3 import BatchAccountCreateParameters from ._models_py3 import BatchAccountKeys from ._models_py3 import BatchAccountRegenerateKeyParameters from ._models_py3 import BatchAccountUpdateParameters from ._models_py3 import BatchLocationQuota + from ._models_py3 import Certificate from ._models_py3 import CertificateBaseProperties + from ._models_py3 import CertificateCreateOrUpdateParameters from ._models_py3 import CertificateReference from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import CheckNameAvailabilityResult @@ -44,6 +49,7 @@ from ._models_py3 import NetworkSecurityGroupRule from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import Pool from ._models_py3 import PoolEndpointConfiguration from ._models_py3 import ProxyResource from ._models_py3 import ResizeError @@ -57,29 +63,29 @@ from ._models_py3 import UserAccount from ._models_py3 import UserIdentity from ._models_py3 import VirtualMachineConfiguration + from ._models_py3 import VirtualMachineFamilyCoreQuota from ._models_py3 import WindowsConfiguration from ._models_py3 import WindowsUserConfiguration - from ._models_py3 import Application - from ._models_py3 import ApplicationPackage - from ._models_py3 import AutoStorageProperties - from ._models_py3 import BatchAccount - from ._models_py3 import Certificate - from ._models_py3 import CertificateCreateOrUpdateParameters - from ._models_py3 import Pool except (SyntaxError, ImportError): from ._models import ActivateApplicationPackageParameters + from ._models import Application + from ._models import ApplicationPackage from ._models import ApplicationPackageReference from ._models import AutoScaleRun from ._models import AutoScaleRunError from ._models import AutoScaleSettings from ._models import AutoStorageBaseProperties + from ._models import AutoStorageProperties from ._models import AutoUserSpecification + from ._models import BatchAccount from ._models import BatchAccountCreateParameters from ._models import BatchAccountKeys from ._models import BatchAccountRegenerateKeyParameters from ._models import BatchAccountUpdateParameters from ._models import BatchLocationQuota + from ._models import Certificate from ._models import CertificateBaseProperties + from ._models import CertificateCreateOrUpdateParameters from ._models import CertificateReference from ._models import CheckNameAvailabilityParameters from ._models import CheckNameAvailabilityResult @@ -100,6 +106,7 @@ from ._models import NetworkSecurityGroupRule from ._models import Operation from ._models import OperationDisplay + from ._models import Pool from ._models import PoolEndpointConfiguration from ._models import ProxyResource from ._models import ResizeError @@ -113,58 +120,59 @@ from ._models import UserAccount from ._models import UserIdentity from ._models import VirtualMachineConfiguration + from ._models import VirtualMachineFamilyCoreQuota from ._models import WindowsConfiguration from ._models import WindowsUserConfiguration - from ._models import Application - from ._models import ApplicationPackage - from ._models import AutoStorageProperties - from ._models import BatchAccount - from ._models import Certificate - from ._models import CertificateCreateOrUpdateParameters - from ._models import Pool -from ._paged_models import BatchAccountPaged from ._paged_models import ApplicationPackagePaged from ._paged_models import ApplicationPaged -from ._paged_models import OperationPaged +from ._paged_models import BatchAccountPaged from ._paged_models import CertificatePaged +from ._paged_models import OperationPaged from ._paged_models import PoolPaged -from ._batch_management_client_enums import PoolAllocationMode -from ._batch_management_client_enums import ProvisioningState -from ._batch_management_client_enums import AccountKeyType -from ._batch_management_client_enums import PackageState -from ._batch_management_client_enums import CertificateFormat -from ._batch_management_client_enums import CertificateProvisioningState -from ._batch_management_client_enums import PoolProvisioningState -from ._batch_management_client_enums import AllocationState -from ._batch_management_client_enums import CachingType -from ._batch_management_client_enums import StorageAccountType -from ._batch_management_client_enums import ComputeNodeDeallocationOption -from ._batch_management_client_enums import InterNodeCommunicationState -from ._batch_management_client_enums import InboundEndpointProtocol -from ._batch_management_client_enums import NetworkSecurityGroupRuleAccess -from ._batch_management_client_enums import ComputeNodeFillType -from ._batch_management_client_enums import ElevationLevel -from ._batch_management_client_enums import LoginMode -from ._batch_management_client_enums import AutoUserScope -from ._batch_management_client_enums import CertificateStoreLocation -from ._batch_management_client_enums import CertificateVisibility -from ._batch_management_client_enums import NameAvailabilityReason +from ._batch_management_client_enums import ( + PoolAllocationMode, + ProvisioningState, + AccountKeyType, + PackageState, + CertificateFormat, + CertificateProvisioningState, + PoolProvisioningState, + AllocationState, + CachingType, + StorageAccountType, + ComputeNodeDeallocationOption, + InterNodeCommunicationState, + InboundEndpointProtocol, + NetworkSecurityGroupRuleAccess, + ComputeNodeFillType, + ElevationLevel, + LoginMode, + AutoUserScope, + CertificateStoreLocation, + CertificateVisibility, + NameAvailabilityReason, +) - -__all__=[ +__all__ = [ 'ActivateApplicationPackageParameters', + 'Application', + 'ApplicationPackage', 'ApplicationPackageReference', 'AutoScaleRun', 'AutoScaleRunError', 'AutoScaleSettings', 'AutoStorageBaseProperties', + 'AutoStorageProperties', 'AutoUserSpecification', + 'BatchAccount', 'BatchAccountCreateParameters', 'BatchAccountKeys', 'BatchAccountRegenerateKeyParameters', 'BatchAccountUpdateParameters', 'BatchLocationQuota', + 'Certificate', 'CertificateBaseProperties', + 'CertificateCreateOrUpdateParameters', 'CertificateReference', 'CheckNameAvailabilityParameters', 'CheckNameAvailabilityResult', @@ -185,6 +193,7 @@ 'NetworkSecurityGroupRule', 'Operation', 'OperationDisplay', + 'Pool', 'PoolEndpointConfiguration', 'ProxyResource', 'ResizeError', @@ -198,15 +207,9 @@ 'UserAccount', 'UserIdentity', 'VirtualMachineConfiguration', + 'VirtualMachineFamilyCoreQuota', 'WindowsConfiguration', 'WindowsUserConfiguration', - 'Application', - 'ApplicationPackage', - 'AutoStorageProperties', - 'BatchAccount', - 'Certificate', - 'CertificateCreateOrUpdateParameters', - 'Pool', 'BatchAccountPaged', 'ApplicationPackagePaged', 'ApplicationPaged', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py index da2eba944432..0bd6782557aa 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py @@ -12,137 +12,137 @@ from enum import Enum -class PoolAllocationMode(Enum): +class PoolAllocationMode(str, Enum): - batch_service = "BatchService" - user_subscription = "UserSubscription" + batch_service = "BatchService" #: Pools will be allocated in subscriptions owned by the Batch service. + user_subscription = "UserSubscription" #: Pools will be allocated in a subscription owned by the user. -class ProvisioningState(Enum): +class ProvisioningState(str, Enum): - invalid = "Invalid" - creating = "Creating" - deleting = "Deleting" - succeeded = "Succeeded" - failed = "Failed" - cancelled = "Cancelled" + invalid = "Invalid" #: The account is in an invalid state. + creating = "Creating" #: The account is being created. + deleting = "Deleting" #: The account is being deleted. + succeeded = "Succeeded" #: The account has been created and is ready for use. + failed = "Failed" #: The last operation for the account is failed. + cancelled = "Cancelled" #: The last operation for the account is cancelled. -class AccountKeyType(Enum): +class AccountKeyType(str, Enum): - primary = "Primary" - secondary = "Secondary" + primary = "Primary" #: The primary account key. + secondary = "Secondary" #: The secondary account key. -class PackageState(Enum): +class PackageState(str, Enum): - pending = "Pending" - active = "Active" + pending = "Pending" #: The application package has been created but has not yet been activated. + active = "Active" #: The application package is ready for use. -class CertificateFormat(Enum): +class CertificateFormat(str, Enum): - pfx = "Pfx" - cer = "Cer" + pfx = "Pfx" #: The certificate is a PFX (PKCS#12) formatted certificate or certificate chain. + cer = "Cer" #: The certificate is a base64-encoded X.509 certificate. -class CertificateProvisioningState(Enum): +class CertificateProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" - failed = "Failed" + succeeded = "Succeeded" #: The certificate is available for use in pools. + deleting = "Deleting" #: The user has requested that the certificate be deleted, but the delete operation has not yet completed. You may not reference the certificate when creating or updating pools. + failed = "Failed" #: The user requested that the certificate be deleted, but there are pools that still have references to the certificate, or it is still installed on one or more compute nodes. (The latter can occur if the certificate has been removed from the pool, but the node has not yet restarted. Nodes refresh their certificates only when they restart.) You may use the cancel certificate delete operation to cancel the delete, or the delete certificate operation to retry the delete. -class PoolProvisioningState(Enum): +class PoolProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" + succeeded = "Succeeded" #: The pool is available to run tasks subject to the availability of compute nodes. + deleting = "Deleting" #: The user has requested that the pool be deleted, but the delete operation has not yet completed. -class AllocationState(Enum): +class AllocationState(str, Enum): - steady = "Steady" - resizing = "Resizing" - stopping = "Stopping" + steady = "Steady" #: The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this state when it is created and when no operations are being performed on the pool to change the number of nodes. + resizing = "Resizing" #: The pool is resizing; that is, compute nodes are being added to or removed from the pool. + stopping = "Stopping" #: The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed. -class CachingType(Enum): +class CachingType(str, Enum): - none = "None" - read_only = "ReadOnly" - read_write = "ReadWrite" + none = "None" #: The caching mode for the disk is not enabled. + read_only = "ReadOnly" #: The caching mode for the disk is read only. + read_write = "ReadWrite" #: The caching mode for the disk is read and write. -class StorageAccountType(Enum): +class StorageAccountType(str, Enum): - standard_lrs = "Standard_LRS" - premium_lrs = "Premium_LRS" + standard_lrs = "Standard_LRS" #: The data disk should use standard locally redundant storage. + premium_lrs = "Premium_LRS" #: The data disk should use premium locally redundant storage. -class ComputeNodeDeallocationOption(Enum): +class ComputeNodeDeallocationOption(str, Enum): - requeue = "Requeue" - terminate = "Terminate" - task_completion = "TaskCompletion" - retained_data = "RetainedData" + requeue = "Requeue" #: Terminate running task processes and requeue the tasks. The tasks will run again when a node is available. Remove nodes as soon as tasks have been terminated. + terminate = "Terminate" #: Terminate running tasks. The tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Remove nodes as soon as tasks have been terminated. + task_completion = "TaskCompletion" #: Allow currently running tasks to complete. Schedule no new tasks while waiting. Remove nodes when all tasks have completed. + retained_data = "RetainedData" #: Allow currently running tasks to complete, then wait for all task data retention periods to expire. Schedule no new tasks while waiting. Remove nodes when all task retention periods have expired. -class InterNodeCommunicationState(Enum): +class InterNodeCommunicationState(str, Enum): - enabled = "Enabled" - disabled = "Disabled" + enabled = "Enabled" #: Enable network communication between virtual machines. + disabled = "Disabled" #: Disable network communication between virtual machines. -class InboundEndpointProtocol(Enum): +class InboundEndpointProtocol(str, Enum): - tcp = "TCP" - udp = "UDP" + tcp = "TCP" #: Use TCP for the endpoint. + udp = "UDP" #: Use UDP for the endpoint. -class NetworkSecurityGroupRuleAccess(Enum): +class NetworkSecurityGroupRuleAccess(str, Enum): - allow = "Allow" - deny = "Deny" + allow = "Allow" #: Allow access. + deny = "Deny" #: Deny access. -class ComputeNodeFillType(Enum): +class ComputeNodeFillType(str, Enum): - spread = "Spread" - pack = "Pack" + spread = "Spread" #: Tasks should be assigned evenly across all nodes in the pool. + pack = "Pack" #: As many tasks as possible (maxTasksPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool. -class ElevationLevel(Enum): +class ElevationLevel(str, Enum): - non_admin = "NonAdmin" - admin = "Admin" + non_admin = "NonAdmin" #: The user is a standard user without elevated access. + admin = "Admin" #: The user is a user with elevated access and operates with full Administrator permissions. -class LoginMode(Enum): +class LoginMode(str, Enum): - batch = "Batch" - interactive = "Interactive" + batch = "Batch" #: The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel processes. + interactive = "Interactive" #: The LOGON32_LOGON_INTERACTIVE Win32 login mode. Some applications require having permissions associated with the interactive login mode. If this is the case for an application used in your task, then this option is recommended. -class AutoUserScope(Enum): +class AutoUserScope(str, Enum): - task = "Task" - pool = "Pool" + task = "Task" #: Specifies that the service should create a new user for the task. + pool = "Pool" #: Specifies that the task runs as the common auto user account which is created on every node in a pool. -class CertificateStoreLocation(Enum): +class CertificateStoreLocation(str, Enum): - current_user = "CurrentUser" - local_machine = "LocalMachine" + current_user = "CurrentUser" #: Certificates should be installed to the CurrentUser certificate store. + local_machine = "LocalMachine" #: Certificates should be installed to the LocalMachine certificate store. -class CertificateVisibility(Enum): +class CertificateVisibility(str, Enum): - start_task = "StartTask" - task = "Task" - remote_user = "RemoteUser" + start_task = "StartTask" #: The certificate should be visible to the user account under which the start task is run. + task = "Task" #: The certificate should be visible to the user accounts under which job tasks are run. + remote_user = "RemoteUser" #: The certificate should be visible to the user accounts under which users remotely access the node. -class NameAvailabilityReason(Enum): +class NameAvailabilityReason(str, Enum): - invalid = "Invalid" - already_exists = "AlreadyExists" + invalid = "Invalid" #: The requested name is invalid. + already_exists = "AlreadyExists" #: The requested name is already in use. diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py index c64ee92d4c21..4b01ce194f4f 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() - self.format = format + def __init__(self, **kwargs): + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + + +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Application, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.allow_updates = kwargs.get('allow_updates', None) + self.default_version = kwargs.get('default_version', None) + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,17 +213,19 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() - self.id = id - self.version = version + def __init__(self, **kwargs): + super(ApplicationPackageReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.version = kwargs.get('version', None) class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,21 +246,23 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() - self.evaluation_time = evaluation_time - self.results = results - self.error = error + def __init__(self, **kwargs): + super(AutoScaleRun, self).__init__(**kwargs) + self.evaluation_time = kwargs.get('evaluation_time', None) + self.results = kwargs.get('results', None) + self.error = kwargs.get('error', None) class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,18 +279,20 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(AutoScaleRunError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,31 +309,62 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() - self.formula = formula - self.evaluation_interval = evaluation_interval + def __init__(self, **kwargs): + super(AutoScaleSettings, self).__init__(**kwargs) + self.formula = kwargs.get('formula', None) + self.evaluation_interval = kwargs.get('evaluation_interval', None) class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + """ + + _validation = { + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoStorageBaseProperties, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + + +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime """ _validation = { 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, } _attribute_map = { 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() - self.storage_account_id = storage_account_id + def __init__(self, **kwargs): + super(AutoStorageProperties, self).__init__(**kwargs) + self.last_key_sync = kwargs.get('last_key_sync', None) class AutoUserSpecification(Model): @@ -194,94 +387,261 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() - self.scope = scope - self.elevation_level = elevation_level + def __init__(self, **kwargs): + super(AutoUserSpecification, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.elevation_level = kwargs.get('elevation_level', None) -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. +class Resource(Model): + """A definition of an Azure resource. - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'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}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class BatchAccount(Resource): + """Contains information about an Azure Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str - """ - - _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, - 'secondary': {'key': 'secondary', 'type': 'str'}, - } - - def __init__(self): - super(BatchAccountKeys, self).__init__() - self.account_name = None - self.primary = None - self.secondary = None - - -class BatchAccountRegenerateKeyParameters(Model): + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'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}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, **kwargs): + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) + self.pool_allocation_mode = kwargs.get('pool_allocation_mode', None) + self.key_vault_reference = kwargs.get('key_vault_reference', None) + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, + 'secondary': {'key': 'secondary', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BatchAccountKeys, self).__init__(**kwargs) + self.account_name = None + self.primary = None + self.secondary = None + + +class BatchAccountRegenerateKeyParameters(Model): """Parameters supplied to the RegenerateKey operation. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ @@ -293,9 +653,9 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() - self.key_name = key_name + def __init__(self, **kwargs): + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) class BatchAccountUpdateParameters(Model): @@ -312,10 +672,10 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() - self.tags = tags - self.auto_storage = auto_storage + def __init__(self, **kwargs): + super(BatchAccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) class BatchLocationQuota(Model): @@ -337,11 +697,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs): + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, **kwargs): + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,35 +812,101 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format + def __init__(self, **kwargs): + super(CertificateBaseProperties, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. - This must exist inside the same account as the pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. - :type id: str - :param store_location: The location of the certificate store on the - compute node into which to install the certificate. The default value is - currentUser. This property is applicable only for pools configured with - Windows nodes (that is, created with cloudServiceConfiguration, or with - virtualMachineConfiguration using a Windows image reference). For Linux - compute nodes, the certificates are stored in a directory inside the task - working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - supplied to the task to query for this location. For certificates with - visibility of 'remoteUser', a 'certs' directory is created in the user's - home directory (e.g., /home/{user-name}/certs) and certificates are placed - in that directory. Possible values include: 'CurrentUser', 'LocalMachine' - :type store_location: str or - ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: The name of the certificate store on the compute node - into which to install the certificate. This property is applicable only + 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 ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.data = kwargs.get('data', None) + self.password = kwargs.get('password', None) + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. + This must exist inside the same account as the pool. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. + :type id: str + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' + :type store_location: str or + ~azure.mgmt.batch.models.CertificateStoreLocation + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, @@ -415,12 +930,12 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() - self.id = id - self.store_location = store_location - self.store_name = store_name - self.visibility = visibility + def __init__(self, **kwargs): + super(CertificateReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.store_location = kwargs.get('store_location', None) + self.store_name = kwargs.get('store_name', None) + self.visibility = kwargs.get('visibility', None) class CheckNameAvailabilityParameters(Model): @@ -429,9 +944,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,9 +966,9 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) class CheckNameAvailabilityResult(Model): @@ -485,23 +1002,85 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', 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 CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,10 +1098,10 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() - self.os_family = os_family - self.os_version = os_version + def __init__(self, **kwargs): + super(CloudServiceConfiguration, self).__init__(**kwargs) + self.os_family = kwargs.get('os_family', None) + self.os_version = kwargs.get('os_version', None) class ContainerConfiguration(Model): @@ -531,7 +1110,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,21 +1140,23 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() - self.container_image_names = container_image_names - self.container_registries = container_registries + def __init__(self, **kwargs): + super(ContainerConfiguration, self).__init__(**kwargs) + self.container_image_names = kwargs.get('container_image_names', None) + self.container_registries = kwargs.get('container_registries', None) class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,20 +1171,22 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() - self.registry_server = registry_server - self.user_name = user_name - self.password = password + def __init__(self, **kwargs): + super(ContainerRegistry, self).__init__(**kwargs) + self.registry_server = kwargs.get('registry_server', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) class DataDisk(Model): """Data Disk settings which will be used by the data disks associated to Compute Nodes in the pool. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1198,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,22 +1223,24 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() - self.lun = lun - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,12 +1261,12 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() - self.code = code - self.message = message - self.target = target - self.details = details + def __init__(self, **kwargs): + super(DeleteCertificateError, 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 DeploymentConfiguration(Model): @@ -704,16 +1291,18 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() - self.cloud_service_configuration = cloud_service_configuration - self.virtual_machine_configuration = virtual_machine_configuration + def __init__(self, **kwargs): + super(DeploymentConfiguration, self).__init__(**kwargs) + self.cloud_service_configuration = kwargs.get('cloud_service_configuration', None) + self.virtual_machine_configuration = kwargs.get('virtual_machine_configuration', None) class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,10 +1317,10 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(EnvironmentSetting, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) class FixedScaleSettings(Model): @@ -767,12 +1356,12 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() - self.resize_timeout = resize_timeout - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.node_deallocation_option = node_deallocation_option + def __init__(self, **kwargs): + super(FixedScaleSettings, self).__init__(**kwargs) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) class ImageReference(Model): @@ -815,43 +1404,45 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version - self.id = id + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + self.id = kwargs.get('id', None) class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,24 +1477,26 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() - self.name = name - self.protocol = protocol - self.backend_port = backend_port - self.frontend_port_range_start = frontend_port_range_start - self.frontend_port_range_end = frontend_port_range_end - self.network_security_group_rules = network_security_group_rules + def __init__(self, **kwargs): + super(InboundNatPool, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.protocol = kwargs.get('protocol', None) + self.backend_port = kwargs.get('backend_port', None) + self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) + self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) + self.network_security_group_rules = kwargs.get('network_security_group_rules', None) class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,10 +1510,10 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() - self.id = id - self.url = url + def __init__(self, **kwargs): + super(KeyVaultReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.url = kwargs.get('url', None) class LinuxUserConfiguration(Model): @@ -951,11 +1544,11 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() - self.uid = uid - self.gid = gid - self.ssh_private_key = ssh_private_key + def __init__(self, **kwargs): + super(LinuxUserConfiguration, self).__init__(**kwargs) + self.uid = kwargs.get('uid', None) + self.gid = kwargs.get('gid', None) + self.ssh_private_key = kwargs.get('ssh_private_key', None) class MetadataItem(Model): @@ -964,9 +1557,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,10 +1575,10 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(MetadataItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) class NetworkConfiguration(Model): @@ -1027,31 +1622,34 @@ class NetworkConfiguration(Model): 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() - self.subnet_id = subnet_id - self.endpoint_configuration = endpoint_configuration + def __init__(self, **kwargs): + super(NetworkConfiguration, self).__init__(**kwargs) + self.subnet_id = kwargs.get('subnet_id', None) + self.endpoint_configuration = kwargs.get('endpoint_configuration', None) class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str """ @@ -1067,11 +1665,11 @@ class NetworkSecurityGroupRule(Model): 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() - self.priority = priority - self.access = access - self.source_address_prefix = source_address_prefix + def __init__(self, **kwargs): + super(NetworkSecurityGroupRule, self).__init__(**kwargs) + self.priority = kwargs.get('priority', None) + self.access = kwargs.get('access', None) + self.source_address_prefix = kwargs.get('source_address_prefix', None) class Operation(Model): @@ -1095,12 +1693,12 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) class OperationDisplay(Model): @@ -1124,40 +1722,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools - - -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,6 +1744,123 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus """ _validation = { @@ -1177,6 +1868,16 @@ class ProxyResource(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { @@ -1184,24 +1885,96 @@ class ProxyResource(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, } - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None + def __init__(self, **kwargs): + super(Pool, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = kwargs.get('vm_size', None) + self.deployment_configuration = kwargs.get('deployment_configuration', None) + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = kwargs.get('scale_settings', None) + self.auto_scale_run = None + self.inter_node_communication = kwargs.get('inter_node_communication', None) + self.network_configuration = kwargs.get('network_configuration', None) + self.max_tasks_per_node = kwargs.get('max_tasks_per_node', None) + self.task_scheduling_policy = kwargs.get('task_scheduling_policy', None) + self.user_accounts = kwargs.get('user_accounts', None) + self.metadata = kwargs.get('metadata', None) + self.start_task = kwargs.get('start_task', None) + self.certificates = kwargs.get('certificates', None) + self.application_packages = kwargs.get('application_packages', None) + self.application_licenses = kwargs.get('application_licenses', None) + self.resize_operation_status = None + + +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. + + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] + """ + + _validation = { + 'inbound_nat_pools': {'required': True}, + } + + _attribute_map = { + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, + } + + def __init__(self, **kwargs): + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = kwargs.get('inbound_nat_pools', None) class ResizeError(Model): """An error that occurred when resizing a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.ResizeError] @@ -1218,11 +1991,11 @@ class ResizeError(Model): 'details': {'key': 'details', 'type': '[ResizeError]'}, } - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(ResizeError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) class ResizeOperationStatus(Model): @@ -1267,57 +2040,14 @@ class ResizeOperationStatus(Model): 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'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}'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None + def __init__(self, **kwargs): + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) + self.start_time = kwargs.get('start_time', None) + self.errors = kwargs.get('errors', None) class ResourceFile(Model): @@ -1333,10 +2063,10 @@ class ResourceFile(Model): httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. :type storage_container_url: str :param http_url: The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are @@ -1383,14 +2113,14 @@ class ResourceFile(Model): 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode + def __init__(self, **kwargs): + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = kwargs.get('auto_storage_container_name', None) + self.storage_container_url = kwargs.get('storage_container_url', None) + self.http_url = kwargs.get('http_url', None) + self.blob_prefix = kwargs.get('blob_prefix', None) + self.file_path = kwargs.get('file_path', None) + self.file_mode = kwargs.get('file_mode', None) class ScaleSettings(Model): @@ -1417,16 +2147,23 @@ class ScaleSettings(Model): 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = kwargs.get('fixed_scale', None) + self.auto_scale = kwargs.get('auto_scale', None) class StartTask(Model): """A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged. + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + :param command_line: The command line of the start task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take @@ -1486,28 +2223,30 @@ class StartTask(Model): 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings + def __init__(self, **kwargs): + super(StartTask, self).__init__(**kwargs) + self.command_line = kwargs.get('command_line', None) + self.resource_files = kwargs.get('resource_files', None) + self.environment_settings = kwargs.get('environment_settings', None) + self.user_identity = kwargs.get('user_identity', None) + self.max_task_retry_count = kwargs.get('max_task_retry_count', None) + self.wait_for_success = kwargs.get('wait_for_success', None) + self.container_settings = kwargs.get('container_settings', None) class TaskContainerSettings(Model): """The container settings for a task. + All required parameters must be populated in order to send to Azure. + :param container_run_options: Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. :type image_name: str :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. @@ -1524,18 +2263,20 @@ class TaskContainerSettings(Model): 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, } - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry + def __init__(self, **kwargs): + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = kwargs.get('container_run_options', None) + self.image_name = kwargs.get('image_name', None) + self.registry = kwargs.get('registry', None) class TaskSchedulingPolicy(Model): """Specifies how tasks should be distributed across compute nodes. - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' + All required parameters must be populated in order to send to Azure. + + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ @@ -1547,17 +2288,19 @@ class TaskSchedulingPolicy(Model): 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type + def __init__(self, **kwargs): + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = kwargs.get('node_fill_type', None) class UserAccount(Model): """Properties used to create a user on an Azure Batch node. - :param name: The name of the user account. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the user account. :type name: str - :param password: The password for the user account. + :param password: Required. The password for the user account. :type password: str :param elevation_level: The elevation level of the user account. nonAdmin - The auto user is a standard user without elevated access. admin - The @@ -1591,13 +2334,13 @@ class UserAccount(Model): 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration + def __init__(self, **kwargs): + super(UserAccount, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.password = kwargs.get('password', None) + self.elevation_level = kwargs.get('elevation_level', None) + self.linux_user_configuration = kwargs.get('linux_user_configuration', None) + self.windows_user_configuration = kwargs.get('windows_user_configuration', None) class UserIdentity(Model): @@ -1620,20 +2363,22 @@ class UserIdentity(Model): 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, } - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + self.auto_user = kwargs.get('auto_user', None) class VirtualMachineConfiguration(Model): """The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure. - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. + All required parameters must be populated in order to send to Azure. + + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be provisioned on compute nodes in the pool. The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. @@ -1682,639 +2427,75 @@ class VirtualMachineConfiguration(Model): 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration - - -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. - - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool - """ - - _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - } - - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates - - -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. - - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode - """ - - _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, - } - - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode + def __init__(self, **kwargs): + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.node_agent_sku_id = kwargs.get('node_agent_sku_id', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.data_disks = kwargs.get('data_disks', None) + self.license_type = kwargs.get('license_type', None) + self.container_configuration = kwargs.get('container_configuration', None) -class Application(ProxyResource): - """Contains information about an application in a Batch account. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version - + def __init__(self, **kwargs): + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode """ - _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, - } - _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync - - -class BatchAccount(Resource): - """Contains information about an Azure Batch account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'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}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, - } - - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None - - -class Certificate(ProxyResource): - """Contains information about a certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, - } - - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None - - -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - - -class Pool(ProxyResource): - """Contains information about a pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, - } - - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, **kwargs): + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = kwargs.get('login_mode', None) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py index c64ee92d4c21..edb71960c6fb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() + def __init__(self, *, format: str, **kwargs) -> None: + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) self.format = format +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, allow_updates: bool=None, default_version: str=None, **kwargs) -> None: + super(Application, self).__init__(**kwargs) + self.display_name = display_name + self.allow_updates = allow_updates + self.default_version = default_version + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None + + class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,8 +213,8 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() + def __init__(self, *, id: str, version: str=None, **kwargs) -> None: + super(ApplicationPackageReference, self).__init__(**kwargs) self.id = id self.version = version @@ -66,8 +222,10 @@ def __init__(self, id, version=None): class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,8 +246,8 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() + def __init__(self, *, evaluation_time, results: str=None, error=None, **kwargs) -> None: + super(AutoScaleRun, self).__init__(**kwargs) self.evaluation_time = evaluation_time self.results = results self.error = error @@ -98,11 +256,13 @@ def __init__(self, evaluation_time, results=None, error=None): class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,8 +279,8 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(AutoScaleRunError, self).__init__(**kwargs) self.code = code self.message = message self.details = details @@ -129,8 +289,10 @@ def __init__(self, code, message, details=None): class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,8 +309,8 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() + def __init__(self, *, formula: str, evaluation_interval=None, **kwargs) -> None: + super(AutoScaleSettings, self).__init__(**kwargs) self.formula = formula self.evaluation_interval = evaluation_interval @@ -156,8 +318,10 @@ def __init__(self, formula, evaluation_interval=None): class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str """ @@ -169,11 +333,40 @@ class AutoStorageBaseProperties(Model): 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() + def __init__(self, *, storage_account_id: str, **kwargs) -> None: + super(AutoStorageBaseProperties, self).__init__(**kwargs) self.storage_account_id = storage_account_id +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime + """ + + _validation = { + 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + } + + def __init__(self, *, storage_account_id: str, last_key_sync, **kwargs) -> None: + super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id, **kwargs) + self.last_key_sync = last_key_sync + + class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. @@ -194,84 +387,249 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() + def __init__(self, *, scope=None, elevation_level=None, **kwargs) -> None: + super(AutoUserSpecification, self).__init__(**kwargs) self.scope = scope self.elevation_level = elevation_level -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. +class Resource(Model): + """A definition of an Azure resource. - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'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}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class BatchAccount(Resource): + """Contains information about an Azure Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str - """ - - _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'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}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, *, location: str, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None, **kwargs) -> None: + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.auto_storage = auto_storage + self.pool_allocation_mode = pool_allocation_mode + self.key_vault_reference = key_vault_reference + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, 'secondary': {'key': 'secondary', 'type': 'str'}, } - def __init__(self): - super(BatchAccountKeys, self).__init__() + def __init__(self, **kwargs) -> None: + super(BatchAccountKeys, self).__init__(**kwargs) self.account_name = None self.primary = None self.secondary = None @@ -280,8 +638,10 @@ def __init__(self): class BatchAccountRegenerateKeyParameters(Model): """Parameters supplied to the RegenerateKey operation. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ @@ -293,8 +653,8 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() + def __init__(self, *, key_name, **kwargs) -> None: + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) self.key_name = key_name @@ -312,8 +672,8 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() + def __init__(self, *, tags=None, auto_storage=None, **kwargs) -> None: + super(BatchAccountUpdateParameters, self).__init__(**kwargs) self.tags = tags self.auto_storage = auto_storage @@ -337,11 +697,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs) -> None: + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,36 +812,102 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(CertificateBaseProperties, self).__init__(**kwargs) self.thumbprint_algorithm = thumbprint_algorithm self.thumbprint = thumbprint self.format = format -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. - This must exist inside the same account as the pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. - :type id: str - :param store_location: The location of the certificate store on the - compute node into which to install the certificate. The default value is - currentUser. This property is applicable only for pools configured with - Windows nodes (that is, created with cloudServiceConfiguration, or with - virtualMachineConfiguration using a Windows image reference). For Linux - compute nodes, the certificates are stored in a directory inside the task - working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - supplied to the task to query for this location. For certificates with - visibility of 'remoteUser', a 'certs' directory is created in the user's - home directory (e.g., /home/{user-name}/certs) and certificates are placed - in that directory. Possible values include: 'CurrentUser', 'LocalMachine' - :type store_location: str or - ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: The name of the certificate store on the compute node - into which to install the certificate. This property is applicable only - for pools configured with Windows nodes (that is, created with + 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 ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, data: str, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, password: str=None, **kwargs) -> None: + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.data = data + self.password = password + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. + This must exist inside the same account as the pool. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. + :type id: str + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' + :type store_location: str or + ~azure.mgmt.batch.models.CertificateStoreLocation + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only + for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but @@ -415,8 +930,8 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() + def __init__(self, *, id: str, store_location=None, store_name: str=None, visibility=None, **kwargs) -> None: + super(CertificateReference, self).__init__(**kwargs) self.id = id self.store_location = store_location self.store_name = store_name @@ -429,9 +944,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,8 +966,8 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) self.name = name @@ -485,23 +1002,85 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +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 CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,8 +1098,8 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() + def __init__(self, *, os_family: str, os_version: str=None, **kwargs) -> None: + super(CloudServiceConfiguration, self).__init__(**kwargs) self.os_family = os_family self.os_version = os_version @@ -531,7 +1110,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,8 +1140,8 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() + def __init__(self, *, container_image_names=None, container_registries=None, **kwargs) -> None: + super(ContainerConfiguration, self).__init__(**kwargs) self.container_image_names = container_image_names self.container_registries = container_registries @@ -568,12 +1149,14 @@ def __init__(self, container_image_names=None, container_registries=None): class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,8 +1171,8 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() + def __init__(self, *, user_name: str, password: str, registry_server: str=None, **kwargs) -> None: + super(ContainerRegistry, self).__init__(**kwargs) self.registry_server = registry_server self.user_name = user_name self.password = password @@ -599,9 +1182,11 @@ class DataDisk(Model): """Data Disk settings which will be used by the data disks associated to Compute Nodes in the pool. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1198,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,8 +1223,8 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() + def __init__(self, *, lun: int, disk_size_gb: int, caching=None, storage_account_type=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) self.lun = lun self.caching = caching self.disk_size_gb = disk_size_gb @@ -649,11 +1234,13 @@ def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,8 +1261,8 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() + def __init__(self, *, code: str, message: str, target: str=None, details=None, **kwargs) -> None: + super(DeleteCertificateError, self).__init__(**kwargs) self.code = code self.message = message self.target = target @@ -704,8 +1291,8 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() + def __init__(self, *, cloud_service_configuration=None, virtual_machine_configuration=None, **kwargs) -> None: + super(DeploymentConfiguration, self).__init__(**kwargs) self.cloud_service_configuration = cloud_service_configuration self.virtual_machine_configuration = virtual_machine_configuration @@ -713,7 +1300,9 @@ def __init__(self, cloud_service_configuration=None, virtual_machine_configurati class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,8 +1317,8 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() + def __init__(self, *, name: str, value: str=None, **kwargs) -> None: + super(EnvironmentSetting, self).__init__(**kwargs) self.name = name self.value = value @@ -767,8 +1356,8 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() + def __init__(self, *, resize_timeout=None, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, node_deallocation_option=None, **kwargs) -> None: + super(FixedScaleSettings, self).__init__(**kwargs) self.resize_timeout = resize_timeout self.target_dedicated_nodes = target_dedicated_nodes self.target_low_priority_nodes = target_low_priority_nodes @@ -815,8 +1404,8 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() + def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, id: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(**kwargs) self.publisher = publisher self.offer = offer self.sku = sku @@ -828,30 +1417,32 @@ class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,8 +1477,8 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() + def __init__(self, *, name: str, protocol, backend_port: int, frontend_port_range_start: int, frontend_port_range_end: int, network_security_group_rules=None, **kwargs) -> None: + super(InboundNatPool, self).__init__(**kwargs) self.name = name self.protocol = protocol self.backend_port = backend_port @@ -899,11 +1490,13 @@ def __init__(self, name, protocol, backend_port, frontend_port_range_start, fron class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,8 +1510,8 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() + def __init__(self, *, id: str, url: str, **kwargs) -> None: + super(KeyVaultReference, self).__init__(**kwargs) self.id = id self.url = url @@ -951,8 +1544,8 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() + def __init__(self, *, uid: int=None, gid: int=None, ssh_private_key: str=None, **kwargs) -> None: + super(LinuxUserConfiguration, self).__init__(**kwargs) self.uid = uid self.gid = gid self.ssh_private_key = ssh_private_key @@ -964,9 +1557,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,8 +1575,8 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(MetadataItem, self).__init__(**kwargs) self.name = name self.value = value @@ -1027,8 +1622,8 @@ class NetworkConfiguration(Model): 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() + def __init__(self, *, subnet_id: str=None, endpoint_configuration=None, **kwargs) -> None: + super(NetworkConfiguration, self).__init__(**kwargs) self.subnet_id = subnet_id self.endpoint_configuration = endpoint_configuration @@ -1036,22 +1631,25 @@ def __init__(self, subnet_id=None, endpoint_configuration=None): class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str """ @@ -1067,8 +1665,8 @@ class NetworkSecurityGroupRule(Model): 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() + def __init__(self, *, priority: int, access, source_address_prefix: str, **kwargs) -> None: + super(NetworkSecurityGroupRule, self).__init__(**kwargs) self.priority = priority self.access = access self.source_address_prefix = source_address_prefix @@ -1095,8 +1693,8 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) self.name = name self.display = display self.origin = origin @@ -1124,40 +1722,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) self.provider = provider self.operation = operation self.resource = resource self.description = description -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools - - -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,1151 +1744,758 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None - - -class ResizeError(Model): - """An error that occurred when resizing a pool. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param details: Additional details about the error. - :type details: list[~azure.mgmt.batch.models.ResizeError] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ResizeError]'}, - } - - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details - - -class ResizeOperationStatus(Model): - """Details about the current or last completed resize operation. - - Describes either the current operation (if the pool AllocationState is - Resizing) or the previously completed operation (if the AllocationState is - Steady). - - :param target_dedicated_nodes: The desired number of dedicated compute - nodes in the pool. - :type target_dedicated_nodes: int - :param target_low_priority_nodes: The desired number of low-priority - compute nodes in the pool. - :type target_low_priority_nodes: int - :param resize_timeout: The timeout for allocation of compute nodes to the - pool or removal of compute nodes from the pool. The default value is 15 - minutes. The minimum value is 5 minutes. If you specify a value less than - 5 minutes, the Batch service returns an error; if you are calling the REST - API directly, the HTTP status code is 400 (Bad Request). - :type resize_timeout: timedelta - :param node_deallocation_option: Determines what to do with a node and its - running task(s) if the pool size is decreasing. The default value is - requeue. Possible values include: 'Requeue', 'Terminate', - 'TaskCompletion', 'RetainedData' - :type node_deallocation_option: str or - ~azure.mgmt.batch.models.ComputeNodeDeallocationOption - :param start_time: The time when this resize operation was started. - :type start_time: datetime - :param errors: Details of any errors encountered while performing the last - resize on the pool. This property is set only if an error occurred during - the last pool resize, and only when the pool allocationState is Steady. - :type errors: list[~azure.mgmt.batch.models.ResizeError] - """ - - _attribute_map = { - 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, - 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, - 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, - 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[ResizeError]'}, - } - - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'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}'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None - - -class ResourceFile(Model): - """A single file or multiple files to be downloaded to a compute node. - - :param auto_storage_container_name: The storage container name in the auto - storage account. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. - :type auto_storage_container_name: str - :param storage_container_url: The URL of the blob container within Azure - Blob Storage. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. This URL must be readable and listable using anonymous access; - that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. - :type storage_container_url: str - :param http_url: The URL of the file to download. The - autoStorageContainerName, storageContainerUrl and httpUrl properties are - mutually exclusive and one of them must be specified. If the URL is Azure - Blob Storage, it must be readable using anonymous access; that is, the - Batch service does not present any credentials when downloading the blob. - There are two ways to get such a URL for a blob in Azure storage: include - a Shared Access Signature (SAS) granting read permissions on the blob, or - set the ACL for the blob or its container to allow public access. - :type http_url: str - :param blob_prefix: The blob prefix to use when downloading blobs from an - Azure Storage container. Only the blobs whose names begin with the - specified prefix will be downloaded. The property is valid only when - autoStorageContainerName or storageContainerUrl is used. This prefix can - be a partial filename or a subdirectory. If a prefix is not specified, all - the files in the container will be downloaded. - :type blob_prefix: str - :param file_path: The location on the compute node to which to download - the file, relative to the task's working directory. If the httpUrl - property is specified, the filePath is required and describes the path - which the file will be downloaded to, including the filename. Otherwise, - if the autoStorageContainerName or storageContainerUrl property is - specified, filePath is optional and is the directory to download the files - to. In the case where filePath is used as a directory, any directory - structure already associated with the input data will be retained in full - and appended to the specified filePath directory. The specified relative - path cannot break out of the task's working directory (for example by - using '..'). - :type file_path: str - :param file_mode: The file permission mode attribute in octal format. This - property applies only to files being downloaded to Linux compute nodes. It - will be ignored if it is specified for a resourceFile which will be - downloaded to a Windows node. If this property is not specified for a - Linux node, then a default value of 0770 is applied to the file. - :type file_mode: str - """ - - _attribute_map = { - 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, - 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, - 'http_url': {'key': 'httpUrl', 'type': 'str'}, - 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - 'file_mode': {'key': 'fileMode', 'type': 'str'}, - } - - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode - - -class ScaleSettings(Model): - """Scale settings for the pool. - - Defines the desired size of the pool. This can either be 'fixedScale' where - the requested targetDedicatedNodes is specified, or 'autoScale' which - defines a formula which is periodically reevaluated. If this property is - not specified, the pool will have a fixed scale with 0 - targetDedicatedNodes. - - :param fixed_scale: Fixed scale settings for the pool. This property and - autoScale are mutually exclusive and one of the properties must be - specified. - :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings - :param auto_scale: AutoScale settings for the pool. This property and - fixedScale are mutually exclusive and one of the properties must be - specified. - :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings - """ - - _attribute_map = { - 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, - 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, - } - - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale - - -class StartTask(Model): - """A task which is run when a compute node joins a pool in the Azure Batch - service, or when the compute node is rebooted or reimaged. - - :param command_line: The command line of the start task. The command line - does not run under a shell, and therefore cannot take advantage of shell - features such as environment variable expansion. If you want to take - advantage of such features, you should invoke the shell in the command - line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - MyCommand" in Linux. Required if any other properties of the startTask are - specified. - :type command_line: str - :param resource_files: A list of files that the Batch service will - download to the compute node before running the command line. - :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] - :param environment_settings: A list of environment variable settings for - the start task. - :type environment_settings: - list[~azure.mgmt.batch.models.EnvironmentSetting] - :param user_identity: The user identity under which the start task runs. - If omitted, the task runs as a non-administrative user unique to the task. - :type user_identity: ~azure.mgmt.batch.models.UserIdentity - :param max_task_retry_count: The maximum number of times the task may be - retried. The Batch service retries a task if its exit code is nonzero. - Note that this value specifically controls the number of retries. The - Batch service will try the task once, and may then retry up to this limit. - For example, if the maximum retry count is 3, Batch tries the task up to 4 - times (one initial try and 3 retries). If the maximum retry count is 0, - the Batch service does not retry the task. If the maximum retry count is - -1, the Batch service retries the task without limit. - :type max_task_retry_count: int - :param wait_for_success: Whether the Batch service should wait for the - start task to complete successfully (that is, to exit with exit code 0) - before scheduling any tasks on the compute node. If true and the start - task fails on a compute node, the Batch service retries the start task up - to its maximum retry count (maxTaskRetryCount). If the task has still not - completed successfully after all retries, then the Batch service marks the - compute node unusable, and will not schedule tasks to it. This condition - can be detected via the node state and scheduling error detail. If false, - the Batch service will not wait for the start task to complete. In this - case, other tasks can start executing on the compute node while the start - task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. - :type wait_for_success: bool - :param container_settings: The settings for the container under which the - start task runs. When this is specified, all directories recursively below - the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the - node) are mapped into the container, all task environment variables are - mapped into the container, and the task command line is executed in the - container. - :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings - """ - - _attribute_map = { - 'command_line': {'key': 'commandLine', 'type': 'str'}, - 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, - 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, - 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, - 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, - 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, - 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, - } - - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings - - -class TaskContainerSettings(Model): - """The container settings for a task. - - :param container_run_options: Additional options to the container create - command. These additional options are supplied as arguments to the "docker - create" command, in addition to those controlled by the Batch Service. - :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. - :type image_name: str - :param registry: The private registry which contains the container image. - This setting can be omitted if was already provided at pool creation. - :type registry: ~azure.mgmt.batch.models.ContainerRegistry - """ - - _validation = { - 'image_name': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { - 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, } - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry + def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, **kwargs) -> None: + super(Pool, self).__init__(**kwargs) + self.display_name = display_name + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = vm_size + self.deployment_configuration = deployment_configuration + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = scale_settings + self.auto_scale_run = None + self.inter_node_communication = inter_node_communication + self.network_configuration = network_configuration + self.max_tasks_per_node = max_tasks_per_node + self.task_scheduling_policy = task_scheduling_policy + self.user_accounts = user_accounts + self.metadata = metadata + self.start_task = start_task + self.certificates = certificates + self.application_packages = application_packages + self.application_licenses = application_licenses + self.resize_operation_status = None -class TaskSchedulingPolicy(Model): - """Specifies how tasks should be distributed across compute nodes. +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' - :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] """ _validation = { - 'node_fill_type': {'required': True}, + 'inbound_nat_pools': {'required': True}, } _attribute_map = { - 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, } - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type + def __init__(self, *, inbound_nat_pools, **kwargs) -> None: + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = inbound_nat_pools -class UserAccount(Model): - """Properties used to create a user on an Azure Batch node. +class ResizeError(Model): + """An error that occurred when resizing a pool. - :param name: The name of the user account. - :type name: str - :param password: The password for the user account. - :type password: str - :param elevation_level: The elevation level of the user account. nonAdmin - - The auto user is a standard user without elevated access. admin - The - auto user is a user with elevated access and operates with full - Administrator permissions. The default value is nonAdmin. Possible values - include: 'NonAdmin', 'Admin' - :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel - :param linux_user_configuration: The Linux-specific user configuration for - the user account. This property is ignored if specified on a Windows pool. - If not specified, the user is created with the default options. - :type linux_user_configuration: - ~azure.mgmt.batch.models.LinuxUserConfiguration - :param windows_user_configuration: The Windows-specific user configuration - for the user account. This property can only be specified if the user is - on a Windows pool. If not specified and on a Windows pool, the user is - created with the default options. - :type windows_user_configuration: - ~azure.mgmt.batch.models.WindowsUserConfiguration + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. + :type code: str + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. + :type message: str + :param details: Additional details about the error. + :type details: list[~azure.mgmt.batch.models.ResizeError] """ _validation = { - 'name': {'required': True}, - 'password': {'required': True}, + 'code': {'required': True}, + 'message': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, - 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, - 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ResizeError]'}, } - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(ResizeError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details -class UserIdentity(Model): - """The definition of the user identity under which the task is run. +class ResizeOperationStatus(Model): + """Details about the current or last completed resize operation. - Specify either the userName or autoUser property, but not both. + Describes either the current operation (if the pool AllocationState is + Resizing) or the previously completed operation (if the AllocationState is + Steady). - :param user_name: The name of the user identity under which the task is - run. The userName and autoUser properties are mutually exclusive; you must - specify one but not both. - :type user_name: str - :param auto_user: The auto user under which the task is run. The userName - and autoUser properties are mutually exclusive; you must specify one but - not both. - :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification + :param target_dedicated_nodes: The desired number of dedicated compute + nodes in the pool. + :type target_dedicated_nodes: int + :param target_low_priority_nodes: The desired number of low-priority + compute nodes in the pool. + :type target_low_priority_nodes: int + :param resize_timeout: The timeout for allocation of compute nodes to the + pool or removal of compute nodes from the pool. The default value is 15 + minutes. The minimum value is 5 minutes. If you specify a value less than + 5 minutes, the Batch service returns an error; if you are calling the REST + API directly, the HTTP status code is 400 (Bad Request). + :type resize_timeout: timedelta + :param node_deallocation_option: Determines what to do with a node and its + running task(s) if the pool size is decreasing. The default value is + requeue. Possible values include: 'Requeue', 'Terminate', + 'TaskCompletion', 'RetainedData' + :type node_deallocation_option: str or + ~azure.mgmt.batch.models.ComputeNodeDeallocationOption + :param start_time: The time when this resize operation was started. + :type start_time: datetime + :param errors: Details of any errors encountered while performing the last + resize on the pool. This property is set only if an error occurred during + the last pool resize, and only when the pool allocationState is Steady. + :type errors: list[~azure.mgmt.batch.models.ResizeError] """ _attribute_map = { - 'user_name': {'key': 'userName', 'type': 'str'}, - 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, + 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, + 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, + 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, + 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user + def __init__(self, *, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None, **kwargs) -> None: + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = target_dedicated_nodes + self.target_low_priority_nodes = target_low_priority_nodes + self.resize_timeout = resize_timeout + self.node_deallocation_option = node_deallocation_option + self.start_time = start_time + self.errors = errors -class VirtualMachineConfiguration(Model): - """The configuration for compute nodes in a pool based on the Azure Virtual - Machines infrastructure. +class ResourceFile(Model): + """A single file or multiple files to be downloaded to a compute node. - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. - :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be - provisioned on compute nodes in the pool. The Batch node agent is a - program that runs on each node in the pool, and provides the - command-and-control interface between the node and the Batch service. - There are different implementations of the node agent, known as SKUs, for - different operating systems. You must specify a node agent SKU which - matches the selected image reference. To get the list of supported node - agent SKUs along with their list of verified image references, see the - 'List supported node agent SKUs' operation. - :type node_agent_sku_id: str - :param windows_configuration: Windows operating system settings on the - virtual machine. This property must not be specified if the imageReference - specifies a Linux OS image. - :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration - :param data_disks: The configuration for data disks attached to the - compute nodes in the pool. This property must be specified if the compute - nodes in the pool need to have empty data disks attached to them. - :type data_disks: list[~azure.mgmt.batch.models.DataDisk] - :param license_type: The type of on-premises license to be used when - deploying the operating system. This only applies to images that contain - the Windows operating system, and should only be used when you hold valid - on-premises licenses for the nodes which will be deployed. If omitted, no - on-premises licensing discount is applied. Values are: - Windows_Server - The on-premises license is for Windows Server. - Windows_Client - The on-premises license is for Windows Client. - :type license_type: str - :param container_configuration: The container configuration for the pool. - If specified, setup is performed on each node in the pool to allow tasks - to run in containers. All regular tasks and job manager tasks run on this - pool must specify the containerSettings property, and all other tasks may - specify it. - :type container_configuration: - ~azure.mgmt.batch.models.ContainerConfiguration + :param auto_storage_container_name: The storage container name in the auto + storage account. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. + :type auto_storage_container_name: str + :param storage_container_url: The URL of the blob container within Azure + Blob Storage. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. This URL must be readable and listable using anonymous access; + that is, the Batch service does not present any credentials when + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. + :type storage_container_url: str + :param http_url: The URL of the file to download. The + autoStorageContainerName, storageContainerUrl and httpUrl properties are + mutually exclusive and one of them must be specified. If the URL is Azure + Blob Storage, it must be readable using anonymous access; that is, the + Batch service does not present any credentials when downloading the blob. + There are two ways to get such a URL for a blob in Azure storage: include + a Shared Access Signature (SAS) granting read permissions on the blob, or + set the ACL for the blob or its container to allow public access. + :type http_url: str + :param blob_prefix: The blob prefix to use when downloading blobs from an + Azure Storage container. Only the blobs whose names begin with the + specified prefix will be downloaded. The property is valid only when + autoStorageContainerName or storageContainerUrl is used. This prefix can + be a partial filename or a subdirectory. If a prefix is not specified, all + the files in the container will be downloaded. + :type blob_prefix: str + :param file_path: The location on the compute node to which to download + the file, relative to the task's working directory. If the httpUrl + property is specified, the filePath is required and describes the path + which the file will be downloaded to, including the filename. Otherwise, + if the autoStorageContainerName or storageContainerUrl property is + specified, filePath is optional and is the directory to download the files + to. In the case where filePath is used as a directory, any directory + structure already associated with the input data will be retained in full + and appended to the specified filePath directory. The specified relative + path cannot break out of the task's working directory (for example by + using '..'). + :type file_path: str + :param file_mode: The file permission mode attribute in octal format. This + property applies only to files being downloaded to Linux compute nodes. It + will be ignored if it is specified for a resourceFile which will be + downloaded to a Windows node. If this property is not specified for a + Linux node, then a default value of 0770 is applied to the file. + :type file_mode: str """ - _validation = { - 'image_reference': {'required': True}, - 'node_agent_sku_id': {'required': True}, - } - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, + 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, + 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, + 'http_url': {'key': 'httpUrl', 'type': 'str'}, + 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration + def __init__(self, *, auto_storage_container_name: str=None, storage_container_url: str=None, http_url: str=None, blob_prefix: str=None, file_path: str=None, file_mode: str=None, **kwargs) -> None: + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = auto_storage_container_name + self.storage_container_url = storage_container_url + self.http_url = http_url + self.blob_prefix = blob_prefix + self.file_path = file_path + self.file_mode = file_mode -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. +class ScaleSettings(Model): + """Scale settings for the pool. - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool + Defines the desired size of the pool. This can either be 'fixedScale' where + the requested targetDedicatedNodes is specified, or 'autoScale' which + defines a formula which is periodically reevaluated. If this property is + not specified, the pool will have a fixed scale with 0 + targetDedicatedNodes. + + :param fixed_scale: Fixed scale settings for the pool. This property and + autoScale are mutually exclusive and one of the properties must be + specified. + :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings + :param auto_scale: AutoScale settings for the pool. This property and + fixedScale are mutually exclusive and one of the properties must be + specified. + :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings """ _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, + 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates + def __init__(self, *, fixed_scale=None, auto_scale=None, **kwargs) -> None: + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = fixed_scale + self.auto_scale = auto_scale -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. +class StartTask(Model): + """A task which is run when a compute node joins a pool in the Azure Batch + service, or when the compute node is rebooted or reimaged. - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + + :param command_line: The command line of the start task. The command line + does not run under a shell, and therefore cannot take advantage of shell + features such as environment variable expansion. If you want to take + advantage of such features, you should invoke the shell in the command + line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c + MyCommand" in Linux. Required if any other properties of the startTask are + specified. + :type command_line: str + :param resource_files: A list of files that the Batch service will + download to the compute node before running the command line. + :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] + :param environment_settings: A list of environment variable settings for + the start task. + :type environment_settings: + list[~azure.mgmt.batch.models.EnvironmentSetting] + :param user_identity: The user identity under which the start task runs. + If omitted, the task runs as a non-administrative user unique to the task. + :type user_identity: ~azure.mgmt.batch.models.UserIdentity + :param max_task_retry_count: The maximum number of times the task may be + retried. The Batch service retries a task if its exit code is nonzero. + Note that this value specifically controls the number of retries. The + Batch service will try the task once, and may then retry up to this limit. + For example, if the maximum retry count is 3, Batch tries the task up to 4 + times (one initial try and 3 retries). If the maximum retry count is 0, + the Batch service does not retry the task. If the maximum retry count is + -1, the Batch service retries the task without limit. + :type max_task_retry_count: int + :param wait_for_success: Whether the Batch service should wait for the + start task to complete successfully (that is, to exit with exit code 0) + before scheduling any tasks on the compute node. If true and the start + task fails on a compute node, the Batch service retries the start task up + to its maximum retry count (maxTaskRetryCount). If the task has still not + completed successfully after all retries, then the Batch service marks the + compute node unusable, and will not schedule tasks to it. This condition + can be detected via the node state and scheduling error detail. If false, + the Batch service will not wait for the start task to complete. In this + case, other tasks can start executing on the compute node while the start + task is still running; and even if the start task fails, new tasks will + continue to be scheduled on the node. The default is false. + :type wait_for_success: bool + :param container_settings: The settings for the container under which the + start task runs. When this is specified, all directories recursively below + the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the + node) are mapped into the container, all task environment variables are + mapped into the container, and the task command line is executed in the + container. + :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings """ _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, + 'command_line': {'key': 'commandLine', 'type': 'str'}, + 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, + 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, + 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, + 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, + 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, + 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode + def __init__(self, *, command_line: str=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count: int=None, wait_for_success: bool=None, container_settings=None, **kwargs) -> None: + super(StartTask, self).__init__(**kwargs) + self.command_line = command_line + self.resource_files = resource_files + self.environment_settings = environment_settings + self.user_identity = user_identity + self.max_task_retry_count = max_task_retry_count + self.wait_for_success = wait_for_success + self.container_settings = container_settings -class Application(ProxyResource): - """Contains information about an application in a Batch account. +class TaskContainerSettings(Model): + """The container settings for a task. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str + :param container_run_options: Additional options to the container create + command. These additional options are supplied as arguments to the "docker + create" command, in addition to those controlled by the Batch Service. + :type container_run_options: str + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. + :type image_name: str + :param registry: The private registry which contains the container image. + This setting can be omitted if was already provided at pool creation. + :type registry: ~azure.mgmt.batch.models.ContainerRegistry """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'image_name': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, } - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version + def __init__(self, *, image_name: str, container_run_options: str=None, registry=None, **kwargs) -> None: + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = container_run_options + self.image_name = image_name + self.registry = registry -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. +class TaskSchedulingPolicy(Model): + """Specifies how tasks should be distributed across compute nodes. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' + :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, + 'node_fill_type': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, *, node_fill_type, **kwargs) -> None: + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = node_fill_type -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class UserAccount(Model): + """Properties used to create a user on an Azure Batch node. + + All required parameters must be populated in order to send to Azure. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + :param name: Required. The name of the user account. + :type name: str + :param password: Required. The password for the user account. + :type password: str + :param elevation_level: The elevation level of the user account. nonAdmin + - The auto user is a standard user without elevated access. admin - The + auto user is a user with elevated access and operates with full + Administrator permissions. The default value is nonAdmin. Possible values + include: 'NonAdmin', 'Admin' + :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel + :param linux_user_configuration: The Linux-specific user configuration for + the user account. This property is ignored if specified on a Windows pool. + If not specified, the user is created with the default options. + :type linux_user_configuration: + ~azure.mgmt.batch.models.LinuxUserConfiguration + :param windows_user_configuration: The Windows-specific user configuration + for the user account. This property can only be specified if the user is + on a Windows pool. If not specified and on a Windows pool, the user is + created with the default options. + :type windows_user_configuration: + ~azure.mgmt.batch.models.WindowsUserConfiguration """ _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, + 'name': {'required': True}, + 'password': {'required': True}, } _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, + 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, + 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync + def __init__(self, *, name: str, password: str, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None, **kwargs) -> None: + super(UserAccount, self).__init__(**kwargs) + self.name = name + self.password = password + self.elevation_level = elevation_level + self.linux_user_configuration = linux_user_configuration + self.windows_user_configuration = windows_user_configuration -class BatchAccount(Resource): - """Contains information about an Azure Batch account. +class UserIdentity(Model): + """The definition of the user identity under which the task is run. - Variables are only populated by the server, and will be ignored when - sending a request. + Specify either the userName or autoUser property, but not both. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int + :param user_name: The name of the user identity under which the task is + run. The userName and autoUser properties are mutually exclusive; you must + specify one but not both. + :type user_name: str + :param auto_user: The auto user under which the task is run. The userName + and autoUser properties are mutually exclusive; you must specify one but + not both. + :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'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}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, } - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None + def __init__(self, *, user_name: str=None, auto_user=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.user_name = user_name + self.auto_user = auto_user -class Certificate(ProxyResource): - """Contains information about a certificate. +class VirtualMachineConfiguration(Model): + """The configuration for compute nodes in a pool based on the Azure Virtual + Machines infrastructure. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. + :type image_reference: ~azure.mgmt.batch.models.ImageReference + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be + provisioned on compute nodes in the pool. The Batch node agent is a + program that runs on each node in the pool, and provides the + command-and-control interface between the node and the Batch service. + There are different implementations of the node agent, known as SKUs, for + different operating systems. You must specify a node agent SKU which + matches the selected image reference. To get the list of supported node + agent SKUs along with their list of verified image references, see the + 'List supported node agent SKUs' operation. + :type node_agent_sku_id: str + :param windows_configuration: Windows operating system settings on the + virtual machine. This property must not be specified if the imageReference + specifies a Linux OS image. + :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration + :param data_disks: The configuration for data disks attached to the + compute nodes in the pool. This property must be specified if the compute + nodes in the pool need to have empty data disks attached to them. + :type data_disks: list[~azure.mgmt.batch.models.DataDisk] + :param license_type: The type of on-premises license to be used when + deploying the operating system. This only applies to images that contain + the Windows operating system, and should only be used when you hold valid + on-premises licenses for the nodes which will be deployed. If omitted, no + on-premises licensing discount is applied. Values are: + Windows_Server - The on-premises license is for Windows Server. + Windows_Client - The on-premises license is for Windows Client. + :type license_type: str + :param container_configuration: The container configuration for the pool. + If specified, setup is performed on each node in the pool to allow tasks + to run in containers. All regular tasks and job manager tasks run on this + pool must specify the containerSettings property, and all other tasks may + specify it. + :type container_configuration: + ~azure.mgmt.batch.models.ContainerConfiguration """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, + 'image_reference': {'required': True}, + 'node_agent_sku_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None + def __init__(self, *, image_reference, node_agent_sku_id: str, windows_configuration=None, data_disks=None, license_type: str=None, container_configuration=None, **kwargs) -> None: + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = image_reference + self.node_agent_sku_id = node_agent_sku_id + self.windows_configuration = windows_configuration + self.data_disks = data_disks + self.license_type = license_type + self.container_configuration = container_configuration -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - + def __init__(self, **kwargs) -> None: + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class Pool(ProxyResource): - """Contains information about a pool. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, + _attribute_map = { + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } + def __init__(self, *, enable_automatic_updates: bool=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = enable_automatic_updates + + +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. + + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, *, login_mode=None, **kwargs) -> None: + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = login_mode diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py index 1eb94dd020cd..1865025a41f0 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py @@ -25,8 +25,6 @@ class BatchAccountPaged(Paged): def __init__(self, *args, **kwargs): super(BatchAccountPaged, self).__init__(*args, **kwargs) - - class ApplicationPackagePaged(Paged): """ A paging container for iterating over a list of :class:`ApplicationPackage ` object @@ -40,8 +38,6 @@ class ApplicationPackagePaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPackagePaged, self).__init__(*args, **kwargs) - - class ApplicationPaged(Paged): """ A paging container for iterating over a list of :class:`Application ` object @@ -55,8 +51,6 @@ class ApplicationPaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPaged, self).__init__(*args, **kwargs) - - class OperationPaged(Paged): """ A paging container for iterating over a list of :class:`Operation ` object @@ -70,8 +64,6 @@ class OperationPaged(Paged): def __init__(self, *args, **kwargs): super(OperationPaged, self).__init__(*args, **kwargs) - - class CertificatePaged(Paged): """ A paging container for iterating over a list of :class:`Certificate ` object @@ -85,8 +77,6 @@ class CertificatePaged(Paged): def __init__(self, *args, **kwargs): super(CertificatePaged, self).__init__(*args, **kwargs) - - class PoolPaged(Paged): """ A paging container for iterating over a list of :class:`Pool ` object diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py index 457cbd3470cd..818f748e2734 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py @@ -9,13 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_account_operations import BatchAccountOperations -from .application_package_operations import ApplicationPackageOperations -from .application_operations import ApplicationOperations -from .location_operations import LocationOperations -from .operations import Operations -from .certificate_operations import CertificateOperations -from .pool_operations import PoolOperations +from ._batch_account_operations import BatchAccountOperations +from ._application_package_operations import ApplicationPackageOperations +from ._application_operations import ApplicationOperations +from ._location_operations import LocationOperations +from ._operations import Operations +from ._certificate_operations import CertificateOperations +from ._pool_operations import PoolOperations __all__ = [ 'BatchAccountOperations', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py similarity index 92% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py index b447de1a57b8..2ceacf73cd3c 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py @@ -19,11 +19,13 @@ class ApplicationOperations(object): """ApplicationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -77,6 +79,7 @@ def create( # 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()) @@ -92,9 +95,8 @@ def create( body_content = None # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -102,7 +104,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -150,7 +151,6 @@ def delete( # 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: @@ -159,8 +159,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -210,7 +210,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -219,8 +219,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -228,7 +228,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -279,6 +278,7 @@ def update( # 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()) @@ -291,9 +291,8 @@ def update( body_content = self._serialize.body(parameters, 'Application') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -301,7 +300,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -334,8 +332,7 @@ def list( ~azure.mgmt.batch.models.ApplicationPaged[~azure.mgmt.batch.models.Application] :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'] @@ -358,7 +355,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -367,9 +364,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -379,12 +380,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py similarity index 92% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py index 0823f92e92f0..a3e792b0b3af 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py @@ -19,11 +19,13 @@ class ApplicationPackageOperations(object): """ApplicationPackageOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -82,6 +84,7 @@ def activate( # 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()) @@ -94,9 +97,8 @@ def activate( body_content = self._serialize.body(parameters, 'ActivateApplicationPackageParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -104,7 +106,6 @@ def activate( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -158,6 +159,7 @@ def create( # 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()) @@ -173,9 +175,8 @@ def create( body_content = None # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -183,7 +184,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -234,7 +234,6 @@ def delete( # 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: @@ -243,8 +242,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -297,7 +296,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -306,8 +305,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -315,7 +314,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -351,8 +349,7 @@ def list( ~azure.mgmt.batch.models.ApplicationPackagePaged[~azure.mgmt.batch.models.ApplicationPackage] :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'] @@ -376,7 +373,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -385,9 +382,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -397,12 +398,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py similarity index 84% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py index 70fc40e1b618..635b97d5e875 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class BatchAccountOperations(object): """BatchAccountOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -57,6 +59,7 @@ def _create_initial( # 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()) @@ -69,9 +72,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'BatchAccountCreateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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, 202]: exp = CloudError(response) @@ -90,16 +92,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. @@ -118,13 +117,16 @@ def create( :type parameters: ~azure.mgmt.batch.models.BatchAccountCreateParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns BatchAccount - or ClientRawResponse if raw=true + :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 BatchAccount or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.BatchAccount] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.BatchAccount]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -135,30 +137,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'Location': 'str', 'Retry-After': 'int', @@ -172,12 +152,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} def update( @@ -221,6 +202,7 @@ def update( # 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()) @@ -233,9 +215,8 @@ def update( body_content = self._serialize.body(parameters, 'BatchAccountUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -243,7 +224,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccount', response) @@ -272,7 +252,6 @@ def _delete_initial( # 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: @@ -281,8 +260,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -299,7 +278,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified Batch account. :param resource_group_name: The name of the resource group that @@ -308,12 +287,14 @@ def delete( :param account_name: The name of the Batch account. :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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -323,30 +304,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -355,12 +314,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}'} def get( @@ -397,7 +357,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -406,8 +366,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -415,7 +375,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccount', response) @@ -441,8 +400,7 @@ def list( ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] :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'] @@ -461,7 +419,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -470,9 +428,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -482,12 +444,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts'} @@ -510,8 +470,7 @@ def list_by_resource_group( ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] :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'] @@ -531,7 +490,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -540,9 +499,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -552,12 +515,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts'} @@ -596,7 +557,6 @@ def synchronize_auto_storage_keys( # 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: @@ -605,8 +565,8 @@ def synchronize_auto_storage_keys( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -657,6 +617,7 @@ def regenerate_key( # 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()) @@ -669,9 +630,8 @@ def regenerate_key( body_content = self._serialize.body(parameters, 'BatchAccountRegenerateKeyParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -679,7 +639,6 @@ def regenerate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccountKeys', response) @@ -730,7 +689,7 @@ def get_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -739,8 +698,8 @@ def get_keys( 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, stream=False, **operation_config) + 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) @@ -748,7 +707,6 @@ def get_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccountKeys', response) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py similarity index 84% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py index 8db5cd991d95..eb726f288a3f 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class CertificateOperations(object): """CertificateOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -69,8 +71,7 @@ def list_by_batch_account( ~azure.mgmt.batch.models.CertificatePaged[~azure.mgmt.batch.models.Certificate] :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_batch_account.metadata['url'] @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -106,9 +107,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -118,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates'} @@ -147,6 +150,7 @@ def _create_initial( # 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()) @@ -163,9 +167,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -183,16 +186,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new certificate inside the specified account. :param resource_group_name: The name of the resource group that @@ -217,13 +217,16 @@ def create( will be ignored. :type if_none_match: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Certificate - or ClientRawResponse if raw=true + :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 Certificate or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Certificate] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Certificate]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -237,30 +240,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'ETag': 'str', } @@ -273,12 +254,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} def update( @@ -327,6 +309,7 @@ def update( # 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()) @@ -341,18 +324,16 @@ def update( body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { @@ -386,7 +367,6 @@ def _delete_initial( # 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: @@ -395,8 +375,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -413,7 +393,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified certificate. :param resource_group_name: The name of the resource group that @@ -426,12 +406,14 @@ def delete( match the certificate data in the request. For example SHA1-a3d1c5. :type certificate_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -442,30 +424,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -474,12 +434,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} def get( @@ -521,7 +482,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -530,17 +491,16 @@ def get( 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, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { @@ -603,7 +563,7 @@ def cancel_deletion( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -612,17 +572,16 @@ def cancel_deletion( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py similarity index 91% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py index 84b9be79e2c0..686dc2b3097b 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py @@ -19,11 +19,13 @@ class LocationOperations(object): """LocationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -69,7 +71,7 @@ def get_quotas( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -78,8 +80,8 @@ def get_quotas( 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, stream=False, **operation_config) + 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) @@ -87,7 +89,6 @@ def get_quotas( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchLocationQuota', response) @@ -133,6 +134,7 @@ def check_name_availability( # 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()) @@ -145,9 +147,8 @@ def check_name_availability( body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -155,7 +156,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResult', response) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py similarity index 82% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py index 4774273e7176..799529b363cb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/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: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -51,8 +53,7 @@ def list( ~azure.mgmt.batch.models.OperationPaged[~azure.mgmt.batch.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'] @@ -67,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -76,9 +77,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -88,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.Batch/operations'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py similarity index 85% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py index 02cab779f816..95715cda042a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class PoolOperations(object): """PoolOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -79,8 +81,7 @@ def list_by_batch_account( ~azure.mgmt.batch.models.PoolPaged[~azure.mgmt.batch.models.Pool] :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_batch_account.metadata['url'] @@ -107,7 +108,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -116,9 +117,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -128,12 +133,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools'} @@ -157,6 +160,7 @@ def _create_initial( # 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()) @@ -173,9 +177,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'Pool') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -193,16 +196,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new pool inside the specified account. :param resource_group_name: The name of the resource group that @@ -225,13 +225,16 @@ def create( ignored. :type if_none_match: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Pool or - ClientRawResponse if raw=true + :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 Pool or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Pool] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Pool]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -245,30 +248,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'ETag': 'str', } @@ -281,12 +262,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} def update( @@ -335,6 +317,7 @@ def update( # 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()) @@ -349,18 +332,16 @@ def update( body_content = self._serialize.body(parameters, 'Pool') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -394,7 +375,6 @@ def _delete_initial( # 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: @@ -403,8 +383,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -421,7 +401,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified pool. :param resource_group_name: The name of the resource group that @@ -433,12 +413,14 @@ def delete( account. :type pool_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -449,30 +431,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -481,12 +441,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}/pools/{poolName}'} def get( @@ -527,7 +488,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -536,17 +497,16 @@ def get( 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, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -599,7 +559,7 @@ def disable_auto_scale( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -608,17 +568,16 @@ def disable_auto_scale( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -680,7 +639,7 @@ def stop_resize( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -689,17 +648,16 @@ def stop_resize( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { From b3a600d4da18eaf96384bd24b21b7487e19642f1 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2019 02:44:40 +0000 Subject: [PATCH 05/37] Generated from 7e0f5408fe4fa42660222ec1c5cca8ae9440afde (#27) fix: Batch model validation errors - Add body for RESPONSE_BODY_NOT_IN_EXAMPLE errors - active -> Active for state enum in 2017-09-01 examples --- .../azure/mgmt/batch/__init__.py | 7 +- ..._client.py => _batch_management_client.py} | 59 +- .../azure/mgmt/batch/_configuration.py | 49 + .../azure/mgmt/batch/models/__init__.py | 97 +- .../models/_batch_management_client_enums.py | 146 +- .../azure/mgmt/batch/models/_models.py | 2267 +++++++------- .../azure/mgmt/batch/models/_models_py3.py | 2649 +++++++++-------- .../azure/mgmt/batch/models/_paged_models.py | 10 - .../azure/mgmt/batch/operations/__init__.py | 14 +- ...erations.py => _application_operations.py} | 53 +- ....py => _application_package_operations.py} | 53 +- ...ations.py => _batch_account_operations.py} | 192 +- ...erations.py => _certificate_operations.py} | 165 +- ..._operations.py => _location_operations.py} | 20 +- .../{operations.py => _operations.py} | 27 +- ...pool_operations.py => _pool_operations.py} | 174 +- 16 files changed, 3115 insertions(+), 2867 deletions(-) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/{batch_management_client.py => _batch_management_client.py} (61%) create mode 100644 sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{application_operations.py => _application_operations.py} (92%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{application_package_operations.py => _application_package_operations.py} (92%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{batch_account_operations.py => _batch_account_operations.py} (84%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{certificate_operations.py => _certificate_operations.py} (84%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{location_operations.py => _location_operations.py} (91%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{operations.py => _operations.py} (82%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{pool_operations.py => _pool_operations.py} (85%) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py index da4d07e1222e..bfdd6ac1c466 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_management_client import BatchManagementClient -from .version import VERSION +from ._configuration import BatchManagementClientConfiguration +from ._batch_management_client import BatchManagementClient +__all__ = ['BatchManagementClient', 'BatchManagementClientConfiguration'] -__all__ = ['BatchManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py similarity index 61% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py index d31cfa110ab2..6cdcc5ca3eaf 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py @@ -9,54 +9,21 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.batch_account_operations import BatchAccountOperations -from .operations.application_package_operations import ApplicationPackageOperations -from .operations.application_operations import ApplicationOperations -from .operations.location_operations import LocationOperations -from .operations.operations import Operations -from .operations.certificate_operations import CertificateOperations -from .operations.pool_operations import PoolOperations -from . import models - - -class BatchManagementClientConfiguration(AzureConfiguration): - """Configuration for BatchManagementClient - 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 Azure subscription ID. This is a - GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - :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(BatchManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-batch/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import BatchManagementClientConfiguration +from .operations import BatchAccountOperations +from .operations import ApplicationPackageOperations +from .operations import ApplicationOperations +from .operations import LocationOperations +from .operations import Operations +from .operations import CertificateOperations +from .operations import PoolOperations +from . import models -class BatchManagementClient(object): +class BatchManagementClient(SDKClient): """BatchManagementClient :ivar config: Configuration for client. @@ -90,10 +57,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = BatchManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(BatchManagementClient, 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-12-01' + self.api_version = '2019-04-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py new file mode 100644 index 000000000000..75c9d4004f40 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class BatchManagementClientConfiguration(AzureConfiguration): + """Configuration for BatchManagementClient + 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 Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :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(BatchManagementClientConfiguration, 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-batch/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py index ad7c3fe653cf..b17bdd9834c9 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py @@ -9,21 +9,26 @@ # regenerated. # -------------------------------------------------------------------------- - try: from ._models_py3 import ActivateApplicationPackageParameters + from ._models_py3 import Application + from ._models_py3 import ApplicationPackage from ._models_py3 import ApplicationPackageReference from ._models_py3 import AutoScaleRun from ._models_py3 import AutoScaleRunError from ._models_py3 import AutoScaleSettings from ._models_py3 import AutoStorageBaseProperties + from ._models_py3 import AutoStorageProperties from ._models_py3 import AutoUserSpecification + from ._models_py3 import BatchAccount from ._models_py3 import BatchAccountCreateParameters from ._models_py3 import BatchAccountKeys from ._models_py3 import BatchAccountRegenerateKeyParameters from ._models_py3 import BatchAccountUpdateParameters from ._models_py3 import BatchLocationQuota + from ._models_py3 import Certificate from ._models_py3 import CertificateBaseProperties + from ._models_py3 import CertificateCreateOrUpdateParameters from ._models_py3 import CertificateReference from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import CheckNameAvailabilityResult @@ -44,6 +49,7 @@ from ._models_py3 import NetworkSecurityGroupRule from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import Pool from ._models_py3 import PoolEndpointConfiguration from ._models_py3 import ProxyResource from ._models_py3 import ResizeError @@ -57,29 +63,29 @@ from ._models_py3 import UserAccount from ._models_py3 import UserIdentity from ._models_py3 import VirtualMachineConfiguration + from ._models_py3 import VirtualMachineFamilyCoreQuota from ._models_py3 import WindowsConfiguration from ._models_py3 import WindowsUserConfiguration - from ._models_py3 import Application - from ._models_py3 import ApplicationPackage - from ._models_py3 import AutoStorageProperties - from ._models_py3 import BatchAccount - from ._models_py3 import Certificate - from ._models_py3 import CertificateCreateOrUpdateParameters - from ._models_py3 import Pool except (SyntaxError, ImportError): from ._models import ActivateApplicationPackageParameters + from ._models import Application + from ._models import ApplicationPackage from ._models import ApplicationPackageReference from ._models import AutoScaleRun from ._models import AutoScaleRunError from ._models import AutoScaleSettings from ._models import AutoStorageBaseProperties + from ._models import AutoStorageProperties from ._models import AutoUserSpecification + from ._models import BatchAccount from ._models import BatchAccountCreateParameters from ._models import BatchAccountKeys from ._models import BatchAccountRegenerateKeyParameters from ._models import BatchAccountUpdateParameters from ._models import BatchLocationQuota + from ._models import Certificate from ._models import CertificateBaseProperties + from ._models import CertificateCreateOrUpdateParameters from ._models import CertificateReference from ._models import CheckNameAvailabilityParameters from ._models import CheckNameAvailabilityResult @@ -100,6 +106,7 @@ from ._models import NetworkSecurityGroupRule from ._models import Operation from ._models import OperationDisplay + from ._models import Pool from ._models import PoolEndpointConfiguration from ._models import ProxyResource from ._models import ResizeError @@ -113,58 +120,59 @@ from ._models import UserAccount from ._models import UserIdentity from ._models import VirtualMachineConfiguration + from ._models import VirtualMachineFamilyCoreQuota from ._models import WindowsConfiguration from ._models import WindowsUserConfiguration - from ._models import Application - from ._models import ApplicationPackage - from ._models import AutoStorageProperties - from ._models import BatchAccount - from ._models import Certificate - from ._models import CertificateCreateOrUpdateParameters - from ._models import Pool -from ._paged_models import BatchAccountPaged from ._paged_models import ApplicationPackagePaged from ._paged_models import ApplicationPaged -from ._paged_models import OperationPaged +from ._paged_models import BatchAccountPaged from ._paged_models import CertificatePaged +from ._paged_models import OperationPaged from ._paged_models import PoolPaged -from ._batch_management_client_enums import PoolAllocationMode -from ._batch_management_client_enums import ProvisioningState -from ._batch_management_client_enums import AccountKeyType -from ._batch_management_client_enums import PackageState -from ._batch_management_client_enums import CertificateFormat -from ._batch_management_client_enums import CertificateProvisioningState -from ._batch_management_client_enums import PoolProvisioningState -from ._batch_management_client_enums import AllocationState -from ._batch_management_client_enums import CachingType -from ._batch_management_client_enums import StorageAccountType -from ._batch_management_client_enums import ComputeNodeDeallocationOption -from ._batch_management_client_enums import InterNodeCommunicationState -from ._batch_management_client_enums import InboundEndpointProtocol -from ._batch_management_client_enums import NetworkSecurityGroupRuleAccess -from ._batch_management_client_enums import ComputeNodeFillType -from ._batch_management_client_enums import ElevationLevel -from ._batch_management_client_enums import LoginMode -from ._batch_management_client_enums import AutoUserScope -from ._batch_management_client_enums import CertificateStoreLocation -from ._batch_management_client_enums import CertificateVisibility -from ._batch_management_client_enums import NameAvailabilityReason +from ._batch_management_client_enums import ( + PoolAllocationMode, + ProvisioningState, + AccountKeyType, + PackageState, + CertificateFormat, + CertificateProvisioningState, + PoolProvisioningState, + AllocationState, + CachingType, + StorageAccountType, + ComputeNodeDeallocationOption, + InterNodeCommunicationState, + InboundEndpointProtocol, + NetworkSecurityGroupRuleAccess, + ComputeNodeFillType, + ElevationLevel, + LoginMode, + AutoUserScope, + CertificateStoreLocation, + CertificateVisibility, + NameAvailabilityReason, +) - -__all__=[ +__all__ = [ 'ActivateApplicationPackageParameters', + 'Application', + 'ApplicationPackage', 'ApplicationPackageReference', 'AutoScaleRun', 'AutoScaleRunError', 'AutoScaleSettings', 'AutoStorageBaseProperties', + 'AutoStorageProperties', 'AutoUserSpecification', + 'BatchAccount', 'BatchAccountCreateParameters', 'BatchAccountKeys', 'BatchAccountRegenerateKeyParameters', 'BatchAccountUpdateParameters', 'BatchLocationQuota', + 'Certificate', 'CertificateBaseProperties', + 'CertificateCreateOrUpdateParameters', 'CertificateReference', 'CheckNameAvailabilityParameters', 'CheckNameAvailabilityResult', @@ -185,6 +193,7 @@ 'NetworkSecurityGroupRule', 'Operation', 'OperationDisplay', + 'Pool', 'PoolEndpointConfiguration', 'ProxyResource', 'ResizeError', @@ -198,15 +207,9 @@ 'UserAccount', 'UserIdentity', 'VirtualMachineConfiguration', + 'VirtualMachineFamilyCoreQuota', 'WindowsConfiguration', 'WindowsUserConfiguration', - 'Application', - 'ApplicationPackage', - 'AutoStorageProperties', - 'BatchAccount', - 'Certificate', - 'CertificateCreateOrUpdateParameters', - 'Pool', 'BatchAccountPaged', 'ApplicationPackagePaged', 'ApplicationPaged', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py index da2eba944432..0bd6782557aa 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py @@ -12,137 +12,137 @@ from enum import Enum -class PoolAllocationMode(Enum): +class PoolAllocationMode(str, Enum): - batch_service = "BatchService" - user_subscription = "UserSubscription" + batch_service = "BatchService" #: Pools will be allocated in subscriptions owned by the Batch service. + user_subscription = "UserSubscription" #: Pools will be allocated in a subscription owned by the user. -class ProvisioningState(Enum): +class ProvisioningState(str, Enum): - invalid = "Invalid" - creating = "Creating" - deleting = "Deleting" - succeeded = "Succeeded" - failed = "Failed" - cancelled = "Cancelled" + invalid = "Invalid" #: The account is in an invalid state. + creating = "Creating" #: The account is being created. + deleting = "Deleting" #: The account is being deleted. + succeeded = "Succeeded" #: The account has been created and is ready for use. + failed = "Failed" #: The last operation for the account is failed. + cancelled = "Cancelled" #: The last operation for the account is cancelled. -class AccountKeyType(Enum): +class AccountKeyType(str, Enum): - primary = "Primary" - secondary = "Secondary" + primary = "Primary" #: The primary account key. + secondary = "Secondary" #: The secondary account key. -class PackageState(Enum): +class PackageState(str, Enum): - pending = "Pending" - active = "Active" + pending = "Pending" #: The application package has been created but has not yet been activated. + active = "Active" #: The application package is ready for use. -class CertificateFormat(Enum): +class CertificateFormat(str, Enum): - pfx = "Pfx" - cer = "Cer" + pfx = "Pfx" #: The certificate is a PFX (PKCS#12) formatted certificate or certificate chain. + cer = "Cer" #: The certificate is a base64-encoded X.509 certificate. -class CertificateProvisioningState(Enum): +class CertificateProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" - failed = "Failed" + succeeded = "Succeeded" #: The certificate is available for use in pools. + deleting = "Deleting" #: The user has requested that the certificate be deleted, but the delete operation has not yet completed. You may not reference the certificate when creating or updating pools. + failed = "Failed" #: The user requested that the certificate be deleted, but there are pools that still have references to the certificate, or it is still installed on one or more compute nodes. (The latter can occur if the certificate has been removed from the pool, but the node has not yet restarted. Nodes refresh their certificates only when they restart.) You may use the cancel certificate delete operation to cancel the delete, or the delete certificate operation to retry the delete. -class PoolProvisioningState(Enum): +class PoolProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" + succeeded = "Succeeded" #: The pool is available to run tasks subject to the availability of compute nodes. + deleting = "Deleting" #: The user has requested that the pool be deleted, but the delete operation has not yet completed. -class AllocationState(Enum): +class AllocationState(str, Enum): - steady = "Steady" - resizing = "Resizing" - stopping = "Stopping" + steady = "Steady" #: The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this state when it is created and when no operations are being performed on the pool to change the number of nodes. + resizing = "Resizing" #: The pool is resizing; that is, compute nodes are being added to or removed from the pool. + stopping = "Stopping" #: The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed. -class CachingType(Enum): +class CachingType(str, Enum): - none = "None" - read_only = "ReadOnly" - read_write = "ReadWrite" + none = "None" #: The caching mode for the disk is not enabled. + read_only = "ReadOnly" #: The caching mode for the disk is read only. + read_write = "ReadWrite" #: The caching mode for the disk is read and write. -class StorageAccountType(Enum): +class StorageAccountType(str, Enum): - standard_lrs = "Standard_LRS" - premium_lrs = "Premium_LRS" + standard_lrs = "Standard_LRS" #: The data disk should use standard locally redundant storage. + premium_lrs = "Premium_LRS" #: The data disk should use premium locally redundant storage. -class ComputeNodeDeallocationOption(Enum): +class ComputeNodeDeallocationOption(str, Enum): - requeue = "Requeue" - terminate = "Terminate" - task_completion = "TaskCompletion" - retained_data = "RetainedData" + requeue = "Requeue" #: Terminate running task processes and requeue the tasks. The tasks will run again when a node is available. Remove nodes as soon as tasks have been terminated. + terminate = "Terminate" #: Terminate running tasks. The tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Remove nodes as soon as tasks have been terminated. + task_completion = "TaskCompletion" #: Allow currently running tasks to complete. Schedule no new tasks while waiting. Remove nodes when all tasks have completed. + retained_data = "RetainedData" #: Allow currently running tasks to complete, then wait for all task data retention periods to expire. Schedule no new tasks while waiting. Remove nodes when all task retention periods have expired. -class InterNodeCommunicationState(Enum): +class InterNodeCommunicationState(str, Enum): - enabled = "Enabled" - disabled = "Disabled" + enabled = "Enabled" #: Enable network communication between virtual machines. + disabled = "Disabled" #: Disable network communication between virtual machines. -class InboundEndpointProtocol(Enum): +class InboundEndpointProtocol(str, Enum): - tcp = "TCP" - udp = "UDP" + tcp = "TCP" #: Use TCP for the endpoint. + udp = "UDP" #: Use UDP for the endpoint. -class NetworkSecurityGroupRuleAccess(Enum): +class NetworkSecurityGroupRuleAccess(str, Enum): - allow = "Allow" - deny = "Deny" + allow = "Allow" #: Allow access. + deny = "Deny" #: Deny access. -class ComputeNodeFillType(Enum): +class ComputeNodeFillType(str, Enum): - spread = "Spread" - pack = "Pack" + spread = "Spread" #: Tasks should be assigned evenly across all nodes in the pool. + pack = "Pack" #: As many tasks as possible (maxTasksPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool. -class ElevationLevel(Enum): +class ElevationLevel(str, Enum): - non_admin = "NonAdmin" - admin = "Admin" + non_admin = "NonAdmin" #: The user is a standard user without elevated access. + admin = "Admin" #: The user is a user with elevated access and operates with full Administrator permissions. -class LoginMode(Enum): +class LoginMode(str, Enum): - batch = "Batch" - interactive = "Interactive" + batch = "Batch" #: The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel processes. + interactive = "Interactive" #: The LOGON32_LOGON_INTERACTIVE Win32 login mode. Some applications require having permissions associated with the interactive login mode. If this is the case for an application used in your task, then this option is recommended. -class AutoUserScope(Enum): +class AutoUserScope(str, Enum): - task = "Task" - pool = "Pool" + task = "Task" #: Specifies that the service should create a new user for the task. + pool = "Pool" #: Specifies that the task runs as the common auto user account which is created on every node in a pool. -class CertificateStoreLocation(Enum): +class CertificateStoreLocation(str, Enum): - current_user = "CurrentUser" - local_machine = "LocalMachine" + current_user = "CurrentUser" #: Certificates should be installed to the CurrentUser certificate store. + local_machine = "LocalMachine" #: Certificates should be installed to the LocalMachine certificate store. -class CertificateVisibility(Enum): +class CertificateVisibility(str, Enum): - start_task = "StartTask" - task = "Task" - remote_user = "RemoteUser" + start_task = "StartTask" #: The certificate should be visible to the user account under which the start task is run. + task = "Task" #: The certificate should be visible to the user accounts under which job tasks are run. + remote_user = "RemoteUser" #: The certificate should be visible to the user accounts under which users remotely access the node. -class NameAvailabilityReason(Enum): +class NameAvailabilityReason(str, Enum): - invalid = "Invalid" - already_exists = "AlreadyExists" + invalid = "Invalid" #: The requested name is invalid. + already_exists = "AlreadyExists" #: The requested name is already in use. diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py index c64ee92d4c21..4b01ce194f4f 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() - self.format = format + def __init__(self, **kwargs): + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + + +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Application, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.allow_updates = kwargs.get('allow_updates', None) + self.default_version = kwargs.get('default_version', None) + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,17 +213,19 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() - self.id = id - self.version = version + def __init__(self, **kwargs): + super(ApplicationPackageReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.version = kwargs.get('version', None) class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,21 +246,23 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() - self.evaluation_time = evaluation_time - self.results = results - self.error = error + def __init__(self, **kwargs): + super(AutoScaleRun, self).__init__(**kwargs) + self.evaluation_time = kwargs.get('evaluation_time', None) + self.results = kwargs.get('results', None) + self.error = kwargs.get('error', None) class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,18 +279,20 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(AutoScaleRunError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,31 +309,62 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() - self.formula = formula - self.evaluation_interval = evaluation_interval + def __init__(self, **kwargs): + super(AutoScaleSettings, self).__init__(**kwargs) + self.formula = kwargs.get('formula', None) + self.evaluation_interval = kwargs.get('evaluation_interval', None) class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + """ + + _validation = { + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoStorageBaseProperties, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + + +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime """ _validation = { 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, } _attribute_map = { 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() - self.storage_account_id = storage_account_id + def __init__(self, **kwargs): + super(AutoStorageProperties, self).__init__(**kwargs) + self.last_key_sync = kwargs.get('last_key_sync', None) class AutoUserSpecification(Model): @@ -194,94 +387,261 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() - self.scope = scope - self.elevation_level = elevation_level + def __init__(self, **kwargs): + super(AutoUserSpecification, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.elevation_level = kwargs.get('elevation_level', None) -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. +class Resource(Model): + """A definition of an Azure resource. - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'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}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class BatchAccount(Resource): + """Contains information about an Azure Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str - """ - - _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, - 'secondary': {'key': 'secondary', 'type': 'str'}, - } - - def __init__(self): - super(BatchAccountKeys, self).__init__() - self.account_name = None - self.primary = None - self.secondary = None - - -class BatchAccountRegenerateKeyParameters(Model): + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'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}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, **kwargs): + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) + self.pool_allocation_mode = kwargs.get('pool_allocation_mode', None) + self.key_vault_reference = kwargs.get('key_vault_reference', None) + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, + 'secondary': {'key': 'secondary', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BatchAccountKeys, self).__init__(**kwargs) + self.account_name = None + self.primary = None + self.secondary = None + + +class BatchAccountRegenerateKeyParameters(Model): """Parameters supplied to the RegenerateKey operation. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ @@ -293,9 +653,9 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() - self.key_name = key_name + def __init__(self, **kwargs): + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) class BatchAccountUpdateParameters(Model): @@ -312,10 +672,10 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() - self.tags = tags - self.auto_storage = auto_storage + def __init__(self, **kwargs): + super(BatchAccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) class BatchLocationQuota(Model): @@ -337,11 +697,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs): + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, **kwargs): + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,35 +812,101 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format + def __init__(self, **kwargs): + super(CertificateBaseProperties, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. - This must exist inside the same account as the pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. - :type id: str - :param store_location: The location of the certificate store on the - compute node into which to install the certificate. The default value is - currentUser. This property is applicable only for pools configured with - Windows nodes (that is, created with cloudServiceConfiguration, or with - virtualMachineConfiguration using a Windows image reference). For Linux - compute nodes, the certificates are stored in a directory inside the task - working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - supplied to the task to query for this location. For certificates with - visibility of 'remoteUser', a 'certs' directory is created in the user's - home directory (e.g., /home/{user-name}/certs) and certificates are placed - in that directory. Possible values include: 'CurrentUser', 'LocalMachine' - :type store_location: str or - ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: The name of the certificate store on the compute node - into which to install the certificate. This property is applicable only + 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 ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.data = kwargs.get('data', None) + self.password = kwargs.get('password', None) + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. + This must exist inside the same account as the pool. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. + :type id: str + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' + :type store_location: str or + ~azure.mgmt.batch.models.CertificateStoreLocation + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, @@ -415,12 +930,12 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() - self.id = id - self.store_location = store_location - self.store_name = store_name - self.visibility = visibility + def __init__(self, **kwargs): + super(CertificateReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.store_location = kwargs.get('store_location', None) + self.store_name = kwargs.get('store_name', None) + self.visibility = kwargs.get('visibility', None) class CheckNameAvailabilityParameters(Model): @@ -429,9 +944,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,9 +966,9 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) class CheckNameAvailabilityResult(Model): @@ -485,23 +1002,85 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', 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 CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,10 +1098,10 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() - self.os_family = os_family - self.os_version = os_version + def __init__(self, **kwargs): + super(CloudServiceConfiguration, self).__init__(**kwargs) + self.os_family = kwargs.get('os_family', None) + self.os_version = kwargs.get('os_version', None) class ContainerConfiguration(Model): @@ -531,7 +1110,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,21 +1140,23 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() - self.container_image_names = container_image_names - self.container_registries = container_registries + def __init__(self, **kwargs): + super(ContainerConfiguration, self).__init__(**kwargs) + self.container_image_names = kwargs.get('container_image_names', None) + self.container_registries = kwargs.get('container_registries', None) class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,20 +1171,22 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() - self.registry_server = registry_server - self.user_name = user_name - self.password = password + def __init__(self, **kwargs): + super(ContainerRegistry, self).__init__(**kwargs) + self.registry_server = kwargs.get('registry_server', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) class DataDisk(Model): """Data Disk settings which will be used by the data disks associated to Compute Nodes in the pool. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1198,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,22 +1223,24 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() - self.lun = lun - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,12 +1261,12 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() - self.code = code - self.message = message - self.target = target - self.details = details + def __init__(self, **kwargs): + super(DeleteCertificateError, 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 DeploymentConfiguration(Model): @@ -704,16 +1291,18 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() - self.cloud_service_configuration = cloud_service_configuration - self.virtual_machine_configuration = virtual_machine_configuration + def __init__(self, **kwargs): + super(DeploymentConfiguration, self).__init__(**kwargs) + self.cloud_service_configuration = kwargs.get('cloud_service_configuration', None) + self.virtual_machine_configuration = kwargs.get('virtual_machine_configuration', None) class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,10 +1317,10 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(EnvironmentSetting, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) class FixedScaleSettings(Model): @@ -767,12 +1356,12 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() - self.resize_timeout = resize_timeout - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.node_deallocation_option = node_deallocation_option + def __init__(self, **kwargs): + super(FixedScaleSettings, self).__init__(**kwargs) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) class ImageReference(Model): @@ -815,43 +1404,45 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version - self.id = id + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + self.id = kwargs.get('id', None) class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,24 +1477,26 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() - self.name = name - self.protocol = protocol - self.backend_port = backend_port - self.frontend_port_range_start = frontend_port_range_start - self.frontend_port_range_end = frontend_port_range_end - self.network_security_group_rules = network_security_group_rules + def __init__(self, **kwargs): + super(InboundNatPool, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.protocol = kwargs.get('protocol', None) + self.backend_port = kwargs.get('backend_port', None) + self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) + self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) + self.network_security_group_rules = kwargs.get('network_security_group_rules', None) class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,10 +1510,10 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() - self.id = id - self.url = url + def __init__(self, **kwargs): + super(KeyVaultReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.url = kwargs.get('url', None) class LinuxUserConfiguration(Model): @@ -951,11 +1544,11 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() - self.uid = uid - self.gid = gid - self.ssh_private_key = ssh_private_key + def __init__(self, **kwargs): + super(LinuxUserConfiguration, self).__init__(**kwargs) + self.uid = kwargs.get('uid', None) + self.gid = kwargs.get('gid', None) + self.ssh_private_key = kwargs.get('ssh_private_key', None) class MetadataItem(Model): @@ -964,9 +1557,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,10 +1575,10 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(MetadataItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) class NetworkConfiguration(Model): @@ -1027,31 +1622,34 @@ class NetworkConfiguration(Model): 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() - self.subnet_id = subnet_id - self.endpoint_configuration = endpoint_configuration + def __init__(self, **kwargs): + super(NetworkConfiguration, self).__init__(**kwargs) + self.subnet_id = kwargs.get('subnet_id', None) + self.endpoint_configuration = kwargs.get('endpoint_configuration', None) class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str """ @@ -1067,11 +1665,11 @@ class NetworkSecurityGroupRule(Model): 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() - self.priority = priority - self.access = access - self.source_address_prefix = source_address_prefix + def __init__(self, **kwargs): + super(NetworkSecurityGroupRule, self).__init__(**kwargs) + self.priority = kwargs.get('priority', None) + self.access = kwargs.get('access', None) + self.source_address_prefix = kwargs.get('source_address_prefix', None) class Operation(Model): @@ -1095,12 +1693,12 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) class OperationDisplay(Model): @@ -1124,40 +1722,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools - - -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,6 +1744,123 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus """ _validation = { @@ -1177,6 +1868,16 @@ class ProxyResource(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { @@ -1184,24 +1885,96 @@ class ProxyResource(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, } - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None + def __init__(self, **kwargs): + super(Pool, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = kwargs.get('vm_size', None) + self.deployment_configuration = kwargs.get('deployment_configuration', None) + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = kwargs.get('scale_settings', None) + self.auto_scale_run = None + self.inter_node_communication = kwargs.get('inter_node_communication', None) + self.network_configuration = kwargs.get('network_configuration', None) + self.max_tasks_per_node = kwargs.get('max_tasks_per_node', None) + self.task_scheduling_policy = kwargs.get('task_scheduling_policy', None) + self.user_accounts = kwargs.get('user_accounts', None) + self.metadata = kwargs.get('metadata', None) + self.start_task = kwargs.get('start_task', None) + self.certificates = kwargs.get('certificates', None) + self.application_packages = kwargs.get('application_packages', None) + self.application_licenses = kwargs.get('application_licenses', None) + self.resize_operation_status = None + + +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. + + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] + """ + + _validation = { + 'inbound_nat_pools': {'required': True}, + } + + _attribute_map = { + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, + } + + def __init__(self, **kwargs): + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = kwargs.get('inbound_nat_pools', None) class ResizeError(Model): """An error that occurred when resizing a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.ResizeError] @@ -1218,11 +1991,11 @@ class ResizeError(Model): 'details': {'key': 'details', 'type': '[ResizeError]'}, } - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(ResizeError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) class ResizeOperationStatus(Model): @@ -1267,57 +2040,14 @@ class ResizeOperationStatus(Model): 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'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}'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None + def __init__(self, **kwargs): + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) + self.start_time = kwargs.get('start_time', None) + self.errors = kwargs.get('errors', None) class ResourceFile(Model): @@ -1333,10 +2063,10 @@ class ResourceFile(Model): httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. :type storage_container_url: str :param http_url: The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are @@ -1383,14 +2113,14 @@ class ResourceFile(Model): 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode + def __init__(self, **kwargs): + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = kwargs.get('auto_storage_container_name', None) + self.storage_container_url = kwargs.get('storage_container_url', None) + self.http_url = kwargs.get('http_url', None) + self.blob_prefix = kwargs.get('blob_prefix', None) + self.file_path = kwargs.get('file_path', None) + self.file_mode = kwargs.get('file_mode', None) class ScaleSettings(Model): @@ -1417,16 +2147,23 @@ class ScaleSettings(Model): 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = kwargs.get('fixed_scale', None) + self.auto_scale = kwargs.get('auto_scale', None) class StartTask(Model): """A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged. + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + :param command_line: The command line of the start task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take @@ -1486,28 +2223,30 @@ class StartTask(Model): 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings + def __init__(self, **kwargs): + super(StartTask, self).__init__(**kwargs) + self.command_line = kwargs.get('command_line', None) + self.resource_files = kwargs.get('resource_files', None) + self.environment_settings = kwargs.get('environment_settings', None) + self.user_identity = kwargs.get('user_identity', None) + self.max_task_retry_count = kwargs.get('max_task_retry_count', None) + self.wait_for_success = kwargs.get('wait_for_success', None) + self.container_settings = kwargs.get('container_settings', None) class TaskContainerSettings(Model): """The container settings for a task. + All required parameters must be populated in order to send to Azure. + :param container_run_options: Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. :type image_name: str :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. @@ -1524,18 +2263,20 @@ class TaskContainerSettings(Model): 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, } - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry + def __init__(self, **kwargs): + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = kwargs.get('container_run_options', None) + self.image_name = kwargs.get('image_name', None) + self.registry = kwargs.get('registry', None) class TaskSchedulingPolicy(Model): """Specifies how tasks should be distributed across compute nodes. - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' + All required parameters must be populated in order to send to Azure. + + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ @@ -1547,17 +2288,19 @@ class TaskSchedulingPolicy(Model): 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type + def __init__(self, **kwargs): + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = kwargs.get('node_fill_type', None) class UserAccount(Model): """Properties used to create a user on an Azure Batch node. - :param name: The name of the user account. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the user account. :type name: str - :param password: The password for the user account. + :param password: Required. The password for the user account. :type password: str :param elevation_level: The elevation level of the user account. nonAdmin - The auto user is a standard user without elevated access. admin - The @@ -1591,13 +2334,13 @@ class UserAccount(Model): 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration + def __init__(self, **kwargs): + super(UserAccount, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.password = kwargs.get('password', None) + self.elevation_level = kwargs.get('elevation_level', None) + self.linux_user_configuration = kwargs.get('linux_user_configuration', None) + self.windows_user_configuration = kwargs.get('windows_user_configuration', None) class UserIdentity(Model): @@ -1620,20 +2363,22 @@ class UserIdentity(Model): 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, } - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + self.auto_user = kwargs.get('auto_user', None) class VirtualMachineConfiguration(Model): """The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure. - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. + All required parameters must be populated in order to send to Azure. + + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be provisioned on compute nodes in the pool. The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. @@ -1682,639 +2427,75 @@ class VirtualMachineConfiguration(Model): 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration - - -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. - - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool - """ - - _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - } - - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates - - -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. - - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode - """ - - _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, - } - - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode + def __init__(self, **kwargs): + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.node_agent_sku_id = kwargs.get('node_agent_sku_id', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.data_disks = kwargs.get('data_disks', None) + self.license_type = kwargs.get('license_type', None) + self.container_configuration = kwargs.get('container_configuration', None) -class Application(ProxyResource): - """Contains information about an application in a Batch account. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version - + def __init__(self, **kwargs): + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode """ - _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, - } - _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync - - -class BatchAccount(Resource): - """Contains information about an Azure Batch account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'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}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, - } - - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None - - -class Certificate(ProxyResource): - """Contains information about a certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, - } - - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None - - -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - - -class Pool(ProxyResource): - """Contains information about a pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, - } - - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, **kwargs): + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = kwargs.get('login_mode', None) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py index c64ee92d4c21..edb71960c6fb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() + def __init__(self, *, format: str, **kwargs) -> None: + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) self.format = format +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, allow_updates: bool=None, default_version: str=None, **kwargs) -> None: + super(Application, self).__init__(**kwargs) + self.display_name = display_name + self.allow_updates = allow_updates + self.default_version = default_version + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None + + class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,8 +213,8 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() + def __init__(self, *, id: str, version: str=None, **kwargs) -> None: + super(ApplicationPackageReference, self).__init__(**kwargs) self.id = id self.version = version @@ -66,8 +222,10 @@ def __init__(self, id, version=None): class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,8 +246,8 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() + def __init__(self, *, evaluation_time, results: str=None, error=None, **kwargs) -> None: + super(AutoScaleRun, self).__init__(**kwargs) self.evaluation_time = evaluation_time self.results = results self.error = error @@ -98,11 +256,13 @@ def __init__(self, evaluation_time, results=None, error=None): class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,8 +279,8 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(AutoScaleRunError, self).__init__(**kwargs) self.code = code self.message = message self.details = details @@ -129,8 +289,10 @@ def __init__(self, code, message, details=None): class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,8 +309,8 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() + def __init__(self, *, formula: str, evaluation_interval=None, **kwargs) -> None: + super(AutoScaleSettings, self).__init__(**kwargs) self.formula = formula self.evaluation_interval = evaluation_interval @@ -156,8 +318,10 @@ def __init__(self, formula, evaluation_interval=None): class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str """ @@ -169,11 +333,40 @@ class AutoStorageBaseProperties(Model): 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() + def __init__(self, *, storage_account_id: str, **kwargs) -> None: + super(AutoStorageBaseProperties, self).__init__(**kwargs) self.storage_account_id = storage_account_id +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime + """ + + _validation = { + 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + } + + def __init__(self, *, storage_account_id: str, last_key_sync, **kwargs) -> None: + super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id, **kwargs) + self.last_key_sync = last_key_sync + + class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. @@ -194,84 +387,249 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() + def __init__(self, *, scope=None, elevation_level=None, **kwargs) -> None: + super(AutoUserSpecification, self).__init__(**kwargs) self.scope = scope self.elevation_level = elevation_level -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. +class Resource(Model): + """A definition of an Azure resource. - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'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}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class BatchAccount(Resource): + """Contains information about an Azure Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str - """ - - _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'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}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, *, location: str, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None, **kwargs) -> None: + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.auto_storage = auto_storage + self.pool_allocation_mode = pool_allocation_mode + self.key_vault_reference = key_vault_reference + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, 'secondary': {'key': 'secondary', 'type': 'str'}, } - def __init__(self): - super(BatchAccountKeys, self).__init__() + def __init__(self, **kwargs) -> None: + super(BatchAccountKeys, self).__init__(**kwargs) self.account_name = None self.primary = None self.secondary = None @@ -280,8 +638,10 @@ def __init__(self): class BatchAccountRegenerateKeyParameters(Model): """Parameters supplied to the RegenerateKey operation. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ @@ -293,8 +653,8 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() + def __init__(self, *, key_name, **kwargs) -> None: + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) self.key_name = key_name @@ -312,8 +672,8 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() + def __init__(self, *, tags=None, auto_storage=None, **kwargs) -> None: + super(BatchAccountUpdateParameters, self).__init__(**kwargs) self.tags = tags self.auto_storage = auto_storage @@ -337,11 +697,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs) -> None: + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,36 +812,102 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(CertificateBaseProperties, self).__init__(**kwargs) self.thumbprint_algorithm = thumbprint_algorithm self.thumbprint = thumbprint self.format = format -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. - This must exist inside the same account as the pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. - :type id: str - :param store_location: The location of the certificate store on the - compute node into which to install the certificate. The default value is - currentUser. This property is applicable only for pools configured with - Windows nodes (that is, created with cloudServiceConfiguration, or with - virtualMachineConfiguration using a Windows image reference). For Linux - compute nodes, the certificates are stored in a directory inside the task - working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - supplied to the task to query for this location. For certificates with - visibility of 'remoteUser', a 'certs' directory is created in the user's - home directory (e.g., /home/{user-name}/certs) and certificates are placed - in that directory. Possible values include: 'CurrentUser', 'LocalMachine' - :type store_location: str or - ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: The name of the certificate store on the compute node - into which to install the certificate. This property is applicable only - for pools configured with Windows nodes (that is, created with + 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 ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, data: str, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, password: str=None, **kwargs) -> None: + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.data = data + self.password = password + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. + This must exist inside the same account as the pool. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. + :type id: str + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' + :type store_location: str or + ~azure.mgmt.batch.models.CertificateStoreLocation + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only + for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but @@ -415,8 +930,8 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() + def __init__(self, *, id: str, store_location=None, store_name: str=None, visibility=None, **kwargs) -> None: + super(CertificateReference, self).__init__(**kwargs) self.id = id self.store_location = store_location self.store_name = store_name @@ -429,9 +944,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,8 +966,8 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) self.name = name @@ -485,23 +1002,85 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +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 CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,8 +1098,8 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() + def __init__(self, *, os_family: str, os_version: str=None, **kwargs) -> None: + super(CloudServiceConfiguration, self).__init__(**kwargs) self.os_family = os_family self.os_version = os_version @@ -531,7 +1110,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,8 +1140,8 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() + def __init__(self, *, container_image_names=None, container_registries=None, **kwargs) -> None: + super(ContainerConfiguration, self).__init__(**kwargs) self.container_image_names = container_image_names self.container_registries = container_registries @@ -568,12 +1149,14 @@ def __init__(self, container_image_names=None, container_registries=None): class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,8 +1171,8 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() + def __init__(self, *, user_name: str, password: str, registry_server: str=None, **kwargs) -> None: + super(ContainerRegistry, self).__init__(**kwargs) self.registry_server = registry_server self.user_name = user_name self.password = password @@ -599,9 +1182,11 @@ class DataDisk(Model): """Data Disk settings which will be used by the data disks associated to Compute Nodes in the pool. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1198,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,8 +1223,8 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() + def __init__(self, *, lun: int, disk_size_gb: int, caching=None, storage_account_type=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) self.lun = lun self.caching = caching self.disk_size_gb = disk_size_gb @@ -649,11 +1234,13 @@ def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,8 +1261,8 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() + def __init__(self, *, code: str, message: str, target: str=None, details=None, **kwargs) -> None: + super(DeleteCertificateError, self).__init__(**kwargs) self.code = code self.message = message self.target = target @@ -704,8 +1291,8 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() + def __init__(self, *, cloud_service_configuration=None, virtual_machine_configuration=None, **kwargs) -> None: + super(DeploymentConfiguration, self).__init__(**kwargs) self.cloud_service_configuration = cloud_service_configuration self.virtual_machine_configuration = virtual_machine_configuration @@ -713,7 +1300,9 @@ def __init__(self, cloud_service_configuration=None, virtual_machine_configurati class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,8 +1317,8 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() + def __init__(self, *, name: str, value: str=None, **kwargs) -> None: + super(EnvironmentSetting, self).__init__(**kwargs) self.name = name self.value = value @@ -767,8 +1356,8 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() + def __init__(self, *, resize_timeout=None, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, node_deallocation_option=None, **kwargs) -> None: + super(FixedScaleSettings, self).__init__(**kwargs) self.resize_timeout = resize_timeout self.target_dedicated_nodes = target_dedicated_nodes self.target_low_priority_nodes = target_low_priority_nodes @@ -815,8 +1404,8 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() + def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, id: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(**kwargs) self.publisher = publisher self.offer = offer self.sku = sku @@ -828,30 +1417,32 @@ class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,8 +1477,8 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() + def __init__(self, *, name: str, protocol, backend_port: int, frontend_port_range_start: int, frontend_port_range_end: int, network_security_group_rules=None, **kwargs) -> None: + super(InboundNatPool, self).__init__(**kwargs) self.name = name self.protocol = protocol self.backend_port = backend_port @@ -899,11 +1490,13 @@ def __init__(self, name, protocol, backend_port, frontend_port_range_start, fron class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,8 +1510,8 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() + def __init__(self, *, id: str, url: str, **kwargs) -> None: + super(KeyVaultReference, self).__init__(**kwargs) self.id = id self.url = url @@ -951,8 +1544,8 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() + def __init__(self, *, uid: int=None, gid: int=None, ssh_private_key: str=None, **kwargs) -> None: + super(LinuxUserConfiguration, self).__init__(**kwargs) self.uid = uid self.gid = gid self.ssh_private_key = ssh_private_key @@ -964,9 +1557,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,8 +1575,8 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(MetadataItem, self).__init__(**kwargs) self.name = name self.value = value @@ -1027,8 +1622,8 @@ class NetworkConfiguration(Model): 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() + def __init__(self, *, subnet_id: str=None, endpoint_configuration=None, **kwargs) -> None: + super(NetworkConfiguration, self).__init__(**kwargs) self.subnet_id = subnet_id self.endpoint_configuration = endpoint_configuration @@ -1036,22 +1631,25 @@ def __init__(self, subnet_id=None, endpoint_configuration=None): class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str """ @@ -1067,8 +1665,8 @@ class NetworkSecurityGroupRule(Model): 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() + def __init__(self, *, priority: int, access, source_address_prefix: str, **kwargs) -> None: + super(NetworkSecurityGroupRule, self).__init__(**kwargs) self.priority = priority self.access = access self.source_address_prefix = source_address_prefix @@ -1095,8 +1693,8 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) self.name = name self.display = display self.origin = origin @@ -1124,40 +1722,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) self.provider = provider self.operation = operation self.resource = resource self.description = description -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools - - -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,1151 +1744,758 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None - - -class ResizeError(Model): - """An error that occurred when resizing a pool. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param details: Additional details about the error. - :type details: list[~azure.mgmt.batch.models.ResizeError] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ResizeError]'}, - } - - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details - - -class ResizeOperationStatus(Model): - """Details about the current or last completed resize operation. - - Describes either the current operation (if the pool AllocationState is - Resizing) or the previously completed operation (if the AllocationState is - Steady). - - :param target_dedicated_nodes: The desired number of dedicated compute - nodes in the pool. - :type target_dedicated_nodes: int - :param target_low_priority_nodes: The desired number of low-priority - compute nodes in the pool. - :type target_low_priority_nodes: int - :param resize_timeout: The timeout for allocation of compute nodes to the - pool or removal of compute nodes from the pool. The default value is 15 - minutes. The minimum value is 5 minutes. If you specify a value less than - 5 minutes, the Batch service returns an error; if you are calling the REST - API directly, the HTTP status code is 400 (Bad Request). - :type resize_timeout: timedelta - :param node_deallocation_option: Determines what to do with a node and its - running task(s) if the pool size is decreasing. The default value is - requeue. Possible values include: 'Requeue', 'Terminate', - 'TaskCompletion', 'RetainedData' - :type node_deallocation_option: str or - ~azure.mgmt.batch.models.ComputeNodeDeallocationOption - :param start_time: The time when this resize operation was started. - :type start_time: datetime - :param errors: Details of any errors encountered while performing the last - resize on the pool. This property is set only if an error occurred during - the last pool resize, and only when the pool allocationState is Steady. - :type errors: list[~azure.mgmt.batch.models.ResizeError] - """ - - _attribute_map = { - 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, - 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, - 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, - 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[ResizeError]'}, - } - - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'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}'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None - - -class ResourceFile(Model): - """A single file or multiple files to be downloaded to a compute node. - - :param auto_storage_container_name: The storage container name in the auto - storage account. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. - :type auto_storage_container_name: str - :param storage_container_url: The URL of the blob container within Azure - Blob Storage. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. This URL must be readable and listable using anonymous access; - that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. - :type storage_container_url: str - :param http_url: The URL of the file to download. The - autoStorageContainerName, storageContainerUrl and httpUrl properties are - mutually exclusive and one of them must be specified. If the URL is Azure - Blob Storage, it must be readable using anonymous access; that is, the - Batch service does not present any credentials when downloading the blob. - There are two ways to get such a URL for a blob in Azure storage: include - a Shared Access Signature (SAS) granting read permissions on the blob, or - set the ACL for the blob or its container to allow public access. - :type http_url: str - :param blob_prefix: The blob prefix to use when downloading blobs from an - Azure Storage container. Only the blobs whose names begin with the - specified prefix will be downloaded. The property is valid only when - autoStorageContainerName or storageContainerUrl is used. This prefix can - be a partial filename or a subdirectory. If a prefix is not specified, all - the files in the container will be downloaded. - :type blob_prefix: str - :param file_path: The location on the compute node to which to download - the file, relative to the task's working directory. If the httpUrl - property is specified, the filePath is required and describes the path - which the file will be downloaded to, including the filename. Otherwise, - if the autoStorageContainerName or storageContainerUrl property is - specified, filePath is optional and is the directory to download the files - to. In the case where filePath is used as a directory, any directory - structure already associated with the input data will be retained in full - and appended to the specified filePath directory. The specified relative - path cannot break out of the task's working directory (for example by - using '..'). - :type file_path: str - :param file_mode: The file permission mode attribute in octal format. This - property applies only to files being downloaded to Linux compute nodes. It - will be ignored if it is specified for a resourceFile which will be - downloaded to a Windows node. If this property is not specified for a - Linux node, then a default value of 0770 is applied to the file. - :type file_mode: str - """ - - _attribute_map = { - 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, - 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, - 'http_url': {'key': 'httpUrl', 'type': 'str'}, - 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - 'file_mode': {'key': 'fileMode', 'type': 'str'}, - } - - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode - - -class ScaleSettings(Model): - """Scale settings for the pool. - - Defines the desired size of the pool. This can either be 'fixedScale' where - the requested targetDedicatedNodes is specified, or 'autoScale' which - defines a formula which is periodically reevaluated. If this property is - not specified, the pool will have a fixed scale with 0 - targetDedicatedNodes. - - :param fixed_scale: Fixed scale settings for the pool. This property and - autoScale are mutually exclusive and one of the properties must be - specified. - :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings - :param auto_scale: AutoScale settings for the pool. This property and - fixedScale are mutually exclusive and one of the properties must be - specified. - :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings - """ - - _attribute_map = { - 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, - 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, - } - - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale - - -class StartTask(Model): - """A task which is run when a compute node joins a pool in the Azure Batch - service, or when the compute node is rebooted or reimaged. - - :param command_line: The command line of the start task. The command line - does not run under a shell, and therefore cannot take advantage of shell - features such as environment variable expansion. If you want to take - advantage of such features, you should invoke the shell in the command - line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - MyCommand" in Linux. Required if any other properties of the startTask are - specified. - :type command_line: str - :param resource_files: A list of files that the Batch service will - download to the compute node before running the command line. - :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] - :param environment_settings: A list of environment variable settings for - the start task. - :type environment_settings: - list[~azure.mgmt.batch.models.EnvironmentSetting] - :param user_identity: The user identity under which the start task runs. - If omitted, the task runs as a non-administrative user unique to the task. - :type user_identity: ~azure.mgmt.batch.models.UserIdentity - :param max_task_retry_count: The maximum number of times the task may be - retried. The Batch service retries a task if its exit code is nonzero. - Note that this value specifically controls the number of retries. The - Batch service will try the task once, and may then retry up to this limit. - For example, if the maximum retry count is 3, Batch tries the task up to 4 - times (one initial try and 3 retries). If the maximum retry count is 0, - the Batch service does not retry the task. If the maximum retry count is - -1, the Batch service retries the task without limit. - :type max_task_retry_count: int - :param wait_for_success: Whether the Batch service should wait for the - start task to complete successfully (that is, to exit with exit code 0) - before scheduling any tasks on the compute node. If true and the start - task fails on a compute node, the Batch service retries the start task up - to its maximum retry count (maxTaskRetryCount). If the task has still not - completed successfully after all retries, then the Batch service marks the - compute node unusable, and will not schedule tasks to it. This condition - can be detected via the node state and scheduling error detail. If false, - the Batch service will not wait for the start task to complete. In this - case, other tasks can start executing on the compute node while the start - task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. - :type wait_for_success: bool - :param container_settings: The settings for the container under which the - start task runs. When this is specified, all directories recursively below - the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the - node) are mapped into the container, all task environment variables are - mapped into the container, and the task command line is executed in the - container. - :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings - """ - - _attribute_map = { - 'command_line': {'key': 'commandLine', 'type': 'str'}, - 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, - 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, - 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, - 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, - 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, - 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, - } - - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings - - -class TaskContainerSettings(Model): - """The container settings for a task. - - :param container_run_options: Additional options to the container create - command. These additional options are supplied as arguments to the "docker - create" command, in addition to those controlled by the Batch Service. - :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. - :type image_name: str - :param registry: The private registry which contains the container image. - This setting can be omitted if was already provided at pool creation. - :type registry: ~azure.mgmt.batch.models.ContainerRegistry - """ - - _validation = { - 'image_name': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { - 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, } - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry + def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, **kwargs) -> None: + super(Pool, self).__init__(**kwargs) + self.display_name = display_name + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = vm_size + self.deployment_configuration = deployment_configuration + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = scale_settings + self.auto_scale_run = None + self.inter_node_communication = inter_node_communication + self.network_configuration = network_configuration + self.max_tasks_per_node = max_tasks_per_node + self.task_scheduling_policy = task_scheduling_policy + self.user_accounts = user_accounts + self.metadata = metadata + self.start_task = start_task + self.certificates = certificates + self.application_packages = application_packages + self.application_licenses = application_licenses + self.resize_operation_status = None -class TaskSchedulingPolicy(Model): - """Specifies how tasks should be distributed across compute nodes. +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' - :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] """ _validation = { - 'node_fill_type': {'required': True}, + 'inbound_nat_pools': {'required': True}, } _attribute_map = { - 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, } - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type + def __init__(self, *, inbound_nat_pools, **kwargs) -> None: + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = inbound_nat_pools -class UserAccount(Model): - """Properties used to create a user on an Azure Batch node. +class ResizeError(Model): + """An error that occurred when resizing a pool. - :param name: The name of the user account. - :type name: str - :param password: The password for the user account. - :type password: str - :param elevation_level: The elevation level of the user account. nonAdmin - - The auto user is a standard user without elevated access. admin - The - auto user is a user with elevated access and operates with full - Administrator permissions. The default value is nonAdmin. Possible values - include: 'NonAdmin', 'Admin' - :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel - :param linux_user_configuration: The Linux-specific user configuration for - the user account. This property is ignored if specified on a Windows pool. - If not specified, the user is created with the default options. - :type linux_user_configuration: - ~azure.mgmt.batch.models.LinuxUserConfiguration - :param windows_user_configuration: The Windows-specific user configuration - for the user account. This property can only be specified if the user is - on a Windows pool. If not specified and on a Windows pool, the user is - created with the default options. - :type windows_user_configuration: - ~azure.mgmt.batch.models.WindowsUserConfiguration + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. + :type code: str + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. + :type message: str + :param details: Additional details about the error. + :type details: list[~azure.mgmt.batch.models.ResizeError] """ _validation = { - 'name': {'required': True}, - 'password': {'required': True}, + 'code': {'required': True}, + 'message': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, - 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, - 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ResizeError]'}, } - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(ResizeError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details -class UserIdentity(Model): - """The definition of the user identity under which the task is run. +class ResizeOperationStatus(Model): + """Details about the current or last completed resize operation. - Specify either the userName or autoUser property, but not both. + Describes either the current operation (if the pool AllocationState is + Resizing) or the previously completed operation (if the AllocationState is + Steady). - :param user_name: The name of the user identity under which the task is - run. The userName and autoUser properties are mutually exclusive; you must - specify one but not both. - :type user_name: str - :param auto_user: The auto user under which the task is run. The userName - and autoUser properties are mutually exclusive; you must specify one but - not both. - :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification + :param target_dedicated_nodes: The desired number of dedicated compute + nodes in the pool. + :type target_dedicated_nodes: int + :param target_low_priority_nodes: The desired number of low-priority + compute nodes in the pool. + :type target_low_priority_nodes: int + :param resize_timeout: The timeout for allocation of compute nodes to the + pool or removal of compute nodes from the pool. The default value is 15 + minutes. The minimum value is 5 minutes. If you specify a value less than + 5 minutes, the Batch service returns an error; if you are calling the REST + API directly, the HTTP status code is 400 (Bad Request). + :type resize_timeout: timedelta + :param node_deallocation_option: Determines what to do with a node and its + running task(s) if the pool size is decreasing. The default value is + requeue. Possible values include: 'Requeue', 'Terminate', + 'TaskCompletion', 'RetainedData' + :type node_deallocation_option: str or + ~azure.mgmt.batch.models.ComputeNodeDeallocationOption + :param start_time: The time when this resize operation was started. + :type start_time: datetime + :param errors: Details of any errors encountered while performing the last + resize on the pool. This property is set only if an error occurred during + the last pool resize, and only when the pool allocationState is Steady. + :type errors: list[~azure.mgmt.batch.models.ResizeError] """ _attribute_map = { - 'user_name': {'key': 'userName', 'type': 'str'}, - 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, + 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, + 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, + 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, + 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user + def __init__(self, *, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None, **kwargs) -> None: + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = target_dedicated_nodes + self.target_low_priority_nodes = target_low_priority_nodes + self.resize_timeout = resize_timeout + self.node_deallocation_option = node_deallocation_option + self.start_time = start_time + self.errors = errors -class VirtualMachineConfiguration(Model): - """The configuration for compute nodes in a pool based on the Azure Virtual - Machines infrastructure. +class ResourceFile(Model): + """A single file or multiple files to be downloaded to a compute node. - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. - :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be - provisioned on compute nodes in the pool. The Batch node agent is a - program that runs on each node in the pool, and provides the - command-and-control interface between the node and the Batch service. - There are different implementations of the node agent, known as SKUs, for - different operating systems. You must specify a node agent SKU which - matches the selected image reference. To get the list of supported node - agent SKUs along with their list of verified image references, see the - 'List supported node agent SKUs' operation. - :type node_agent_sku_id: str - :param windows_configuration: Windows operating system settings on the - virtual machine. This property must not be specified if the imageReference - specifies a Linux OS image. - :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration - :param data_disks: The configuration for data disks attached to the - compute nodes in the pool. This property must be specified if the compute - nodes in the pool need to have empty data disks attached to them. - :type data_disks: list[~azure.mgmt.batch.models.DataDisk] - :param license_type: The type of on-premises license to be used when - deploying the operating system. This only applies to images that contain - the Windows operating system, and should only be used when you hold valid - on-premises licenses for the nodes which will be deployed. If omitted, no - on-premises licensing discount is applied. Values are: - Windows_Server - The on-premises license is for Windows Server. - Windows_Client - The on-premises license is for Windows Client. - :type license_type: str - :param container_configuration: The container configuration for the pool. - If specified, setup is performed on each node in the pool to allow tasks - to run in containers. All regular tasks and job manager tasks run on this - pool must specify the containerSettings property, and all other tasks may - specify it. - :type container_configuration: - ~azure.mgmt.batch.models.ContainerConfiguration + :param auto_storage_container_name: The storage container name in the auto + storage account. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. + :type auto_storage_container_name: str + :param storage_container_url: The URL of the blob container within Azure + Blob Storage. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. This URL must be readable and listable using anonymous access; + that is, the Batch service does not present any credentials when + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. + :type storage_container_url: str + :param http_url: The URL of the file to download. The + autoStorageContainerName, storageContainerUrl and httpUrl properties are + mutually exclusive and one of them must be specified. If the URL is Azure + Blob Storage, it must be readable using anonymous access; that is, the + Batch service does not present any credentials when downloading the blob. + There are two ways to get such a URL for a blob in Azure storage: include + a Shared Access Signature (SAS) granting read permissions on the blob, or + set the ACL for the blob or its container to allow public access. + :type http_url: str + :param blob_prefix: The blob prefix to use when downloading blobs from an + Azure Storage container. Only the blobs whose names begin with the + specified prefix will be downloaded. The property is valid only when + autoStorageContainerName or storageContainerUrl is used. This prefix can + be a partial filename or a subdirectory. If a prefix is not specified, all + the files in the container will be downloaded. + :type blob_prefix: str + :param file_path: The location on the compute node to which to download + the file, relative to the task's working directory. If the httpUrl + property is specified, the filePath is required and describes the path + which the file will be downloaded to, including the filename. Otherwise, + if the autoStorageContainerName or storageContainerUrl property is + specified, filePath is optional and is the directory to download the files + to. In the case where filePath is used as a directory, any directory + structure already associated with the input data will be retained in full + and appended to the specified filePath directory. The specified relative + path cannot break out of the task's working directory (for example by + using '..'). + :type file_path: str + :param file_mode: The file permission mode attribute in octal format. This + property applies only to files being downloaded to Linux compute nodes. It + will be ignored if it is specified for a resourceFile which will be + downloaded to a Windows node. If this property is not specified for a + Linux node, then a default value of 0770 is applied to the file. + :type file_mode: str """ - _validation = { - 'image_reference': {'required': True}, - 'node_agent_sku_id': {'required': True}, - } - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, + 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, + 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, + 'http_url': {'key': 'httpUrl', 'type': 'str'}, + 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration + def __init__(self, *, auto_storage_container_name: str=None, storage_container_url: str=None, http_url: str=None, blob_prefix: str=None, file_path: str=None, file_mode: str=None, **kwargs) -> None: + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = auto_storage_container_name + self.storage_container_url = storage_container_url + self.http_url = http_url + self.blob_prefix = blob_prefix + self.file_path = file_path + self.file_mode = file_mode -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. +class ScaleSettings(Model): + """Scale settings for the pool. - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool + Defines the desired size of the pool. This can either be 'fixedScale' where + the requested targetDedicatedNodes is specified, or 'autoScale' which + defines a formula which is periodically reevaluated. If this property is + not specified, the pool will have a fixed scale with 0 + targetDedicatedNodes. + + :param fixed_scale: Fixed scale settings for the pool. This property and + autoScale are mutually exclusive and one of the properties must be + specified. + :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings + :param auto_scale: AutoScale settings for the pool. This property and + fixedScale are mutually exclusive and one of the properties must be + specified. + :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings """ _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, + 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates + def __init__(self, *, fixed_scale=None, auto_scale=None, **kwargs) -> None: + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = fixed_scale + self.auto_scale = auto_scale -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. +class StartTask(Model): + """A task which is run when a compute node joins a pool in the Azure Batch + service, or when the compute node is rebooted or reimaged. - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + + :param command_line: The command line of the start task. The command line + does not run under a shell, and therefore cannot take advantage of shell + features such as environment variable expansion. If you want to take + advantage of such features, you should invoke the shell in the command + line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c + MyCommand" in Linux. Required if any other properties of the startTask are + specified. + :type command_line: str + :param resource_files: A list of files that the Batch service will + download to the compute node before running the command line. + :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] + :param environment_settings: A list of environment variable settings for + the start task. + :type environment_settings: + list[~azure.mgmt.batch.models.EnvironmentSetting] + :param user_identity: The user identity under which the start task runs. + If omitted, the task runs as a non-administrative user unique to the task. + :type user_identity: ~azure.mgmt.batch.models.UserIdentity + :param max_task_retry_count: The maximum number of times the task may be + retried. The Batch service retries a task if its exit code is nonzero. + Note that this value specifically controls the number of retries. The + Batch service will try the task once, and may then retry up to this limit. + For example, if the maximum retry count is 3, Batch tries the task up to 4 + times (one initial try and 3 retries). If the maximum retry count is 0, + the Batch service does not retry the task. If the maximum retry count is + -1, the Batch service retries the task without limit. + :type max_task_retry_count: int + :param wait_for_success: Whether the Batch service should wait for the + start task to complete successfully (that is, to exit with exit code 0) + before scheduling any tasks on the compute node. If true and the start + task fails on a compute node, the Batch service retries the start task up + to its maximum retry count (maxTaskRetryCount). If the task has still not + completed successfully after all retries, then the Batch service marks the + compute node unusable, and will not schedule tasks to it. This condition + can be detected via the node state and scheduling error detail. If false, + the Batch service will not wait for the start task to complete. In this + case, other tasks can start executing on the compute node while the start + task is still running; and even if the start task fails, new tasks will + continue to be scheduled on the node. The default is false. + :type wait_for_success: bool + :param container_settings: The settings for the container under which the + start task runs. When this is specified, all directories recursively below + the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the + node) are mapped into the container, all task environment variables are + mapped into the container, and the task command line is executed in the + container. + :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings """ _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, + 'command_line': {'key': 'commandLine', 'type': 'str'}, + 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, + 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, + 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, + 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, + 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, + 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode + def __init__(self, *, command_line: str=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count: int=None, wait_for_success: bool=None, container_settings=None, **kwargs) -> None: + super(StartTask, self).__init__(**kwargs) + self.command_line = command_line + self.resource_files = resource_files + self.environment_settings = environment_settings + self.user_identity = user_identity + self.max_task_retry_count = max_task_retry_count + self.wait_for_success = wait_for_success + self.container_settings = container_settings -class Application(ProxyResource): - """Contains information about an application in a Batch account. +class TaskContainerSettings(Model): + """The container settings for a task. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str + :param container_run_options: Additional options to the container create + command. These additional options are supplied as arguments to the "docker + create" command, in addition to those controlled by the Batch Service. + :type container_run_options: str + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. + :type image_name: str + :param registry: The private registry which contains the container image. + This setting can be omitted if was already provided at pool creation. + :type registry: ~azure.mgmt.batch.models.ContainerRegistry """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'image_name': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, } - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version + def __init__(self, *, image_name: str, container_run_options: str=None, registry=None, **kwargs) -> None: + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = container_run_options + self.image_name = image_name + self.registry = registry -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. +class TaskSchedulingPolicy(Model): + """Specifies how tasks should be distributed across compute nodes. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' + :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, + 'node_fill_type': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, *, node_fill_type, **kwargs) -> None: + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = node_fill_type -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class UserAccount(Model): + """Properties used to create a user on an Azure Batch node. + + All required parameters must be populated in order to send to Azure. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + :param name: Required. The name of the user account. + :type name: str + :param password: Required. The password for the user account. + :type password: str + :param elevation_level: The elevation level of the user account. nonAdmin + - The auto user is a standard user without elevated access. admin - The + auto user is a user with elevated access and operates with full + Administrator permissions. The default value is nonAdmin. Possible values + include: 'NonAdmin', 'Admin' + :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel + :param linux_user_configuration: The Linux-specific user configuration for + the user account. This property is ignored if specified on a Windows pool. + If not specified, the user is created with the default options. + :type linux_user_configuration: + ~azure.mgmt.batch.models.LinuxUserConfiguration + :param windows_user_configuration: The Windows-specific user configuration + for the user account. This property can only be specified if the user is + on a Windows pool. If not specified and on a Windows pool, the user is + created with the default options. + :type windows_user_configuration: + ~azure.mgmt.batch.models.WindowsUserConfiguration """ _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, + 'name': {'required': True}, + 'password': {'required': True}, } _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, + 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, + 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync + def __init__(self, *, name: str, password: str, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None, **kwargs) -> None: + super(UserAccount, self).__init__(**kwargs) + self.name = name + self.password = password + self.elevation_level = elevation_level + self.linux_user_configuration = linux_user_configuration + self.windows_user_configuration = windows_user_configuration -class BatchAccount(Resource): - """Contains information about an Azure Batch account. +class UserIdentity(Model): + """The definition of the user identity under which the task is run. - Variables are only populated by the server, and will be ignored when - sending a request. + Specify either the userName or autoUser property, but not both. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int + :param user_name: The name of the user identity under which the task is + run. The userName and autoUser properties are mutually exclusive; you must + specify one but not both. + :type user_name: str + :param auto_user: The auto user under which the task is run. The userName + and autoUser properties are mutually exclusive; you must specify one but + not both. + :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'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}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, } - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None + def __init__(self, *, user_name: str=None, auto_user=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.user_name = user_name + self.auto_user = auto_user -class Certificate(ProxyResource): - """Contains information about a certificate. +class VirtualMachineConfiguration(Model): + """The configuration for compute nodes in a pool based on the Azure Virtual + Machines infrastructure. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. + :type image_reference: ~azure.mgmt.batch.models.ImageReference + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be + provisioned on compute nodes in the pool. The Batch node agent is a + program that runs on each node in the pool, and provides the + command-and-control interface between the node and the Batch service. + There are different implementations of the node agent, known as SKUs, for + different operating systems. You must specify a node agent SKU which + matches the selected image reference. To get the list of supported node + agent SKUs along with their list of verified image references, see the + 'List supported node agent SKUs' operation. + :type node_agent_sku_id: str + :param windows_configuration: Windows operating system settings on the + virtual machine. This property must not be specified if the imageReference + specifies a Linux OS image. + :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration + :param data_disks: The configuration for data disks attached to the + compute nodes in the pool. This property must be specified if the compute + nodes in the pool need to have empty data disks attached to them. + :type data_disks: list[~azure.mgmt.batch.models.DataDisk] + :param license_type: The type of on-premises license to be used when + deploying the operating system. This only applies to images that contain + the Windows operating system, and should only be used when you hold valid + on-premises licenses for the nodes which will be deployed. If omitted, no + on-premises licensing discount is applied. Values are: + Windows_Server - The on-premises license is for Windows Server. + Windows_Client - The on-premises license is for Windows Client. + :type license_type: str + :param container_configuration: The container configuration for the pool. + If specified, setup is performed on each node in the pool to allow tasks + to run in containers. All regular tasks and job manager tasks run on this + pool must specify the containerSettings property, and all other tasks may + specify it. + :type container_configuration: + ~azure.mgmt.batch.models.ContainerConfiguration """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, + 'image_reference': {'required': True}, + 'node_agent_sku_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None + def __init__(self, *, image_reference, node_agent_sku_id: str, windows_configuration=None, data_disks=None, license_type: str=None, container_configuration=None, **kwargs) -> None: + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = image_reference + self.node_agent_sku_id = node_agent_sku_id + self.windows_configuration = windows_configuration + self.data_disks = data_disks + self.license_type = license_type + self.container_configuration = container_configuration -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - + def __init__(self, **kwargs) -> None: + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class Pool(ProxyResource): - """Contains information about a pool. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, + _attribute_map = { + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } + def __init__(self, *, enable_automatic_updates: bool=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = enable_automatic_updates + + +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. + + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, *, login_mode=None, **kwargs) -> None: + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = login_mode diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py index 1eb94dd020cd..1865025a41f0 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py @@ -25,8 +25,6 @@ class BatchAccountPaged(Paged): def __init__(self, *args, **kwargs): super(BatchAccountPaged, self).__init__(*args, **kwargs) - - class ApplicationPackagePaged(Paged): """ A paging container for iterating over a list of :class:`ApplicationPackage ` object @@ -40,8 +38,6 @@ class ApplicationPackagePaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPackagePaged, self).__init__(*args, **kwargs) - - class ApplicationPaged(Paged): """ A paging container for iterating over a list of :class:`Application ` object @@ -55,8 +51,6 @@ class ApplicationPaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPaged, self).__init__(*args, **kwargs) - - class OperationPaged(Paged): """ A paging container for iterating over a list of :class:`Operation ` object @@ -70,8 +64,6 @@ class OperationPaged(Paged): def __init__(self, *args, **kwargs): super(OperationPaged, self).__init__(*args, **kwargs) - - class CertificatePaged(Paged): """ A paging container for iterating over a list of :class:`Certificate ` object @@ -85,8 +77,6 @@ class CertificatePaged(Paged): def __init__(self, *args, **kwargs): super(CertificatePaged, self).__init__(*args, **kwargs) - - class PoolPaged(Paged): """ A paging container for iterating over a list of :class:`Pool ` object diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py index 457cbd3470cd..818f748e2734 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py @@ -9,13 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_account_operations import BatchAccountOperations -from .application_package_operations import ApplicationPackageOperations -from .application_operations import ApplicationOperations -from .location_operations import LocationOperations -from .operations import Operations -from .certificate_operations import CertificateOperations -from .pool_operations import PoolOperations +from ._batch_account_operations import BatchAccountOperations +from ._application_package_operations import ApplicationPackageOperations +from ._application_operations import ApplicationOperations +from ._location_operations import LocationOperations +from ._operations import Operations +from ._certificate_operations import CertificateOperations +from ._pool_operations import PoolOperations __all__ = [ 'BatchAccountOperations', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py similarity index 92% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py index b447de1a57b8..2ceacf73cd3c 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py @@ -19,11 +19,13 @@ class ApplicationOperations(object): """ApplicationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -77,6 +79,7 @@ def create( # 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()) @@ -92,9 +95,8 @@ def create( body_content = None # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -102,7 +104,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -150,7 +151,6 @@ def delete( # 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: @@ -159,8 +159,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -210,7 +210,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -219,8 +219,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -228,7 +228,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -279,6 +278,7 @@ def update( # 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()) @@ -291,9 +291,8 @@ def update( body_content = self._serialize.body(parameters, 'Application') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -301,7 +300,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -334,8 +332,7 @@ def list( ~azure.mgmt.batch.models.ApplicationPaged[~azure.mgmt.batch.models.Application] :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'] @@ -358,7 +355,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -367,9 +364,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -379,12 +380,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py similarity index 92% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py index 0823f92e92f0..a3e792b0b3af 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py @@ -19,11 +19,13 @@ class ApplicationPackageOperations(object): """ApplicationPackageOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -82,6 +84,7 @@ def activate( # 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()) @@ -94,9 +97,8 @@ def activate( body_content = self._serialize.body(parameters, 'ActivateApplicationPackageParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -104,7 +106,6 @@ def activate( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -158,6 +159,7 @@ def create( # 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()) @@ -173,9 +175,8 @@ def create( body_content = None # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -183,7 +184,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -234,7 +234,6 @@ def delete( # 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: @@ -243,8 +242,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -297,7 +296,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -306,8 +305,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -315,7 +314,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -351,8 +349,7 @@ def list( ~azure.mgmt.batch.models.ApplicationPackagePaged[~azure.mgmt.batch.models.ApplicationPackage] :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'] @@ -376,7 +373,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -385,9 +382,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -397,12 +398,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py similarity index 84% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py index 70fc40e1b618..635b97d5e875 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class BatchAccountOperations(object): """BatchAccountOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -57,6 +59,7 @@ def _create_initial( # 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()) @@ -69,9 +72,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'BatchAccountCreateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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, 202]: exp = CloudError(response) @@ -90,16 +92,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. @@ -118,13 +117,16 @@ def create( :type parameters: ~azure.mgmt.batch.models.BatchAccountCreateParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns BatchAccount - or ClientRawResponse if raw=true + :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 BatchAccount or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.BatchAccount] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.BatchAccount]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -135,30 +137,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'Location': 'str', 'Retry-After': 'int', @@ -172,12 +152,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} def update( @@ -221,6 +202,7 @@ def update( # 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()) @@ -233,9 +215,8 @@ def update( body_content = self._serialize.body(parameters, 'BatchAccountUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -243,7 +224,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccount', response) @@ -272,7 +252,6 @@ def _delete_initial( # 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: @@ -281,8 +260,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -299,7 +278,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified Batch account. :param resource_group_name: The name of the resource group that @@ -308,12 +287,14 @@ def delete( :param account_name: The name of the Batch account. :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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -323,30 +304,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -355,12 +314,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}'} def get( @@ -397,7 +357,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -406,8 +366,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -415,7 +375,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccount', response) @@ -441,8 +400,7 @@ def list( ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] :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'] @@ -461,7 +419,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -470,9 +428,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -482,12 +444,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts'} @@ -510,8 +470,7 @@ def list_by_resource_group( ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] :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'] @@ -531,7 +490,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -540,9 +499,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -552,12 +515,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts'} @@ -596,7 +557,6 @@ def synchronize_auto_storage_keys( # 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: @@ -605,8 +565,8 @@ def synchronize_auto_storage_keys( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -657,6 +617,7 @@ def regenerate_key( # 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()) @@ -669,9 +630,8 @@ def regenerate_key( body_content = self._serialize.body(parameters, 'BatchAccountRegenerateKeyParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -679,7 +639,6 @@ def regenerate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccountKeys', response) @@ -730,7 +689,7 @@ def get_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -739,8 +698,8 @@ def get_keys( 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, stream=False, **operation_config) + 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) @@ -748,7 +707,6 @@ def get_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccountKeys', response) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py similarity index 84% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py index 8db5cd991d95..eb726f288a3f 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class CertificateOperations(object): """CertificateOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -69,8 +71,7 @@ def list_by_batch_account( ~azure.mgmt.batch.models.CertificatePaged[~azure.mgmt.batch.models.Certificate] :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_batch_account.metadata['url'] @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -106,9 +107,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -118,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates'} @@ -147,6 +150,7 @@ def _create_initial( # 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()) @@ -163,9 +167,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -183,16 +186,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new certificate inside the specified account. :param resource_group_name: The name of the resource group that @@ -217,13 +217,16 @@ def create( will be ignored. :type if_none_match: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Certificate - or ClientRawResponse if raw=true + :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 Certificate or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Certificate] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Certificate]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -237,30 +240,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'ETag': 'str', } @@ -273,12 +254,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} def update( @@ -327,6 +309,7 @@ def update( # 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()) @@ -341,18 +324,16 @@ def update( body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { @@ -386,7 +367,6 @@ def _delete_initial( # 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: @@ -395,8 +375,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -413,7 +393,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified certificate. :param resource_group_name: The name of the resource group that @@ -426,12 +406,14 @@ def delete( match the certificate data in the request. For example SHA1-a3d1c5. :type certificate_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -442,30 +424,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -474,12 +434,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} def get( @@ -521,7 +482,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -530,17 +491,16 @@ def get( 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, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { @@ -603,7 +563,7 @@ def cancel_deletion( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -612,17 +572,16 @@ def cancel_deletion( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py similarity index 91% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py index 84b9be79e2c0..686dc2b3097b 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py @@ -19,11 +19,13 @@ class LocationOperations(object): """LocationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -69,7 +71,7 @@ def get_quotas( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -78,8 +80,8 @@ def get_quotas( 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, stream=False, **operation_config) + 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) @@ -87,7 +89,6 @@ def get_quotas( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchLocationQuota', response) @@ -133,6 +134,7 @@ def check_name_availability( # 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()) @@ -145,9 +147,8 @@ def check_name_availability( body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -155,7 +156,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResult', response) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py similarity index 82% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py index 4774273e7176..799529b363cb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/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: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -51,8 +53,7 @@ def list( ~azure.mgmt.batch.models.OperationPaged[~azure.mgmt.batch.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'] @@ -67,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -76,9 +77,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -88,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.Batch/operations'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py similarity index 85% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py index 02cab779f816..95715cda042a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class PoolOperations(object): """PoolOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -79,8 +81,7 @@ def list_by_batch_account( ~azure.mgmt.batch.models.PoolPaged[~azure.mgmt.batch.models.Pool] :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_batch_account.metadata['url'] @@ -107,7 +108,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -116,9 +117,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -128,12 +133,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools'} @@ -157,6 +160,7 @@ def _create_initial( # 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()) @@ -173,9 +177,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'Pool') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -193,16 +196,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new pool inside the specified account. :param resource_group_name: The name of the resource group that @@ -225,13 +225,16 @@ def create( ignored. :type if_none_match: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Pool or - ClientRawResponse if raw=true + :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 Pool or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Pool] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Pool]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -245,30 +248,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'ETag': 'str', } @@ -281,12 +262,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} def update( @@ -335,6 +317,7 @@ def update( # 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()) @@ -349,18 +332,16 @@ def update( body_content = self._serialize.body(parameters, 'Pool') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -394,7 +375,6 @@ def _delete_initial( # 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: @@ -403,8 +383,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -421,7 +401,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified pool. :param resource_group_name: The name of the resource group that @@ -433,12 +413,14 @@ def delete( account. :type pool_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -449,30 +431,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -481,12 +441,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}/pools/{poolName}'} def get( @@ -527,7 +488,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -536,17 +497,16 @@ def get( 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, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -599,7 +559,7 @@ def disable_auto_scale( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -608,17 +568,16 @@ def disable_auto_scale( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -680,7 +639,7 @@ def stop_resize( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -689,17 +648,16 @@ def stop_resize( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { From 05dba2dda6c98492c58d9fb4a3a2193187d5f8bd Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2019 05:32:22 +0000 Subject: [PATCH 06/37] Generated from 7f1426ef3538b7f45bf29f899122fb21713e3986 (#61) chore: jsonfmt batch Fix spelling issues added in #6629 from "example" values in spec --- .../mgmt/batch/_batch_management_client.py | 2 +- .../azure/mgmt/batch/models/__init__.py | 17 + .../models/_batch_management_client_enums.py | 8 +- .../azure/mgmt/batch/models/_models.py | 291 +++++++++++++++-- .../azure/mgmt/batch/models/_models_py3.py | 299 ++++++++++++++++-- .../operations/_application_operations.py | 4 +- .../_application_package_operations.py | 4 +- .../operations/_batch_account_operations.py | 4 +- .../operations/_certificate_operations.py | 4 +- .../batch/operations/_location_operations.py | 4 +- .../mgmt/batch/operations/_operations.py | 4 +- .../mgmt/batch/operations/_pool_operations.py | 4 +- 12 files changed, 585 insertions(+), 60 deletions(-) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py index 6cdcc5ca3eaf..93830a182c23 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py @@ -60,7 +60,7 @@ def __init__( super(BatchManagementClient, 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 = '2019-04-01' + self.api_version = '2019-08-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py index b17bdd9834c9..0e44daa97447 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py @@ -20,6 +20,8 @@ from ._models_py3 import AutoStorageBaseProperties from ._models_py3 import AutoStorageProperties from ._models_py3 import AutoUserSpecification + from ._models_py3 import AzureBlobFileSystemConfiguration + from ._models_py3 import AzureFileShareConfiguration from ._models_py3 import BatchAccount from ._models_py3 import BatchAccountCreateParameters from ._models_py3 import BatchAccountKeys @@ -32,6 +34,7 @@ from ._models_py3 import CertificateReference from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import CIFSMountConfiguration from ._models_py3 import CloudServiceConfiguration from ._models_py3 import ContainerConfiguration from ._models_py3 import ContainerRegistry @@ -45,8 +48,10 @@ from ._models_py3 import KeyVaultReference from ._models_py3 import LinuxUserConfiguration from ._models_py3 import MetadataItem + from ._models_py3 import MountConfiguration from ._models_py3 import NetworkConfiguration from ._models_py3 import NetworkSecurityGroupRule + from ._models_py3 import NFSMountConfiguration from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import Pool @@ -77,6 +82,8 @@ from ._models import AutoStorageBaseProperties from ._models import AutoStorageProperties from ._models import AutoUserSpecification + from ._models import AzureBlobFileSystemConfiguration + from ._models import AzureFileShareConfiguration from ._models import BatchAccount from ._models import BatchAccountCreateParameters from ._models import BatchAccountKeys @@ -89,6 +96,7 @@ from ._models import CertificateReference from ._models import CheckNameAvailabilityParameters from ._models import CheckNameAvailabilityResult + from ._models import CIFSMountConfiguration from ._models import CloudServiceConfiguration from ._models import ContainerConfiguration from ._models import ContainerRegistry @@ -102,8 +110,10 @@ from ._models import KeyVaultReference from ._models import LinuxUserConfiguration from ._models import MetadataItem + from ._models import MountConfiguration from ._models import NetworkConfiguration from ._models import NetworkSecurityGroupRule + from ._models import NFSMountConfiguration from ._models import Operation from ._models import OperationDisplay from ._models import Pool @@ -148,6 +158,7 @@ ElevationLevel, LoginMode, AutoUserScope, + ContainerWorkingDirectory, CertificateStoreLocation, CertificateVisibility, NameAvailabilityReason, @@ -164,6 +175,8 @@ 'AutoStorageBaseProperties', 'AutoStorageProperties', 'AutoUserSpecification', + 'AzureBlobFileSystemConfiguration', + 'AzureFileShareConfiguration', 'BatchAccount', 'BatchAccountCreateParameters', 'BatchAccountKeys', @@ -176,6 +189,7 @@ 'CertificateReference', 'CheckNameAvailabilityParameters', 'CheckNameAvailabilityResult', + 'CIFSMountConfiguration', 'CloudServiceConfiguration', 'ContainerConfiguration', 'ContainerRegistry', @@ -189,8 +203,10 @@ 'KeyVaultReference', 'LinuxUserConfiguration', 'MetadataItem', + 'MountConfiguration', 'NetworkConfiguration', 'NetworkSecurityGroupRule', + 'NFSMountConfiguration', 'Operation', 'OperationDisplay', 'Pool', @@ -234,6 +250,7 @@ 'ElevationLevel', 'LoginMode', 'AutoUserScope', + 'ContainerWorkingDirectory', 'CertificateStoreLocation', 'CertificateVisibility', 'NameAvailabilityReason', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py index 0bd6782557aa..126edf4d370a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py @@ -129,6 +129,12 @@ class AutoUserScope(str, Enum): pool = "Pool" #: Specifies that the task runs as the common auto user account which is created on every node in a pool. +class ContainerWorkingDirectory(str, Enum): + + task_working_directory = "TaskWorkingDirectory" #: Use the standard Batch service task working directory, which will contain the Task resource files populated by Batch. + container_image_default = "ContainerImageDefault" #: Using container image defined working directory. Beware that this directory will not contain the resource files downloaded by Batch. + + class CertificateStoreLocation(str, Enum): current_user = "CurrentUser" #: Certificates should be installed to the CurrentUser certificate store. @@ -137,7 +143,7 @@ class CertificateStoreLocation(str, Enum): class CertificateVisibility(str, Enum): - start_task = "StartTask" #: The certificate should be visible to the user account under which the start task is run. + start_task = "StartTask" #: The certificate should be visible to the user account under which the start task is run. Note that if AutoUser Scope is Pool for both the StartTask and a Task, this certificate will be visible to the Task as well. task = "Task" #: The certificate should be visible to the user accounts under which job tasks are run. remote_user = "RemoteUser" #: The certificate should be visible to the user accounts under which users remotely access the node. diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py index 4b01ce194f4f..dab9f9a63fbc 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py @@ -371,14 +371,16 @@ class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. - :param scope: The scope for the auto user. The default value is task. + :param scope: The scope for the auto user. The default value is Pool. If + the pool is running Windows a value of Task should be specified if + stricter isolation between tasks is required. For example, if the task + mutates the registry in a way which could impact other tasks, or if + certificates have been specified on the pool which should not be + accessible by normal tasks but should be accessible by start tasks. Possible values include: 'Task', 'Pool' :type scope: str or ~azure.mgmt.batch.models.AutoUserScope - :param elevation_level: The elevation level of the auto user. nonAdmin - - The auto user is a standard user without elevated access. admin - The auto - user is a user with elevated access and operates with full Administrator - permissions. The default value is nonAdmin. Possible values include: - 'NonAdmin', 'Admin' + :param elevation_level: The elevation level of the auto user. The default + value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel """ @@ -393,6 +395,101 @@ def __init__(self, **kwargs): self.elevation_level = kwargs.get('elevation_level', None) +class AzureBlobFileSystemConfiguration(Model): + """Blobfuse file system details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param container_name: Required. The Azure Blob Storage container name. + :type container_name: str + :param account_key: The Azure Storage account key. This property is + mutually exclusive with sasKey and one must be specified. + :type account_key: str + :param sas_key: The Azure Storage SAS token. This property is mutually + exclusive with accountKey and one must be specified. + :type sas_key: str + :param blobfuse_options: Additional command line options to pass to the + mount command. These are 'net use' options in Windows and 'mount' options + in Linux. + :type blobfuse_options: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + """ + + _validation = { + 'account_name': {'required': True}, + 'container_name': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'blobfuse_options': {'key': 'blobfuseOptions', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFileSystemConfiguration, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.container_name = kwargs.get('container_name', None) + self.account_key = kwargs.get('account_key', None) + self.sas_key = kwargs.get('sas_key', None) + self.blobfuse_options = kwargs.get('blobfuse_options', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + + +class AzureFileShareConfiguration(Model): + """Azure Files details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param azure_file_url: Required. The Azure Files URL. + :type azure_file_url: str + :param account_key: Required. The Azure Storage account key. + :type account_key: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'account_name': {'required': True}, + 'azure_file_url': {'required': True}, + 'account_key': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'azure_file_url': {'key': 'azureFileUrl', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareConfiguration, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.azure_file_url = kwargs.get('azure_file_url', None) + self.account_key = kwargs.get('account_key', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) + + class Resource(Model): """A definition of an Azure resource. @@ -1009,6 +1106,51 @@ def __init__(self, **kwargs): self.message = None +class CIFSMountConfiguration(Model): + """CIFS file system details. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. The user to use for authentication against the + CIFS file system. + :type username: str + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + :param password: Required. The password to authenticate with. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CIFSMountConfiguration, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.source = kwargs.get('source', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) + self.password = kwargs.get('password', None) + + class CloudError(Model): """An error response from the Batch service. @@ -1179,8 +1321,9 @@ def __init__(self, **kwargs): class DataDisk(Model): - """Data Disk settings which will be used by the data disks associated to - Compute Nodes in the pool. + """Settings which will be used by the data disks associated to Compute Nodes + in the Pool. When using attached data disks, you need to mount and format + the disks from within a VM to use them. All required parameters must be populated in order to send to Azure. @@ -1377,22 +1520,25 @@ class ImageReference(Model): image. For example, UbuntuServer or WindowsServer. :type offer: str :param sku: The SKU of the Azure Virtual Machines Marketplace image. For - example, 14.04.0-LTS or 2012-R2-Datacenter. + example, 18.04-LTS or 2019-Datacenter. :type sku: str :param version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :type version: str - :param id: The ARM resource identifier of the virtual machine image. - Computes nodes of the pool will be created using this custom image. This - is of the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - This property is mutually exclusive with other properties. The virtual - machine image must be in the same region and subscription as the Azure - Batch account. For information about the firewall settings for Batch node - agent to communicate with Batch service see - https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - . + :param id: The ARM resource identifier of the Virtual Machine Image or + Shared Image Gallery Image. Compute Nodes of the Pool will be created + using this Image Id. This is of either the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} + for Virtual Machine Image or + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId} + for SIG image. This property is mutually exclusive with other properties. + For Virtual Machine Image it must be in the same region and subscription + as the Azure Batch account. For SIG image it must have replicas in the + same region as the Azure Batch account. For information about the firewall + settings for the Batch node agent to communicate with the Batch service + see + https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. :type id: str """ @@ -1581,6 +1727,46 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) +class MountConfiguration(Model): + """The file system to mount on each node. + + Each property is mutually exclusive. + + :param azure_blob_file_system_configuration: The Azure Storage container + to mount using blob FUSE on each node. This property is mutually exclusive + with all other properties. + :type azure_blob_file_system_configuration: + ~azure.mgmt.batch.models.AzureBlobFileSystemConfiguration + :param nfs_mount_configuration: The NFS file system to mount on each node. + This property is mutually exclusive with all other properties. + :type nfs_mount_configuration: + ~azure.mgmt.batch.models.NFSMountConfiguration + :param cifs_mount_configuration: The CIFS/SMB file system to mount on each + node. This property is mutually exclusive with all other properties. + :type cifs_mount_configuration: + ~azure.mgmt.batch.models.CIFSMountConfiguration + :param azure_file_share_configuration: The Azure File Share to mount on + each node. This is CIFS based for linux and net use for for windows, and + this property is mutually exclusive with all other properties. + :type azure_file_share_configuration: + ~azure.mgmt.batch.models.AzureFileShareConfiguration + """ + + _attribute_map = { + 'azure_blob_file_system_configuration': {'key': 'azureBlobFileSystemConfiguration', 'type': 'AzureBlobFileSystemConfiguration'}, + 'nfs_mount_configuration': {'key': 'nfsMountConfiguration', 'type': 'NFSMountConfiguration'}, + 'cifs_mount_configuration': {'key': 'cifsMountConfiguration', 'type': 'CIFSMountConfiguration'}, + 'azure_file_share_configuration': {'key': 'azureFileShareConfiguration', 'type': 'AzureFileShareConfiguration'}, + } + + def __init__(self, **kwargs): + super(MountConfiguration, self).__init__(**kwargs) + self.azure_blob_file_system_configuration = kwargs.get('azure_blob_file_system_configuration', None) + self.nfs_mount_configuration = kwargs.get('nfs_mount_configuration', None) + self.cifs_mount_configuration = kwargs.get('cifs_mount_configuration', None) + self.azure_file_share_configuration = kwargs.get('azure_file_share_configuration', None) + + class NetworkConfiguration(Model): """The network configuration for a pool. @@ -1615,17 +1801,27 @@ class NetworkConfiguration(Model): pools with the virtualMachineConfiguration property. :type endpoint_configuration: ~azure.mgmt.batch.models.PoolEndpointConfiguration + :param public_ips: The list of public IPs which the Batch service will use + when provisioning Compute Nodes. The number of IPs specified here limits + the maximum size of the Pool - 50 dedicated nodes or 20 low-priority nodes + can be allocated for each public IP. For example, a pool needing 150 + dedicated VMs would need at least 3 public IPs specified. This is of the + form: + /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + :type public_ips: list[str] """ _attribute_map = { 'subnet_id': {'key': 'subnetId', 'type': 'str'}, 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, } def __init__(self, **kwargs): super(NetworkConfiguration, self).__init__(**kwargs) self.subnet_id = kwargs.get('subnet_id', None) self.endpoint_configuration = kwargs.get('endpoint_configuration', None) + self.public_ips = kwargs.get('public_ips', None) class NetworkSecurityGroupRule(Model): @@ -1651,6 +1847,12 @@ class NetworkSecurityGroupRule(Model): addresses). If any other values are provided the request fails with HTTP status code 400. :type source_address_prefix: str + :param source_port_ranges: The source port ranges to match for the rule. + Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port + ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the + port ranges or ports can't overlap. If any other values are provided the + request fails with HTTP status code 400. Default value will be *. + :type source_port_ranges: list[str] """ _validation = { @@ -1663,6 +1865,7 @@ class NetworkSecurityGroupRule(Model): 'priority': {'key': 'priority', 'type': 'int'}, 'access': {'key': 'access', 'type': 'NetworkSecurityGroupRuleAccess'}, 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -1670,6 +1873,41 @@ def __init__(self, **kwargs): self.priority = kwargs.get('priority', None) self.access = kwargs.get('access', None) self.source_address_prefix = kwargs.get('source_address_prefix', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + + +class NFSMountConfiguration(Model): + """NFS file system detail. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NFSMountConfiguration, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) class Operation(Model): @@ -1861,6 +2099,10 @@ class Pool(ProxyResource): completed resize operation. :vartype resize_operation_status: ~azure.mgmt.batch.models.ResizeOperationStatus + :param mount_configuration: A list of file systems to mount on each node + in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + :type mount_configuration: + list[~azure.mgmt.batch.models.MountConfiguration] """ _validation = { @@ -1909,6 +2151,7 @@ class Pool(ProxyResource): 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'mount_configuration': {'key': 'properties.mountConfiguration', 'type': '[MountConfiguration]'}, } def __init__(self, **kwargs): @@ -1937,6 +2180,7 @@ def __init__(self, **kwargs): self.application_packages = kwargs.get('application_packages', None) self.application_licenses = kwargs.get('application_licenses', None) self.resize_operation_status = None + self.mount_configuration = kwargs.get('mount_configuration', None) class PoolEndpointConfiguration(Model): @@ -2202,7 +2446,7 @@ class StartTask(Model): the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. + continue to be scheduled on the node. The default is true. :type wait_for_success: bool :param container_settings: The settings for the container under which the start task runs. When this is specified, all directories recursively below @@ -2251,6 +2495,11 @@ class TaskContainerSettings(Model): :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. :type registry: ~azure.mgmt.batch.models.ContainerRegistry + :param working_directory: A flag to indicate where the container task + working directory is. The default is 'taskWorkingDirectory'. Possible + values include: 'TaskWorkingDirectory', 'ContainerImageDefault' + :type working_directory: str or + ~azure.mgmt.batch.models.ContainerWorkingDirectory """ _validation = { @@ -2261,6 +2510,7 @@ class TaskContainerSettings(Model): 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, 'image_name': {'key': 'imageName', 'type': 'str'}, 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'working_directory': {'key': 'workingDirectory', 'type': 'ContainerWorkingDirectory'}, } def __init__(self, **kwargs): @@ -2268,6 +2518,7 @@ def __init__(self, **kwargs): self.container_run_options = kwargs.get('container_run_options', None) self.image_name = kwargs.get('image_name', None) self.registry = kwargs.get('registry', None) + self.working_directory = kwargs.get('working_directory', None) class TaskSchedulingPolicy(Model): diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py index edb71960c6fb..1a287b5e2e90 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py @@ -371,14 +371,16 @@ class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. - :param scope: The scope for the auto user. The default value is task. + :param scope: The scope for the auto user. The default value is Pool. If + the pool is running Windows a value of Task should be specified if + stricter isolation between tasks is required. For example, if the task + mutates the registry in a way which could impact other tasks, or if + certificates have been specified on the pool which should not be + accessible by normal tasks but should be accessible by start tasks. Possible values include: 'Task', 'Pool' :type scope: str or ~azure.mgmt.batch.models.AutoUserScope - :param elevation_level: The elevation level of the auto user. nonAdmin - - The auto user is a standard user without elevated access. admin - The auto - user is a user with elevated access and operates with full Administrator - permissions. The default value is nonAdmin. Possible values include: - 'NonAdmin', 'Admin' + :param elevation_level: The elevation level of the auto user. The default + value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel """ @@ -393,6 +395,101 @@ def __init__(self, *, scope=None, elevation_level=None, **kwargs) -> None: self.elevation_level = elevation_level +class AzureBlobFileSystemConfiguration(Model): + """Blobfuse file system details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param container_name: Required. The Azure Blob Storage container name. + :type container_name: str + :param account_key: The Azure Storage account key. This property is + mutually exclusive with sasKey and one must be specified. + :type account_key: str + :param sas_key: The Azure Storage SAS token. This property is mutually + exclusive with accountKey and one must be specified. + :type sas_key: str + :param blobfuse_options: Additional command line options to pass to the + mount command. These are 'net use' options in Windows and 'mount' options + in Linux. + :type blobfuse_options: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + """ + + _validation = { + 'account_name': {'required': True}, + 'container_name': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'blobfuse_options': {'key': 'blobfuseOptions', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, container_name: str, relative_mount_path: str, account_key: str=None, sas_key: str=None, blobfuse_options: str=None, **kwargs) -> None: + super(AzureBlobFileSystemConfiguration, self).__init__(**kwargs) + self.account_name = account_name + self.container_name = container_name + self.account_key = account_key + self.sas_key = sas_key + self.blobfuse_options = blobfuse_options + self.relative_mount_path = relative_mount_path + + +class AzureFileShareConfiguration(Model): + """Azure Files details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param azure_file_url: Required. The Azure Files URL. + :type azure_file_url: str + :param account_key: Required. The Azure Storage account key. + :type account_key: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'account_name': {'required': True}, + 'azure_file_url': {'required': True}, + 'account_key': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'azure_file_url': {'key': 'azureFileUrl', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, azure_file_url: str, account_key: str, relative_mount_path: str, mount_options: str=None, **kwargs) -> None: + super(AzureFileShareConfiguration, self).__init__(**kwargs) + self.account_name = account_name + self.azure_file_url = azure_file_url + self.account_key = account_key + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options + + class Resource(Model): """A definition of an Azure resource. @@ -1009,6 +1106,51 @@ def __init__(self, **kwargs) -> None: self.message = None +class CIFSMountConfiguration(Model): + """CIFS file system details. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. The user to use for authentication against the + CIFS file system. + :type username: str + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + :param password: Required. The password to authenticate with. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, username: str, source: str, relative_mount_path: str, password: str, mount_options: str=None, **kwargs) -> None: + super(CIFSMountConfiguration, self).__init__(**kwargs) + self.username = username + self.source = source + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options + self.password = password + + class CloudError(Model): """An error response from the Batch service. @@ -1179,8 +1321,9 @@ def __init__(self, *, user_name: str, password: str, registry_server: str=None, class DataDisk(Model): - """Data Disk settings which will be used by the data disks associated to - Compute Nodes in the pool. + """Settings which will be used by the data disks associated to Compute Nodes + in the Pool. When using attached data disks, you need to mount and format + the disks from within a VM to use them. All required parameters must be populated in order to send to Azure. @@ -1377,22 +1520,25 @@ class ImageReference(Model): image. For example, UbuntuServer or WindowsServer. :type offer: str :param sku: The SKU of the Azure Virtual Machines Marketplace image. For - example, 14.04.0-LTS or 2012-R2-Datacenter. + example, 18.04-LTS or 2019-Datacenter. :type sku: str :param version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :type version: str - :param id: The ARM resource identifier of the virtual machine image. - Computes nodes of the pool will be created using this custom image. This - is of the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - This property is mutually exclusive with other properties. The virtual - machine image must be in the same region and subscription as the Azure - Batch account. For information about the firewall settings for Batch node - agent to communicate with Batch service see - https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - . + :param id: The ARM resource identifier of the Virtual Machine Image or + Shared Image Gallery Image. Compute Nodes of the Pool will be created + using this Image Id. This is of either the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} + for Virtual Machine Image or + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId} + for SIG image. This property is mutually exclusive with other properties. + For Virtual Machine Image it must be in the same region and subscription + as the Azure Batch account. For SIG image it must have replicas in the + same region as the Azure Batch account. For information about the firewall + settings for the Batch node agent to communicate with the Batch service + see + https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. :type id: str """ @@ -1581,6 +1727,46 @@ def __init__(self, *, name: str, value: str, **kwargs) -> None: self.value = value +class MountConfiguration(Model): + """The file system to mount on each node. + + Each property is mutually exclusive. + + :param azure_blob_file_system_configuration: The Azure Storage container + to mount using blob FUSE on each node. This property is mutually exclusive + with all other properties. + :type azure_blob_file_system_configuration: + ~azure.mgmt.batch.models.AzureBlobFileSystemConfiguration + :param nfs_mount_configuration: The NFS file system to mount on each node. + This property is mutually exclusive with all other properties. + :type nfs_mount_configuration: + ~azure.mgmt.batch.models.NFSMountConfiguration + :param cifs_mount_configuration: The CIFS/SMB file system to mount on each + node. This property is mutually exclusive with all other properties. + :type cifs_mount_configuration: + ~azure.mgmt.batch.models.CIFSMountConfiguration + :param azure_file_share_configuration: The Azure File Share to mount on + each node. This is CIFS based for linux and net use for for windows, and + this property is mutually exclusive with all other properties. + :type azure_file_share_configuration: + ~azure.mgmt.batch.models.AzureFileShareConfiguration + """ + + _attribute_map = { + 'azure_blob_file_system_configuration': {'key': 'azureBlobFileSystemConfiguration', 'type': 'AzureBlobFileSystemConfiguration'}, + 'nfs_mount_configuration': {'key': 'nfsMountConfiguration', 'type': 'NFSMountConfiguration'}, + 'cifs_mount_configuration': {'key': 'cifsMountConfiguration', 'type': 'CIFSMountConfiguration'}, + 'azure_file_share_configuration': {'key': 'azureFileShareConfiguration', 'type': 'AzureFileShareConfiguration'}, + } + + def __init__(self, *, azure_blob_file_system_configuration=None, nfs_mount_configuration=None, cifs_mount_configuration=None, azure_file_share_configuration=None, **kwargs) -> None: + super(MountConfiguration, self).__init__(**kwargs) + self.azure_blob_file_system_configuration = azure_blob_file_system_configuration + self.nfs_mount_configuration = nfs_mount_configuration + self.cifs_mount_configuration = cifs_mount_configuration + self.azure_file_share_configuration = azure_file_share_configuration + + class NetworkConfiguration(Model): """The network configuration for a pool. @@ -1615,17 +1801,27 @@ class NetworkConfiguration(Model): pools with the virtualMachineConfiguration property. :type endpoint_configuration: ~azure.mgmt.batch.models.PoolEndpointConfiguration + :param public_ips: The list of public IPs which the Batch service will use + when provisioning Compute Nodes. The number of IPs specified here limits + the maximum size of the Pool - 50 dedicated nodes or 20 low-priority nodes + can be allocated for each public IP. For example, a pool needing 150 + dedicated VMs would need at least 3 public IPs specified. This is of the + form: + /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + :type public_ips: list[str] """ _attribute_map = { 'subnet_id': {'key': 'subnetId', 'type': 'str'}, 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, } - def __init__(self, *, subnet_id: str=None, endpoint_configuration=None, **kwargs) -> None: + def __init__(self, *, subnet_id: str=None, endpoint_configuration=None, public_ips=None, **kwargs) -> None: super(NetworkConfiguration, self).__init__(**kwargs) self.subnet_id = subnet_id self.endpoint_configuration = endpoint_configuration + self.public_ips = public_ips class NetworkSecurityGroupRule(Model): @@ -1651,6 +1847,12 @@ class NetworkSecurityGroupRule(Model): addresses). If any other values are provided the request fails with HTTP status code 400. :type source_address_prefix: str + :param source_port_ranges: The source port ranges to match for the rule. + Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port + ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the + port ranges or ports can't overlap. If any other values are provided the + request fails with HTTP status code 400. Default value will be *. + :type source_port_ranges: list[str] """ _validation = { @@ -1663,13 +1865,49 @@ class NetworkSecurityGroupRule(Model): 'priority': {'key': 'priority', 'type': 'int'}, 'access': {'key': 'access', 'type': 'NetworkSecurityGroupRuleAccess'}, 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, } - def __init__(self, *, priority: int, access, source_address_prefix: str, **kwargs) -> None: + def __init__(self, *, priority: int, access, source_address_prefix: str, source_port_ranges=None, **kwargs) -> None: super(NetworkSecurityGroupRule, self).__init__(**kwargs) self.priority = priority self.access = access self.source_address_prefix = source_address_prefix + self.source_port_ranges = source_port_ranges + + +class NFSMountConfiguration(Model): + """NFS file system detail. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, *, source: str, relative_mount_path: str, mount_options: str=None, **kwargs) -> None: + super(NFSMountConfiguration, self).__init__(**kwargs) + self.source = source + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options class Operation(Model): @@ -1861,6 +2099,10 @@ class Pool(ProxyResource): completed resize operation. :vartype resize_operation_status: ~azure.mgmt.batch.models.ResizeOperationStatus + :param mount_configuration: A list of file systems to mount on each node + in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + :type mount_configuration: + list[~azure.mgmt.batch.models.MountConfiguration] """ _validation = { @@ -1909,9 +2151,10 @@ class Pool(ProxyResource): 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'mount_configuration': {'key': 'properties.mountConfiguration', 'type': '[MountConfiguration]'}, } - def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, **kwargs) -> None: + def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, mount_configuration=None, **kwargs) -> None: super(Pool, self).__init__(**kwargs) self.display_name = display_name self.last_modified = None @@ -1937,6 +2180,7 @@ def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_conf self.application_packages = application_packages self.application_licenses = application_licenses self.resize_operation_status = None + self.mount_configuration = mount_configuration class PoolEndpointConfiguration(Model): @@ -2202,7 +2446,7 @@ class StartTask(Model): the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. + continue to be scheduled on the node. The default is true. :type wait_for_success: bool :param container_settings: The settings for the container under which the start task runs. When this is specified, all directories recursively below @@ -2251,6 +2495,11 @@ class TaskContainerSettings(Model): :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. :type registry: ~azure.mgmt.batch.models.ContainerRegistry + :param working_directory: A flag to indicate where the container task + working directory is. The default is 'taskWorkingDirectory'. Possible + values include: 'TaskWorkingDirectory', 'ContainerImageDefault' + :type working_directory: str or + ~azure.mgmt.batch.models.ContainerWorkingDirectory """ _validation = { @@ -2261,13 +2510,15 @@ class TaskContainerSettings(Model): 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, 'image_name': {'key': 'imageName', 'type': 'str'}, 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'working_directory': {'key': 'workingDirectory', 'type': 'ContainerWorkingDirectory'}, } - def __init__(self, *, image_name: str, container_run_options: str=None, registry=None, **kwargs) -> None: + def __init__(self, *, image_name: str, container_run_options: str=None, registry=None, working_directory=None, **kwargs) -> None: super(TaskContainerSettings, self).__init__(**kwargs) self.container_run_options = container_run_options self.image_name = image_name self.registry = registry + self.working_directory = working_directory class TaskSchedulingPolicy(Model): diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py index 2ceacf73cd3c..d78823852422 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py @@ -25,7 +25,7 @@ class ApplicationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py index a3e792b0b3af..6e125e1993cf 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py @@ -25,7 +25,7 @@ class ApplicationPackageOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py index 635b97d5e875..936fb33a68c9 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py @@ -27,7 +27,7 @@ class BatchAccountOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py index eb726f288a3f..faea89158f23 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py @@ -27,7 +27,7 @@ class CertificateOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py index 686dc2b3097b..c2ab551fb4eb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py @@ -25,7 +25,7 @@ class LocationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py index 799529b363cb..2c6a2e4e32d9 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py index 95715cda042a..22d5a28593c6 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py @@ -27,7 +27,7 @@ class PoolOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config From b72c9c5a583dfac120447a2b46e425f7a5b2be60 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 24 Jul 2019 17:41:59 -0700 Subject: [PATCH 07/37] Trace identity (#6455) * make sure its int. Need it to pass the test * added policy and decorator * dont decorate authn * loggin policy behind retry policy * managed should not be decoratored * dont need my workaround * dont trace get_token * dont need this extra indent --- .../azure-identity/azure/identity/_authn_client.py | 3 ++- .../azure-identity/azure/identity/aio/_authn_client.py | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_authn_client.py b/sdk/identity/azure-identity/azure/identity/_authn_client.py index 14d86ff8c9f7..09fc166d917e 100644 --- a/sdk/identity/azure-identity/azure/identity/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/_authn_client.py @@ -10,6 +10,7 @@ from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline import Pipeline from azure.core.pipeline.policies import ContentDecodePolicy, NetworkTraceLoggingPolicy, RetryPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import HttpTransport, RequestsTransport from msal import TokenCache @@ -119,7 +120,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) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + 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/aio/_authn_client.py b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py index 6b57a9d02d2d..4d75cd07b1a3 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py @@ -8,6 +8,7 @@ from azure.core import Configuration from azure.core.credentials import AccessToken from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.policies import AsyncRetryPolicy, ContentDecodePolicy, HTTPPolicy, NetworkTraceLoggingPolicy from azure.core.pipeline.transport import AsyncHttpTransport from azure.core.pipeline.transport.requests_asyncio import AsyncioRequestsTransport @@ -27,7 +28,12 @@ def __init__( **kwargs: Mapping[str, Any] ) -> None: config = config or self.create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + policies = policies or [ + ContentDecodePolicy(), + config.retry_policy, + config.logging_policy, + DistributedTracingPolicy(), + ] if not transport: transport = AsyncioRequestsTransport(**kwargs) self._pipeline = AsyncPipeline(transport=transport, policies=policies) From eaa4351df120ed8c8253b41071171830810aa896 Mon Sep 17 00:00:00 2001 From: Kate Olszewska Date: Thu, 25 Jul 2019 09:52:14 -0700 Subject: [PATCH 08/37] Update root README.md Updating the Contributing section according to the guidelines --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de33c04f8fa3..e11a735c6574 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,14 @@ Libraries which enable you to provision specific resources. They are responsible ## Contributing For details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md). -## Code of Conduct +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit +https://cla.microsoft.com. -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2FREADME.png) From 7904f5971a72ec286d397f3b0805d8fb2e8e4b24 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 09/37] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e7da96b211dc..518b5aa20c8c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -37,6 +37,9 @@ /sql/sql/ @jaredmoo /sdk/servicebus/azure-servicebus/ @annatisch +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From f0952ae8efbd8f722092d1d5c52f6c11b47dfc79 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 10/37] more code owners --- .github/CODEOWNERS | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 518b5aa20c8c..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,20 +6,20 @@ ########### # Catch all -# /sdk/ @mayurid +/sdk/ @mayurid # Core -/sdk/core/ @lmazuel +/sdk/core/ @lmazuel @xiangyan99 @johanste /sdk/core/azure-core/ @xiangyan99 @bryevdv # Service team -# /sdk/identity/ -# /sdk/eventhub/ +/sdk/identity/ @chlowell @schaabs +/sdk/eventhub/ @annatisch @yunhaoling @YijunXieMS /sdk/storage/ @zezha-msft @annatisch @rakshith91 /sdk/applicationinsights/ @alexeldeib /sdk/batch/ @bgklein @matthchr @xingwu1 /sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish -/sdk/keyvault/ @schaabs @chlowell +/sdk/keyvault/ @schaabs @chlowell @iscai-msft /sdk/loganalytics/ @alexeldeib /sdk/consumption/ @sandeepnl /sdk/containerinstance/ @samkreter @xizhamsft @@ -35,7 +35,7 @@ /sdk/recoveryservices/ @DheerendraRathor /sdk/servicefabric/ @QingChenmsft @samedder /sql/sql/ @jaredmoo -/sdk/servicebus/azure-servicebus/ @annatisch +/sdk/servicebus/azure-servicebus/ @annatisch @yunhaoling @YijunXieMS # Management Plane /**/*mgmt*/ @zikalino From 54fb52f45ee329ff479d70607746c8fed7edc320 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 11/37] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_client.py | 13 +++++++++++++ .../keyvault/secrets/_shared/async_client_base.py | 2 ++ .../azure/keyvault/secrets/_shared/client_base.py | 2 ++ .../azure/keyvault/secrets/aio/_client.py | 14 ++++++++++++++ 4 files changed, 31 insertions(+) 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 f15b6779b9d3..1f0a670bf217 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -13,6 +13,7 @@ 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 Secret, DeletedSecret, SecretAttributes @@ -32,6 +33,7 @@ class SecretClient(KeyVaultClientBase): # pylint:disable=protected-access + @distributed_trace def get_secret(self, name, version=None, **kwargs): # type: (str, str, Mapping[str, Any]) -> Secret """Get a specified secret from the vault. @@ -59,6 +61,7 @@ def get_secret(self, name, version=None, **kwargs): ) return Secret._from_secret_bundle(bundle) + @distributed_trace def set_secret( self, name, value, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -101,6 +104,7 @@ def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace def update_secret( self, name, version=None, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -151,6 +155,7 @@ def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[SecretAttributes] """List secrets in the vault. @@ -177,6 +182,7 @@ def list_secrets(self, **kwargs): pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) return (SecretAttributes._from_secret_item(item) for item in pages) + @distributed_trace def list_secret_versions(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> Generator[SecretAttributes] """List all versions of the specified secret. @@ -203,6 +209,7 @@ def list_secret_versions(self, name, **kwargs): 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) + @distributed_trace def backup_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> bytes """Backs up the specified secret. @@ -230,6 +237,7 @@ def backup_secret(self, name, **kwargs): ) return backup_result.value + @distributed_trace def restore_secret(self, backup, **kwargs): # type: (bytes, Mapping[str, Any]) -> SecretAttributes """Restore a backed up secret to the vault. @@ -254,6 +262,7 @@ def restore_secret(self, backup, **kwargs): bundle = self._client.restore_secret(self.vault_url, backup, error_map={409: ResourceExistsError}, **kwargs) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace def delete_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Deletes a secret from the vault. @@ -279,6 +288,7 @@ def delete_secret(self, name, **kwargs): bundle = self._client.delete_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def get_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Gets the specified deleted secret. @@ -303,6 +313,7 @@ def get_deleted_secret(self, name, **kwargs): bundle = self._client.get_deleted_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[DeletedSecret] """Lists deleted secrets of the vault. @@ -328,6 +339,7 @@ def list_deleted_secrets(self, **kwargs): 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) + @distributed_trace def purge_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> None """Permanently deletes the specified secret. @@ -350,6 +362,7 @@ def purge_deleted_secret(self, name, **kwargs): """ self._client.purge_deleted_secret(self.vault_url, 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. 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 a24761a6afe6..c40e314accc7 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,6 +6,7 @@ from azure.core.async_paging import AsyncPagedMixin 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 msrest.serialization import Model @@ -100,6 +101,7 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: 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 6a3253c77655..dbde6d74f640 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 @@ -15,6 +15,7 @@ from azure.core.pipeline.transport import HttpTransport from .challenge_auth_policy import ChallengeAuthPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy KEY_VAULT_SCOPE = "https://vault.azure.net/.default" @@ -73,6 +74,7 @@ def _build_pipeline(self, config, transport, **kwargs): config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: 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 d7cf860c4309..89a0fa98836e 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 @@ -6,6 +6,8 @@ from typing import Any, AsyncIterable, Mapping, Optional, Dict 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.secrets._models import Secret, DeletedSecret, SecretAttributes from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter @@ -25,6 +27,7 @@ class SecretClient(AsyncKeyVaultClientBase): # pylint:disable=protected-access + @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. @@ -51,6 +54,7 @@ async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: M ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def set_secret( self, name: str, @@ -99,6 +103,7 @@ async def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def update_secret( self, name: str, @@ -155,6 +160,7 @@ async def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List secrets in the vault. @@ -180,6 +186,7 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List all versions of the specified secret. @@ -205,6 +212,7 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: """Backs up the specified secret. @@ -230,6 +238,7 @@ async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: ) return backup_result.value + @distributed_trace_async async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Restores a backed up secret to a vault. @@ -254,6 +263,7 @@ async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> Se ) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace_async async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Deletes a secret from the vault. @@ -279,6 +289,7 @@ async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> Deleted ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace_async async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Gets the specified deleted secret. @@ -303,6 +314,7 @@ async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> De ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[DeletedSecret]: """Lists deleted secrets of the vault. @@ -327,6 +339,7 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) return iterable + @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: """Permanently deletes the specified secret. @@ -347,6 +360,7 @@ async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> """ await self._client.purge_deleted_secret(self.vault_url, name, **kwargs) + @distributed_trace_async async def recover_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Recovers the deleted secret to the latest version. From ac1dbd5ec30513a1475a728d290fb253bb9220b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20C=C3=A1rdenas?= Date: Thu, 25 Jul 2019 12:01:53 -0700 Subject: [PATCH 12/37] Smoke test for Python (#6412) * Smoke Test Sample for Track 2 libraries Smoke Test for Indentity, Key Vault Secrets, Storage Blobs, Event Hubs and Cosmos DB * simpleQuery method added * Method's names updated * Create README.md * Update README.md * Commented lines deleted * README.md moved to correct folder * Create requirements.txt * Update README.md * Update README.md * Imports changed * Use of literals instead of append * Database Name variable to class level. * Use of Pythonic with statements * Update requirements.txt * Revert "Update requirements.txt" This reverts commit 4b79c6a84780f169e15c17d96e5728f32ed419f3. * Revert "Use of Pythonic with statements" This reverts commit 81adc4ca46f67d3a068aeee5e41c4514d63d8758. * Revert "Revert "Use of Pythonic with statements"" This reverts commit 27b2a2d635ff47880dee2c741bcb5c81c187df7d. * requiriments.txt encoded as a txt file * requirements.txt as text file * Misspelling in "Key concepts" * Update .docsettings.yml to match the tittle of Smoke Test * Went trought Suyog comments * Revert "Went trought Suyog comments" This reverts commit 35c62232f8e0562087b7f5eb3d4bdf57ea6e502f. * Gone trought Suyog comments * use of snake case in file names --- .docsettings.yml | 2 +- samples/smoketest/Program.py | 13 +++ samples/smoketest/README.md | 116 +++++++++++++++++++++++++ samples/smoketest/cosmos_db.py | 84 ++++++++++++++++++ samples/smoketest/event_hubs.py | 66 ++++++++++++++ samples/smoketest/key_vault_secrets.py | 46 ++++++++++ samples/smoketest/requirements.txt | 8 ++ samples/smoketest/storage_blob.py | 51 +++++++++++ 8 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 samples/smoketest/Program.py create mode 100644 samples/smoketest/README.md create mode 100644 samples/smoketest/cosmos_db.py create mode 100644 samples/smoketest/event_hubs.py create mode 100644 samples/smoketest/key_vault_secrets.py create mode 100644 samples/smoketest/requirements.txt create mode 100644 samples/smoketest/storage_blob.py diff --git a/.docsettings.yml b/.docsettings.yml index 317e26b199cd..a8b9d07e4c40 100644 --- a/.docsettings.yml +++ b/.docsettings.yml @@ -9,7 +9,7 @@ omitted_paths: language: python root_check_enabled: True required_readme_sections: - - "Azure .+ client library for Python" + - ^Azure (.+ client library for Python|Smoke Test for Python) - ^Getting started$ - ^Key concepts$ - ^Examples$ diff --git a/samples/smoketest/Program.py b/samples/smoketest/Program.py new file mode 100644 index 000000000000..dd43a67f9287 --- /dev/null +++ b/samples/smoketest/Program.py @@ -0,0 +1,13 @@ +from key_vault_secrets import KeyVault +from storage_blob import StorageBlob +from event_hubs import EventHub +from cosmos_db import CosmosDB + +print("==========================================") +print(" AZURE TRACK 2 SDKs SMOKE TEST") +print("==========================================") + +KeyVault().Run() +StorageBlob().Run() +EventHub().Run() +CosmosDB().Run() diff --git a/samples/smoketest/README.md b/samples/smoketest/README.md new file mode 100644 index 000000000000..6e0a21c70235 --- /dev/null +++ b/samples/smoketest/README.md @@ -0,0 +1,116 @@ +# Azure Smoke Test for Python +This sample code is a smoke test to ensure that Azure Preview for Python work while loaded into the same process by performing 2 or more actions with them. + +Libraries tested: +* keyvault-secrets +* identity +* storage-blob +* event-hubs +* cosmos + +## Getting started +### Setup Azure resources +For this sample, it is necessary to create/have the following resources in the [Azure Portal](https://portal.azure.com/): +* **App registration**: Register a new app or use an existing one. + * Under _Certificates & secrets_ create a new **client secret** and store the value in a safe place. +* **Key Vaults**: Create a new Key Vault resource or use an existing one. + * Under _Access policies_, add the app registrated in the previous step. +* **Storage acounts**: Create a container in a new or existing storage account. The container in this sample is named "mycontainer", if you want to use other name you can change the value in `BlobStorage.ts` file: +`const containerName = "mycontainer";` +* **Event Hubs**: Create an event hub inside a new or existing Event Hubs Namespace. The container in this sample is named "myeventhub", if you want to use other name you can change the value in `EventHubsTest.ts` file: `let eventHubName = "myeventhub";` +* **Azure Cosmos DB**: Create a new account or use an existing one. + +### Azure credentials +The following environment variables are needed: +* From **App Registration**, in the _Overview_ section: + * AZURE_TENANT_ID: The directory tentant ID. + * AZURE_CLIENT_ID: The application ID. + * AZURE_CLIENT_SECRET: The client secret stored previusly when creating the _client secret_. + +* From **Key Vault**, in the _Overview_ section: + * AZURE_PROJECT_URL: The DNS Name + +* From **Event Hubs**, in _Shared access policies_ section: + * EVENT_HUBS_CONNECTION_STRING: Connection string from a policy + +* From **Storage Account**, in the _Access Keys_ section: + * STORAGE_CONNECTION_STRING : A connection strings. + +* From **Azure Cosmos DB**, in the _Keys_ section, select the _Read-Write Keys_ tab: + * COSMOS_ENDPOINT: URI. + * COSMOS_KEY: Primary or secondary key. + +``` +//Bash code to create the environment variables +export AZURE_CLIENT_ID="" +export AZURE_CLIENT_SECRET="" +export AZURE_TENANT_ID="" +export EVENT_HUBS_CONNECTION_STRING="" +export AZURE_PROJECT_URL="" +export STORAGE_CONNECTION_STRING="" +export COSMOS_ENDPOINT="" +export COSMOS_KEY="" +``` + +### Running the console app +[Python](https://www.python.org/downloads/) version 3.7.4 was used to run this sample. + +In the \SmokeTest\ directory, run Program.py +``` +python .\Program.py +``` + +## Key concepts + + +## Examples +All the classes in this sample has a `Run()` method as entry point, and do not depend on each other. + +It is possible to run them individually: +```python +from KeyVaultSecrets import KeyVault + +KeyVault().Run() +``` + +They can be included in other projects by moving the class in it: +```python +from KeyVaultSecrets import KeyVault + +... + +def myTests(): + console.log("Smoke Test imported from other project") + KeyVault().Run() + +myTests() +otherFunction() +... +``` + +The classes can be used as base code and be changed to satisfied specific needs. For example, the method `EventHub().SendAndReceiveEvents()` can be change to only send events from an array given from a parameter: +```python +def SendAndReceiveEvents(self, partitionID, events): + producer = self.client.create_producer(partition_id=partitionID) + producer.send(events) + producer.close() +``` + +**Note:** The methods in the classes are not necessary independent on each other, and the order matters. For example, in order to run `BlobStorage().DeleteBlob();`, the method `BlobStorage().UploadBLob();` must be run before, since in the other way it will fail because there is not going to be a blob to delete. + +## Troubleshooting + +### Authentication +Be sure to set the environment variables and credentials required before running the sample. + +## Next steps +Check the [Azure SDK for Python Repository](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) for more samples inside the sdk folder. + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code. + +This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. \ No newline at end of file diff --git a/samples/smoketest/cosmos_db.py b/samples/smoketest/cosmos_db.py new file mode 100644 index 000000000000..b4e2a56aa025 --- /dev/null +++ b/samples/smoketest/cosmos_db.py @@ -0,0 +1,84 @@ +import os +from azure.cosmos import CosmosClient +from azure.cosmos.partition_key import PartitionKey + + +class CosmosDB: + def __init__(self): + URL = os.environ["COSMOS_ENDPOINT"] + KEY = os.environ["COSMOS_KEY"] + self.client = CosmosClient(URL, {"masterKey": KEY}) + self.dbName = "pySolarSystem" + + def CreateDatabase(self): + print("Creating '{0}' database...".format(self.dbName)) + return self.client.create_database(self.dbName) + + def CreateContainer(self, db): + collectionName = "Planets" + print("Creating '{0}' collection...".format(collectionName)) + partition_key = PartitionKey(path="/id", kind="Hash") + return db.create_container(id="Planets", partition_key=partition_key) + + def CreateDocuments(self, container): + # Cosmos will look for an 'id' field in the items, if the 'id' is not specify Cosmos is going to assing a random key. + planets = [ + { + "id": "Earth", + "HasRings": False, + "Radius": 3959, + "Moons": [{"Name": "Moon"}], + }, + { + "id": "Mars", + "HasRings": False, + "Radius": 2106, + "Moons": [{"Name": "Phobos"}, {"Name": "Deimos"}], + }, + ] + + print("Inserting items in the collection...") + for planet in planets: + container.create_item(planet) + print("\t'{0}' created".format(planet["id"])) + print("\tdone") + + def SimpleQuery(self, container): + print("Quering the container...") + items = list( + container.query_items( + query="SELECT c.id FROM c", enable_cross_partition_query=True + ) + ) + print("\tdone: {0}".format(items)) + + def DeleteDatabase(self): + print("Cleaning up the resource...") + self.client.delete_database(self.dbName) + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Cosmos DB") + print("------------------------") + print("1) Create a Database") + print("2) Create a Container in the database") + print("3) Insert Documents (items) into the Container") + print("4) Delete Database (Clean up the resource)") + print() + + # Ensure that the database does not exists + try: + self.DeleteDatabase() + except: + pass + + try: + db = self.CreateDatabase() + container = self.CreateContainer(db=db) + self.CreateDocuments(container=container) + self.SimpleQuery(container=container) + finally: + # if something goes wrong, the resource should be cleaned anyway + self.DeleteDatabase() diff --git a/samples/smoketest/event_hubs.py b/samples/smoketest/event_hubs.py new file mode 100644 index 000000000000..9a0ed400b5c5 --- /dev/null +++ b/samples/smoketest/event_hubs.py @@ -0,0 +1,66 @@ +import os +from datetime import datetime +from azure.eventhub import EventHubClient, EventData, EventPosition + + +class EventHub: + def __init__(self): + # This test requires a previusly created Event Hub. + # In this example the name is "myeventhub", but it could be change below + connectionString = os.environ["EVENT_HUBS_CONNECTION_STRING"] + eventHubName = "myeventhub" + self.client = EventHubClient.from_connection_string( + connectionString, eventHubName + ) + + def GetPartitionIds(self): + print("Getting partitions id...") + partition_ids = self.client.get_partition_ids() + print("\tdone") + return partition_ids + + def SendAndReceiveEvents(self, partitionID): + with self.client.create_consumer( + consumer_group="$default", + partition_id=partitionID, + event_position=EventPosition(datetime.utcnow()), + ) as consumer: + + print("Sending events...") + with self.client.create_producer(partition_id=partitionID) as producer: + event_list = [ + EventData(b"Test Event 1 in Python"), + EventData(b"Test Event 2 in Python"), + EventData(b"Test Event 3 in Python"), + ] + producer.send(event_list) + print("\tdone") + + print("Receiving events...") + received = consumer.receive(max_batch_size=len(event_list), timeout=2) + for event_data in received: + print("\tEvent Received: " + event_data.body_as_str()) + + print("\tdone") + + if len(received) != len(event_list): + raise Exception( + "Error, expecting {0} events, but {1} were received.".format( + str(len(event_list)), str(len(received)) + ) + ) + + def Run(self): + print() + print("------------------------") + print("Event Hubs") + print("------------------------") + print("1) Get partition ID") + print("2) Send Events") + print("3) Consume Events") + print() + + partitionID = self.GetPartitionIds() + # In this sample the same partition id is going to be used for the producer and consumer, + # It is the first one, but it could be any (is not relevant as long as it is the same in both producer and consumer) + self.SendAndReceiveEvents(partitionID[0]) diff --git a/samples/smoketest/key_vault_secrets.py b/samples/smoketest/key_vault_secrets.py new file mode 100644 index 000000000000..7f27b02460f1 --- /dev/null +++ b/samples/smoketest/key_vault_secrets.py @@ -0,0 +1,46 @@ +import os +from azure.identity import DefaultAzureCredential +from azure.keyvault.secrets import SecretClient + + +class KeyVault: + def __init__(self): + # DefaultAzureCredential() expects the following environment variables: + # * AZURE_CLIENT_ID + # * AZURE_CLIENT_SECRET + # * AZURE_TENANT_ID + credential = DefaultAzureCredential() + self.secret_client = SecretClient( + vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential + ) + + def SetSecret(self): + print("Setting a secret...") + self.secret_client.set_secret("secret-name", "secret-value") + print("\tdone") + + def GetSecret(self): + print("Getting a secret...") + secret = self.secret_client.get_secret("secret-name") + print("\tdone: " + secret.name) + + def DeleteSecret(self): + print("Deleting a secret...") + deleted_secret = self.secret_client.delete_secret("secret-name") + print("\tdone: " + deleted_secret.name) + + def Run(self): + print() + print("------------------------") + print("Key Vault - Secrets\nIdentity - Credential") + print("------------------------") + print("1) Set a secret") + print("2) Get that secret") + print("3) Delete that secret (Clean up the resource)") + print() + + try: + self.SetSecret() + self.GetSecret() + finally: + self.DeleteSecret() diff --git a/samples/smoketest/requirements.txt b/samples/smoketest/requirements.txt new file mode 100644 index 000000000000..eaf49d15335d --- /dev/null +++ b/samples/smoketest/requirements.txt @@ -0,0 +1,8 @@ +azure-common==1.1.23 +azure-core==1.0.0b1 +azure-cosmos==4.0.0b1 +azure-eventhub==5.0.0b1 +azure-identity==1.0.0b1 +azure-keyvault-secrets==4.0.0b1 +azure-storage-blob==12.0.0b1 +azure-storage-common==2.0.0 \ No newline at end of file diff --git a/samples/smoketest/storage_blob.py b/samples/smoketest/storage_blob.py new file mode 100644 index 000000000000..7e0c394f9580 --- /dev/null +++ b/samples/smoketest/storage_blob.py @@ -0,0 +1,51 @@ +import os +from azure.storage.blob import BlobClient +from azure.core import exceptions + + +class StorageBlob: + def __init__(self): + connectionString = os.environ["STORAGE_CONNECTION_STRING"] + self.blob = BlobClient.from_connection_string( + connectionString, container="mycontainer", blob="pyTestBlob.txt" + ) + + def UploadBLob(self): + print("uploading blob...") + self.data = "This is a sample data for Python Test" + self.blob.upload_blob(self.data) + print("\tdone") + + def DownloadBlob(self): + print("downloading blob...") + with open("./downloadedBlob.txt", "wb+") as my_blob: + my_blob.writelines(self.blob.download_blob()) + + print("\tdone") + + def DeleteBlob(self): + print("Cleaning up the resource...") + self.blob.delete_blob() + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Storage - Blob") + print("------------------------") + print("1) Upload a Blob") + print("2) Download a Blob") + print("3) Delete that Blob (Clean up the resource)") + print() + + # Ensure that the blob does not exists before the tests + try: + self.DeleteBlob() + except exceptions.AzureError: + pass + + try: + self.UploadBLob() + self.DownloadBlob() + finally: + self.DeleteBlob() From 1204ad260a086aef06c62402cfb28a99a7a461f6 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 13/37] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../azure-core/azure/core/async_paging.py | 153 +- sdk/core/azure-core/azure/core/paging.py | 153 +- .../azure_core_asynctests/test_paging.py | 122 ++ sdk/core/azure-core/tests/test_paging.py | 99 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../keys/_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../keys/_shared/async_client_base.py | 7 +- .../tests/keys_vault_client_async.py | 1 - .../_shared/_generated/key_vault_client.py | 8 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../secrets/_shared/async_client_base.py | 7 +- .../tests/secrets_vault_client_async.py | 1 - .../azure/storage/blob/blob_service_client.py | 15 +- .../azure/storage/blob/container_client.py | 28 +- .../azure/storage/blob/models.py | 171 +- .../tests/test_container.py | 22 +- .../azure/storage/file/directory_client.py | 29 +- .../azure/storage/file/file_client.py | 14 +- .../azure/storage/file/file_service_client.py | 18 +- .../azure/storage/file/models.py | 124 +- .../azure-storage-file/tests/test_handle.py | 13 +- .../azure-storage-file/tests/test_share.py | 37 +- .../azure/storage/queue/models.py | 83 +- .../azure/storage/queue/queue_client.py | 8 +- .../storage/queue/queue_service_client.py | 19 +- .../test_queue.test_delete_message.yaml | 1563 ++--------------- ..._queue.test_get_messages_with_options.yaml | 1209 ++----------- .../azure-storage-queue/tests/test_queue.py | 28 +- 73 files changed, 4595 insertions(+), 6613 deletions(-) create mode 100644 sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py diff --git a/sdk/core/azure-core/azure/core/async_paging.py b/sdk/core/azure-core/azure/core/async_paging.py index 4a4af4d28cc5..8a61c5b00ddc 100644 --- a/sdk/core/azure-core/azure/core/async_paging.py +++ b/sdk/core/azure-core/azure/core/async_paging.py @@ -23,44 +23,127 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -from collections.abc import AsyncIterator +import collections.abc import logging +from typing import ( + Iterable, + AsyncIterator, + TypeVar, + Callable, + Tuple, + Optional, + Awaitable, +) + _LOGGER = logging.getLogger(__name__) -class AsyncPagedMixin(AsyncIterator): - """Bring async to Paging. - - **Keyword argument:** - - *async_command* - Mandatory keyword argument for this mixin to work. - """ - def __init__(self, *args, **kwargs): # pylint: disable=unused-argument - self._async_get_next = kwargs.get("async_command") - if not self._async_get_next: - _LOGGER.debug("Paging async iterator protocol is not available for %s", - self.__class__.__name__) - - async def _async_advance_page(self): - if not self._async_get_next: - raise NotImplementedError( - "The class {} does not support async paging.".format(self.__class__.__name__) - ) - if self.next_link is None: - raise StopAsyncIteration("End of paging") - self._current_page_iter_index = 0 - self._response = await self._async_get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class AsyncList(AsyncIterator[ReturnType]): + def __init__(self, iterable: Iterable[ReturnType]) -> None: + """Change an iterable into a fake async iterator. + + Coul be useful to fill the async iterator contract when you get a list. + + :param iterable: A sync iterable of T + """ + # Technically, if it's a real iterator, I don't need "iter" + # but that will cover iterable and list as well with no troubles created. + self._iterator = iter(iterable) + + async def __anext__(self) -> ReturnType: + try: + return next(self._iterator) + except StopIteration as err: + raise StopAsyncIteration() from err + + +class AsyncPageIterator(AsyncIterator[AsyncIterator[ReturnType]]): + def __init__( + self, + get_next: Callable[[Optional[str]], Awaitable[ResponseType]], + extract_data: Callable[ + [ResponseType], Awaitable[Tuple[str, AsyncIterator[ReturnType]]] + ], + continuation_token: Optional[str] = None, + ) -> None: + """Return an async iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None + self._current_page = None async def __anext__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - await self._async_advance_page() - return await self.__anext__() + if self.continuation_token is None and self._did_a_call_already: + raise StopAsyncIteration("End of paging") + + self._response = await self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = await self._extract_data( + self._response + ) + + # If current_page was a sync list, wrap it async-like + if isinstance(self._current_page, collections.abc.Iterable): + self._current_page = AsyncList(self._current_page) + + return self._current_page + + +class AsyncItemPaged(AsyncIterator[ReturnType]): + def __init__(self, *args, **kwargs) -> None: + """Return an async iterator of items. + + args and kwargs will be passed to the AsyncPageIterator constructor directly, + except page_iterator_class + """ + self._args = args + self._kwargs = kwargs + self._page_iterator = ( + None + ) # type: Optional[AsyncIterator[AsyncIterator[ReturnType]]] + self._page = None # type: Optional[AsyncIterator[ReturnType]] + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", AsyncPageIterator + ) + + def by_page( + self, continuation_token: Optional[str] = None + ) -> AsyncIterator[AsyncIterator[ReturnType]]: + """Get an async iterator of pages of objects, instead of an async iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An async iterator of pages (themselves async iterator of objects) + """ + return self._page_iterator_class( + *self._args, **self._kwargs, continuation_token=continuation_token + ) + + async def __anext__(self) -> ReturnType: + if self._page_iterator is None: + self._page_iterator = self.by_page() + return await self.__anext__() + if self._page is None: + # Let it raise StopAsyncIteration + self._page = await self._page_iterator.__anext__() + return await self.__anext__() + try: + return await self._page.__anext__() + except StopAsyncIteration: + self._page = None + return await self.__anext__() diff --git a/sdk/core/azure-core/azure/core/paging.py b/sdk/core/azure-core/azure/core/paging.py index 9a04250dc932..9f4089d02099 100644 --- a/sdk/core/azure-core/azure/core/paging.py +++ b/sdk/core/azure-core/azure/core/paging.py @@ -23,86 +23,99 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -import sys -try: - from collections.abc import Iterator - xrange = range -except ImportError: - from collections import Iterator - -from typing import Dict, Any, List, Callable, Optional, TYPE_CHECKING # pylint: disable=unused-import - -if TYPE_CHECKING: - from .pipeline.transport.base import HttpResponse - from msrest.serialization import Deserializer, Model # type: ignore # pylint: disable=unused-import - -if sys.version_info >= (3, 5, 2): - # Not executed on old Python, no syntax error - from .async_paging import AsyncPagedMixin # type: ignore -else: - class AsyncPagedMixin(object): # type: ignore - pass - -class Paged(AsyncPagedMixin, Iterator): - """A container for paged REST responses. - - :param response: server response object. - :type response: ~azure.core.pipeline.transport.HttpResponse - :param callable command: Function to retrieve the next page of items. - :param Deserializer deserializer: a Deserializer instance to use - """ - _validation = {} # type: Dict[str, Dict[str, Any]] - _attribute_map = {} # type: Dict[str, Dict[str, Any]] - - def __init__(self, command, deserializer, **kwargs): - # type: (Callable[[str], HttpResponse], Deserializer, Any) -> None - super(Paged, self).__init__(**kwargs) # type: ignore - # Sets next_link, current_page, and _current_page_iter_index. - self.next_link = "" - self.current_page = [] # type: List[Model] - self._current_page_iter_index = 0 - self._deserializer = deserializer - self._get_next = command - self._response = None # type: Optional[HttpResponse] +import itertools +from typing import ( + Callable, + Optional, + TypeVar, + Iterator, + Iterable, + Tuple, +) # pylint: disable=unused-import +import logging + + +_LOGGER = logging.getLogger(__name__) + +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class PageIterator(Iterator[Iterator[ReturnType]]): + def __init__( + self, + get_next, # type: Callable[[Optional[str]], ResponseType] + extract_data, # type: Callable[[ResponseType], Tuple[str, Iterable[ReturnType]]] + continuation_token=None, # type: Optional[str] + ): + """Return an iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None # type: Optional[ResponseType] + self._current_page = None # type: Optional[Iterable[ReturnType]] def __iter__(self): """Return 'self'.""" - # Since iteration mutates this object, consider it an iterator in-and-of - # itself. return self - @classmethod - def _get_subtype_map(cls): - """Required for parity to Model object for deserialization.""" - return {} + def __next__(self): + # type: () -> Iterator[ReturnType] + if self.continuation_token is None and self._did_a_call_already: + raise StopIteration("End of paging") + + self._response = self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = self._extract_data(self._response) - def _advance_page(self): - # type: () -> List[Model] - """Force moving the cursor to the next azure call. + return iter(self._current_page) - This method is for advanced usage, iterator protocol is prefered. + next = __next__ # Python 2 compatibility. + + +class ItemPaged(Iterator[ReturnType]): + def __init__(self, *args, **kwargs): + """Return an iterator of items. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list + args and kwargs will be passed to the PageIterator constructor directly, + except page_iterator_class """ - if self.next_link is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self._response = self._get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page + self._args = args + self._kwargs = kwargs + self._page_iterator = None + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", PageIterator + ) + + def by_page(self, continuation_token=None): + # type: (Optional[str]) -> Iterator[Iterator[ReturnType]] + """Get an iterator of pages of objects, instead of an iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An iterator of pages (themselves iterator of objects) + """ + return self._page_iterator_class( + continuation_token=continuation_token, *self._args, **self._kwargs + ) + + def __iter__(self): + """Return 'self'.""" + return self def __next__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - self._advance_page() - return self.__next__() + if self._page_iterator is None: + self._page_iterator = itertools.chain.from_iterable(self.by_page()) + return next(self._page_iterator) next = __next__ # Python 2 compatibility. diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py new file mode 100644 index 000000000000..88d8cbe147d1 --- /dev/null +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py @@ -0,0 +1,122 @@ +#-------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +#-------------------------------------------------------------------------- + +from typing import AsyncIterator, TypeVar, List + +from azure.core.async_paging import AsyncItemPaged, AsyncList + +import pytest + + +T = TypeVar("T") + + +async def _as_list(async_iter: AsyncIterator[T]) -> List[T]: + """Flatten an async iterator into a list. + + For testing purpose. + """ + # 3.6 only : result_iterated = [obj async for obj in deserialized] + result = [] + async for el in async_iter: + result.append(el) + return result + + +class TestPaging: + + @pytest.mark.asyncio + async def test_basic_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated + + @pytest.mark.asyncio + async def test_advance_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data).by_page() + + page1 = await pager.__anext__() + assert ['value1.0', 'value1.1'] == await _as_list(page1) + + page2 = await pager.__anext__() + assert ['value2.0', 'value2.1'] == await _as_list(page2) + + with pytest.raises(StopAsyncIteration): + await pager.__anext__() + + + @pytest.mark.asyncio + async def test_none_value(self): + async def get_next(continuation_token=None): + return { + 'nextLink': None, + 'value': None + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value'] or []) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert len(result_iterated) == 0 diff --git a/sdk/core/azure-core/tests/test_paging.py b/sdk/core/azure-core/tests/test_paging.py index 41e00b0b86af..945f133cf7a9 100644 --- a/sdk/core/azure-core/tests/test_paging.py +++ b/sdk/core/azure-core/tests/test_paging.py @@ -1,6 +1,6 @@ #-------------------------------------------------------------------------- # -# Copyright (c) Microsoft Corporation. All rights reserved. +# Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # @@ -24,29 +24,43 @@ # #-------------------------------------------------------------------------- -import unittest +from azure.core.paging import ItemPaged -from azure.core.paging import Paged +import pytest -from msrest.serialization import Deserializer -class FakePaged(Paged): - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } +class TestPaging(object): - def __init__(self, *args, **kwargs): - super(FakePaged, self).__init__(*args, **kwargs) + def test_basic_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } -_test_deserializer = Deserializer({}) + def extract_data(response): + return response['nextLink'], iter(response['value']) -class TestPaging(unittest.TestCase): + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) - def test_basic_paging(self): + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated - def internal_paging(next_link=None, raw=False): - if not next_link: + def test_by_page_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -57,17 +71,25 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertListEqual( - ['value1.0', 'value1.1', 'value2.0', 'value2.1'], - result_iterated - ) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data).by_page() + page1 = next(pager) + assert list(page1) == ['value1.0', 'value1.1'] + + page2 = next(pager) + assert list(page2) == ['value2.0', 'value2.1'] + + with pytest.raises(StopIteration): + next(pager) def test_advance_paging(self): - def internal_paging(next_link=None, raw=False): - if not next_link: + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -78,27 +100,32 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - page1 = next(deserialized) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data) + page1 = next(pager) assert page1 == 'value1.0' - page1 = next(deserialized) + page1 = next(pager) assert page1 == 'value1.1' - - page2 = next(deserialized) + + page2 = next(pager) assert page2 == 'value2.0' - page2 = next(deserialized) + page2 = next(pager) assert page2 == 'value2.1' - with self.assertRaises(StopIteration): - next(deserialized) + with pytest.raises(StopIteration): + next(pager) def test_none_value(self): - def internal_paging(next_link=None, raw=False): + def get_next(continuation_token=None): return { 'nextLink': None, 'value': None } + def extract_data(response): + return response['nextLink'], iter(response['value'] or []) - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertEqual(len(result_iterated), 0) + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) + assert len(result_iterated) == 0 diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} 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 28ea64adc6a6..857e446e899c 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 @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', 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 f9caaf92c16e..e918a167f2dd 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 @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. 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 4920c195ef89..07d530b486f6 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 @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) 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 40ad1ab95087..50a82e217aa9 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 @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} 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 a97144221c6a..d11b4bd0e615 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 @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', 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 e02ddd417cdb..24dfe4beb6a9 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 @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. 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 1f394c8f5f38..52f4aa981815 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 @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) 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 c0e15566f02e..d52fb73651e7 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 @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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, 'SasDefinitionUpdateParameters') 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 56148a5820ef..0714edabf420 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 @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +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.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """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: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py index b95fd1aa7ad4..a09d581eb39a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py index afec64f70804..6221dd5e7bec 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py @@ -50,14 +50,14 @@ def get_configuration_class(api_version, aio=False): """ if api_version == V7_0_VERSION: if aio: - from .v7_0.aio import KeyVaultClientConfiguration as ImplConfig + from .v7_0.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v7_0 import KeyVaultClientConfiguration as ImplConfig + from .v7_0._configuration import KeyVaultClientConfiguration as ImplConfig elif api_version == V2016_10_01_VERSION: if aio: - from .v2016_10_01.aio import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v2016_10_01 import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01._configuration import KeyVaultClientConfiguration as ImplConfig else: raise NotImplementedError("API version {} is not available".format(api_version)) return ImplConfig diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} 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 28ea64adc6a6..857e446e899c 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 @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', 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 f9caaf92c16e..e918a167f2dd 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 @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. 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 4920c195ef89..07d530b486f6 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 @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) 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 40ad1ab95087..50a82e217aa9 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 @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} 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 a97144221c6a..d11b4bd0e615 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 @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', 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 e02ddd417cdb..24dfe4beb6a9 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 @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. 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 1f394c8f5f38..52f4aa981815 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 @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) 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 c0e15566f02e..d52fb73651e7 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 @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) 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 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): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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, 'SasDefinitionUpdateParameters') 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 c40e314accc7..dd2c6f0a9b95 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 @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +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.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """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: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py index 73578320e809..a374f9a3782c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py index c2b7cce9f255..6484882d65bb 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -380,12 +382,11 @@ def set_service_properties( def list_containers( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> ContainerPropertiesPaged + # type: (...) -> ItemPaged[ContainerProperties] """Returns a generator to list the containers under the specified account. The generator will lazily follow the continuation tokens returned by @@ -397,17 +398,13 @@ def list_containers( :param bool include_metadata: Specifies that container metadata be returned in the response. The default value is `False`. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of container names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ContainerProperties. - :rtype: ~azure.core.blob.models.ContainerPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.blob.models.ContainerProperties] Example: .. literalinclude:: ../tests/test_blob_samples_service.py @@ -424,8 +421,8 @@ def list_containers( include=include, timeout=timeout, **kwargs) - return ContainerPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, page_iterator_class=ContainerPropertiesPaged) def create_container( self, name, # type: str diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py index 28da09873c1e..2f43f56806e3 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py @@ -16,6 +16,8 @@ from urlparse import urlparse # type: ignore from urllib2 import quote, unquote # type: ignore +from azure.core.paging import ItemPaged + import six from ._shared.shared_access_signature import BlobSharedAccessSignature @@ -658,8 +660,8 @@ def set_container_access_policy( except StorageErrorException as error: process_storage_error(error) - def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[Any], Optional[str], Optional[int], **Any) -> Iterable[BlobProperties] + def list_blobs(self, name_starts_with=None, include=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[Any], Optional[int], **Any) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. @@ -670,14 +672,10 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N :param list[str] include: Specifies one or more additional datasets to include in the response. Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted'. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] Example: .. literalinclude:: ../tests/test_blob_samples_containers.py @@ -696,17 +694,19 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N include=include, timeout=timeout, **kwargs) - return BlobPropertiesPaged(command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=BlobPropertiesPaged) + def walk_blobs( self, name_starts_with=None, # type: Optional[str] include=None, # type: Optional[Any] delimiter="/", # type: str - marker=None, # type: Optional[str] timeout=None, # type: Optional[int] **kwargs # type: Optional[Any] ): - # type: (...) -> Iterable[BlobProperties] + # type: (...) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. This operation will list blobs in accordance with a hierarchy, @@ -723,20 +723,15 @@ def walk_blobs( element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPrefix + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] """ if include and not isinstance(include, list): include = [include] results_per_page = kwargs.pop('results_per_page', None) - marker = kwargs.pop('marker', "") command = functools.partial( self._client.container.list_blob_hierarchy_segment, delimiter=delimiter, @@ -747,7 +742,6 @@ def walk_blobs( command, prefix=name_starts_with, results_per_page=results_per_page, - marker=marker, delimiter=delimiter) def upload_blob( diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py index ab75e1d7722d..c5c90d21f15e 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py @@ -9,7 +9,7 @@ from enum import Enum from typing import List, Any, TYPE_CHECKING # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator, ItemPaged from ._shared.utils import ( decode_base64, @@ -287,14 +287,14 @@ def _from_generated(cls, generated): return props -class ContainerPropertiesPaged(Paged): +class ContainerPropertiesPaged(PageIterator): """An Iterable of Container properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A container name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -305,53 +305,45 @@ class ContainerPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of container names to retrieve per call. - :param str marker: An opaque continuation token. - """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(ContainerPropertiesPaged, self).__init__(command, None) + :param str continuation_token: An opaque continuation token. + """ + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(ContainerPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.container_items - self.next_marker = self._response.next_marker or None - return self.current_page + self.current_page = [self._build_item(item) for item in self._response.container_items] - def __next__(self): # type: ignore - item = super(ContainerPropertiesPaged, self).__next__() - if isinstance(item, ContainerProperties): - return item - return ContainerProperties._from_generated(item) # pylint: disable=protected-access + return self._response.next_marker or None, self.current_page - next = __next__ + @staticmethod + def _build_item(item): + return ContainerProperties._from_generated(item) # pylint: disable=protected-access class BlobProperties(DictMixin): @@ -469,14 +461,14 @@ def _from_generated(cls, generated): return blob -class BlobPropertiesPaged(Paged): +class BlobPropertiesPaged(PageIterator): """An Iterable of Blob properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -489,7 +481,7 @@ class BlobPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of blobs to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. :param str delimiter: Used to capture blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single @@ -503,55 +495,48 @@ def __init__( container=None, prefix=None, results_per_page=None, - marker=None, + continuation_token=None, delimiter=None, location_mode=None): - super(BlobPropertiesPaged, self).__init__(command, None) + super(BlobPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.container = container self.delimiter = delimiter self.current_page = None self.location_mode = location_mode - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( + return self._command( prefix=self.prefix, - marker=self.next_marker or None, + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_items - self.next_marker = self._response.next_marker or None self.container = self._response.container_name + self.current_page = [self._build_item(item) for item in self._response.segment.blob_items] self.delimiter = self._response.delimiter - return self.current_page - def __next__(self): - item = super(BlobPropertiesPaged, self).__next__() + return self._response.next_marker or None, self.current_page + + def _build_item(self, item): if isinstance(item, BlobProperties): return item if isinstance(item, BlobItem): @@ -560,10 +545,8 @@ def __next__(self): return blob return item - next = __next__ - -class BlobPrefix(BlobPropertiesPaged, DictMixin): +class BlobPrefix(ItemPaged, DictMixin): """An Iterable of Blob properties. Returned from walk_blobs when a delimiter is used. @@ -572,7 +555,7 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): :ivar str name: The prefix, or "directory name" of the blob. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -597,51 +580,37 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): Options include 'primary' or 'secondary'. """ def __init__(self, *args, **kwargs): - super(BlobPrefix, self).__init__(*args, **kwargs) + super(BlobPrefix, self).__init__(*args, page_iterator_class=BlobPrefixPaged, **kwargs) + self.name = kwargs.get('prefix') + self.prefix = kwargs.get('prefix') + self.results_per_page = kwargs.get('results_per_page') + self.container = kwargs.get('container') + self.delimiter = kwargs.get('delimiter') + self.location_mode = kwargs.get('location_mode') + +class BlobPrefixPaged(BlobPropertiesPaged): + def __init__(self, *args, **kwargs): + super(BlobPrefixPaged, self).__init__(*args, **kwargs) self.name = self.prefix - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self.location_mode, self._response = self._get_next( - prefix=self.prefix, - marker=self.next_marker or None, - maxresults=self.results_per_page, - cls=return_context_and_deserialized, - use_location=self.location_mode) - self.service_endpoint = self._response.service_endpoint - self.prefix = self._response.prefix - self.current_marker = self._response.marker - self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_prefixes - self.current_page.extend(self._response.segment.blob_items) - self.next_marker = self._response.next_marker or None - self.container = self._response.container_name - self.delimiter = self._response.delimiter + def _extract_data_cb(self, get_next_return): + continuation_token, _ = super(BlobPrefixPaged, self)._extract_data_cb(get_next_return) + self.current_page = self._response.segment.blob_prefixes + self._response.segment.blob_items + self.current_page = [self._build_item(item) for item in self.current_page] - def __next__(self): - item = super(BlobPrefix, self).__next__() + return continuation_token, self.current_page + + def _build_item(self, item): + item = super(BlobPrefixPaged, self)._build_item(item) if isinstance(item, GenBlobPrefix): return BlobPrefix( - self._get_next, + self._command, container=self.container, prefix=item.name, results_per_page=self.results_per_page, location_mode=self.location_mode) return item - next = __next__ - - class LeaseProperties(DictMixin): """Blob Lease Properties. diff --git a/sdk/storage/azure-storage-blob/tests/test_container.py b/sdk/storage/azure-storage-blob/tests/test_container.py index 889e270dd662..a22b8e50f62a 100644 --- a/sdk/storage/azure-storage-blob/tests/test_container.py +++ b/sdk/storage/azure-storage-blob/tests/test_container.py @@ -120,7 +120,7 @@ def test_create_container_with_public_access_blob(self): blob = container.get_blob_client("blob1") blob.upload_blob(u'xyz') - + anonymous_service = BlobClient( self._get_account_url(), container=container_name, @@ -247,15 +247,12 @@ def test_list_containers_with_num_results_and_marker(self): container_names.sort() # Act - generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2) - next(generator1) + generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2).by_page() + containers1 = list(next(generator1)) generator2 = self.bsc.list_containers( - name_starts_with=prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) - - containers1 = list(generator1.current_page) - containers2 = list(generator2.current_page) + name_starts_with=prefix, results_per_page=2).by_page(generator1.continuation_token) + containers2 = list(next(generator2)) # Assert self.assertIsNotNone(containers1) @@ -817,14 +814,13 @@ def test_list_blobs_with_num_results(self): # Act - blobs = container.list_blobs(results_per_page=2) - next(blobs) + blobs = list(next(container.list_blobs(results_per_page=2).by_page())) # Assert self.assertIsNotNone(blobs) - self.assertEqual(len(blobs.current_page), 2) - self.assertNamedItemInContainer(blobs.current_page, 'blob_a1') - self.assertNamedItemInContainer(blobs.current_page, 'blob_a2') + self.assertEqual(len(blobs), 2) + self.assertNamedItemInContainer(blobs, 'blob_a1') + self.assertNamedItemInContainer(blobs, 'blob_a2') @record def test_list_blobs_with_include_snapshots(self): diff --git a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py index 7e0bb4f4885c..50a1dacb7298 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py @@ -16,6 +16,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .file_client import FileClient @@ -269,21 +270,17 @@ def delete_directory(self, timeout=None, **kwargs): except StorageErrorException as error: process_storage_error(error) - def list_directories_and_files(self, name_starts_with=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[str], Optional[int], **Any) -> DirectoryProperties + def list_directories_and_files(self, name_starts_with=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[str], Optional[int], **Any) -> ItemPaged """Lists all the directories and files under the directory. :param str name_starts_with: Filters the results to return only entities whose names begin with the specified prefix. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of dict-like DirectoryProperties and FileProperties - :rtype: ~azure.storage.file.models.DirectoryPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.DirectoryProperties] Example: .. literalinclude:: ../tests/test_file_samples_directory.py @@ -299,23 +296,20 @@ def list_directories_and_files(self, name_starts_with=None, marker=None, timeout sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return DirectoryPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=DirectoryPropertiesPaged) - def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): + def list_handles(self, recursive=False, timeout=None, **kwargs): """Lists opened handles on a directory or a file under the directory. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param bool recursive: Boolean that specifies if operation should apply to the directory specified by the client, its files, its subdirectories and their files. Default value is False. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.storage.file.models.HandlesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handles] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -324,8 +318,9 @@ def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): timeout=timeout, recursive=recursive, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py index ec492fe25197..a67cc9736fad 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py @@ -18,6 +18,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .models import HandlesPaged from ._generated import AzureFileStorage @@ -781,16 +782,14 @@ def resize_file(self, size, timeout=None, **kwargs): # type: ignore except StorageErrorException as error: process_storage_error(error) - def list_handles(self, marker=None, timeout=None, **kwargs): + def list_handles(self, timeout=None, **kwargs): + # type: (int, Any) -> ItemPaged[Handle] """Lists handles for file. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handle] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -798,8 +797,9 @@ def list_handles(self, marker=None, timeout=None, **kwargs): sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py index ffde63e24f69..160a73a7af6a 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py @@ -6,7 +6,7 @@ import functools from typing import ( # pylint: disable=unused-import - Union, Optional, Any, Iterable, Dict, List, + Union, Optional, Any, Dict, List, TYPE_CHECKING ) try: @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from .share_client import ShareClient from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import Services @@ -270,11 +272,10 @@ def list_shares( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] include_snapshots=False, # type: Optional[bool] - marker=None, timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> SharePropertiesPaged + # type: (...) -> ItemPaged[ShareProperties] """Returns auto-paging iterable of dict-like ShareProperties under the specified account. The generator will lazily follow the continuation tokens returned by the service and stop when all shares have been returned. @@ -286,14 +287,10 @@ def list_shares( Specifies that share metadata be returned in the response. :param bool include_snapshots: Specifies that share snapshot be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ShareProperties. - :rtype: ~azure.storage.file.models.SharePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.ShareProperties] Example: .. literalinclude:: ../tests/test_file_samples_service.py @@ -314,8 +311,9 @@ def list_shares( include=include, timeout=timeout, **kwargs) - return SharePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=SharePropertiesPaged) def create_share( self, share_name, # type: str diff --git a/sdk/storage/azure-storage-file/azure/storage/file/models.py b/sdk/storage/azure-storage-file/azure/storage/file/models.py index d77baed48d7d..8a393cc37417 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/models.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/models.py @@ -6,7 +6,7 @@ # pylint: disable=too-few-public-methods, too-many-instance-attributes # pylint: disable=super-init-not-called, too-many-lines -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -243,12 +243,12 @@ def _from_generated(cls, generated): return props -class SharePropertiesPaged(Paged): +class SharePropertiesPaged(PageIterator): """An iterable of Share properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -261,43 +261,40 @@ class SharePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(SharePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(SharePropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [ShareProperties._from_generated(i) for i in self._response.share_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class Handle(DictMixin): @@ -352,10 +349,10 @@ def _from_generated(cls, generated): return handle -class HandlesPaged(Paged): +class HandlesPaged(PageIterator): """An iterable of Handles. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -366,36 +363,34 @@ class HandlesPaged(Paged): :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, results_per_page=None, marker=None, **kwargs): - super(HandlesPaged, self).__init__(command, None) - self.current_marker = None + def __init__(self, command, results_per_page=None, continuation_token=None): + super(HandlesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.current_page = [Handle._from_generated(h) for h in self._response.handle_list] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class DirectoryProperties(DictMixin): @@ -432,7 +427,7 @@ def _from_generated(cls, generated): return props -class DirectoryPropertiesPaged(Paged): +class DirectoryPropertiesPaged(PageIterator): """An iterable for the contents of a directory. This iterable will yield dicts for the contents of the directory. The dicts @@ -441,7 +436,7 @@ class DirectoryPropertiesPaged(Paged): :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -454,30 +449,26 @@ class DirectoryPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(DirectoryPropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(DirectoryPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, prefix=self.prefix, maxresults=self.results_per_page, cls=return_context_and_deserialized, @@ -485,14 +476,15 @@ def _advance_page(self): except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [_wrap_item(i) for i in self._response.segment.directory_items] self.current_page.extend([_wrap_item(i) for i in self._response.segment.file_items]) - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class FileProperties(DictMixin): diff --git a/sdk/storage/azure-storage-file/tests/test_handle.py b/sdk/storage/azure-storage-file/tests/test_handle.py index 7fe3d3a5e3d4..220e71d679c2 100644 --- a/sdk/storage/azure-storage-file/tests/test_handle.py +++ b/sdk/storage/azure-storage-file/tests/test_handle.py @@ -114,20 +114,21 @@ def test_list_handles_with_marker(self): root = share.get_directory_client() # Act - handle_generator = root.list_handles(recursive=True, results_per_page=1) - next(handle_generator) + handle_generator = root.list_handles(recursive=True, results_per_page=1).by_page() + handles = list(next(handle_generator)) # Assert - self.assertIsNotNone(handle_generator.next_marker) - handles = handle_generator.current_page + self.assertIsNotNone(handle_generator.continuation_token) self._validate_handles(handles) # Note down a handle that we saw old_handle = handles[0] # Continue listing - remaining_handles = list( - root.list_handles(recursive=True, marker=handle_generator.next_marker)) + remaining_handles = list(next( + root.list_handles(recursive=True).by_page( + continuation_token=handle_generator.continuation_token) + )) self._validate_handles(handles) # Make sure the old handle did not appear diff --git a/sdk/storage/azure-storage-file/tests/test_share.py b/sdk/storage/azure-storage-file/tests/test_share.py index 4eabf312d3f4..cc134be6c710 100644 --- a/sdk/storage/azure-storage-file/tests/test_share.py +++ b/sdk/storage/azure-storage-file/tests/test_share.py @@ -341,14 +341,12 @@ def test_list_shares_with_num_results_and_marker(self): share_names.sort() # Act - generator1 = self.fsc.list_shares(prefix, results_per_page=2) - next(generator1) - generator2 = self.fsc.list_shares( - prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = self.fsc.list_shares(prefix, results_per_page=2).by_page() + shares1 = list(next(generator1)) - shares1 = generator1.current_page - shares2 = generator2.current_page + generator2 = self.fsc.list_shares( + prefix, results_per_page=2).by_page(continuation_token=generator1.continuation_token) + shares2 = list(next(generator2)) # Assert self.assertIsNotNone(shares1) @@ -606,14 +604,14 @@ def test_list_directories_and_files_with_num_results(self): root.upload_file('fileb1', '1024') # Act - result = share_name.list_directories_and_files(results_per_page=2) - next(result) + result = share_name.list_directories_and_files(results_per_page=2).by_page() + result = list(next(result)) # Assert self.assertIsNotNone(result) - self.assertEqual(len(result.current_page), 2) - self.assertNamedItemInContainer(result.current_page, 'dir1') - self.assertNamedItemInContainer(result.current_page, 'filea1') + self.assertEqual(len(result), 2) + self.assertNamedItemInContainer(result, 'dir1') + self.assertNamedItemInContainer(result, 'filea1') @record def test_list_directories_and_files_with_num_results_and_marker(self): @@ -627,14 +625,13 @@ def test_list_directories_and_files_with_num_results_and_marker(self): dir1.upload_file('fileb1', '1024') # Act - generator1 = share_name.list_directories_and_files('dir1', results_per_page=2) - next(generator1) - generator2 = share_name.list_directories_and_files( - 'dir1', marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page() + result1 = list(next(generator1)) - result1 = generator1.current_page - result2 = generator2.current_page + generator2 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page(continuation_token=generator1.continuation_token) + result2 = list(next(generator2)) # Assert self.assertEqual(len(result1), 2) @@ -643,7 +640,7 @@ def test_list_directories_and_files_with_num_results_and_marker(self): self.assertNamedItemInContainer(result1, 'filea2') self.assertNamedItemInContainer(result2, 'filea3') self.assertNamedItemInContainer(result2, 'fileb1') - self.assertEqual(generator2.next_marker, None) + self.assertEqual(generator2.continuation_token, None) @record def test_list_directories_and_files_with_prefix(self): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py index 224508d959fc..eb8250e918f6 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py @@ -7,7 +7,7 @@ # pylint: disable=super-init-not-called from typing import List # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -220,7 +220,7 @@ def _from_generated(cls, generated): return message -class MessagesPaged(Paged): +class MessagesPaged(PageIterator): """An iterable of Queue Messages. :ivar int results_per_page: The maximum number of results retrieved per API call. @@ -231,28 +231,28 @@ class MessagesPaged(Paged): :param int results_per_page: The maximum number of messages to retrieve per call. """ - def __init__(self, command, results_per_page=None): - super(MessagesPaged, self).__init__(command, None) + def __init__(self, command, results_per_page=None, continuation_token=None): + if continuation_token is not None: + raise ValueError("This operation does not support continuation token") + + super(MessagesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + ) + self._command = command self.results_per_page = results_per_page - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - messages = self._get_next(number_of_messages=self.results_per_page) - if not messages: - raise StopIteration() + return self._command(number_of_messages=self.results_per_page) except StorageErrorException as error: process_storage_error(error) - self.current_page = [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access - return self.current_page + + def _extract_data_cb(self, messages): + # There is no concept of continuation token, so raising on my own condition + if not messages: + raise StopIteration("End of paging") + return "TOKEN_IGNORED", [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access class QueueProperties(DictMixin): @@ -280,12 +280,12 @@ def _from_generated(cls, generated): return props -class QueuePropertiesPaged(Paged): +class QueuePropertiesPaged(PageIterator): """An iterable of Queue properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A queue name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -298,44 +298,39 @@ class QueuePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of queue names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(QueuePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(QueuePropertiesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + + return self._response.next_marker or None, [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access class QueuePermissions(object): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py index a8d58b638f73..ff780029de0c 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py @@ -16,6 +16,8 @@ import six +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import QueueSharedAccessSignature from ._shared.utils import ( StorageAccountHostsMixin, @@ -512,7 +514,7 @@ def enqueue_message( # type: ignore process_storage_error(error) def receive_messages(self, messages_per_page=None, visibility_timeout=None, timeout=None, **kwargs): # type: ignore - # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> QueueMessage + # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> ItemPaged[Message] """Removes one or more messages from the front of the queue. When a message is retrieved from the queue, the response includes the message @@ -540,7 +542,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time The server timeout, expressed in seconds. :return: Returns a message iterator of dict-like Message objects. - :rtype: ~azure.storage.queue.models.MessagesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.queue.models.Message] Example: .. literalinclude:: ../tests/test_queue_samples_message.py @@ -562,7 +564,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time cls=self._config.message_decode_policy, **kwargs ) - return MessagesPaged(command, results_per_page=messages_per_page) + return ItemPaged(command, results_per_page=messages_per_page, page_iterator_class=MessagesPaged) except StorageErrorException as error: process_storage_error(error) diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index 41be25c1d6bf..1e7fca250953 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -13,6 +13,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -302,12 +304,11 @@ def set_service_properties( # type: ignore def list_queues( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> QueuePropertiesPaged + # type: (...) -> ItemPaged[QueueProperties] """Returns a generator to list the queues under the specified account. The generator will lazily follow the continuation tokens returned by @@ -318,10 +319,6 @@ def list_queues( begin with the specified prefix. :param bool include_metadata: Specifies that queue metadata be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of queue names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. @@ -330,7 +327,7 @@ def list_queues( calls to the service in which case the timeout value specified will be applied to each individual call. :returns: An iterable (auto-paging) of QueueProperties. - :rtype: ~azure.core.queue.models.QueuePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.queue.models.QueueProperties] Example: .. literalinclude:: ../tests/test_queue_samples_service.py @@ -347,8 +344,10 @@ def list_queues( include=include, timeout=timeout, **kwargs) - return QueuePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=QueuePropertiesPaged + ) def create_queue( self, name, # type: str @@ -357,7 +356,7 @@ def create_queue( **kwargs ): # type: (...) -> QueueClient - """Creates a new queue under the specified account. + """Creates a new queue under the specified account. If a queue with the same name already exists, the operation fails. Returns a client with which to interact with the newly created queue. diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml index 51d38817ff39..7b9a2fe78803 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml @@ -2,1441 +2,246 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b7a7e3a-952a-11e9-bd27-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a8222-9003-00c8-3c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b9a01c6-952a-11e9-8b0c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAZ71f3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a822e-9003-00c8-4436-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ba2cc3e-952a-11e9-84a6-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAayNo3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8238-9003-00c8-4e36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bab46ca-952a-11e9-8a40-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFbc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAkNdw3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8241-9003-00c8-5536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bb3e9c6-952a-11e9-b2c0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAApmR53TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8249-9003-00c8-5c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bbc4aba-952a-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAhkZj7zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8253-9003-00c8-6536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bc4c398-952a-11e9-9d06-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages/442e2d59-b9ee-4fc1-b57f-1eede999ed26?popreceipt=AgAAAAMAAAAAAAAAhkZj7zYp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a825b-9003-00c8-6c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bcd588c-952a-11e9-895b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message2bc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message3635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8261-9003-00c8-7236-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcd5898c-952a-11e9-806a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f410d-2003-0070-7d37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcf60022-952a-11e9-954d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAASC69njcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f411d-2003-0070-0a37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcff4f9c-952a-11e9-83d3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAzn7Gnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f412a-2003-0070-1637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd08b014-952a-11e9-aee4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAA+DLPnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4137-2003-0070-1f37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd11436e-952a-11e9-8240-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAATzXYnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4149-2003-0070-2e37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd1a7bd2-952a-11e9-95d1-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAkLPCsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4151-2003-0070-3637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd23aae8-952a-11e9-b0bf-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/1208b99d-12bd-4073-a3c8-9b0ad6bfdf33?popreceipt=AgAAAAMAAAAAAAAAkLPCsDcp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f4164-2003-0070-4737-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd2c7de6-952a-11e9-9262-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message24ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message3ea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4172-2003-0070-5337-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 740b52d2-952b-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b7b05c9c-ad96-11e9-ab10-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43da9-6003-0099-3638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462afff-6003-00dd-0ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 742c9034-952b-11e9-95de-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b81371ae-ad96-11e9-923b-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAxCb0NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAASa7peaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db1-6003-0099-3a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b023-6003-00dd-25a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 7435d566-952b-11e9-a739-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b82af13e-ad96-11e9-89e9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAGyn9NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAA9DX/eaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db7-6003-0099-3f38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b041-6003-00dd-3fa3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 743eee58-952b-11e9-8745-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b84060c8-ad96-11e9-89c5-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFFd867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAcysGNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAow8TeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dba-6003-0099-4238-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b055-6003-00dd-51a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74482aa4-952b-11e9-9902-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b85423be-ad96-11e9-ad5e-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF1cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAA+XsPNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAfeUoeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dbe-6003-0099-4538-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b073-6003-00dd-67a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74515192-952b-11e9-be15-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b86961c6-ad96-11e9-9926-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAl5b6Rzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:57 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dbf-6003-0099-4638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 745b1524-952b-11e9-b3c4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAA7gajKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message1"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b090-6003-00dd-7ca3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b879b574-ad96-11e9-8ec6-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/193f415e-aabc-46e0-9209-48d6f7dad682?popreceipt=AgAAAAMAAAAAAAAAl5b6Rzgp1QE%3D + uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/8c67a6da-dc58-453c-a32c-2357250782d6?popreceipt=AgAAAAMAAAAAAAAAA7gajKNB1QE%3D response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43dc3-6003-0099-4a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462b0b7-6003-00dd-1ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 204, message: No Content} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74643122-952b-11e9-b8fb-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:28 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b88a0908-ad96-11e9-9586-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message2d867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message31cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dc5-6003-0099-4c38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - aee1db86-952d-11e9-9f94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506b4c-4003-00ca-6e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af02a3ac-952d-11e9-bdc7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAeuTKcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b5e-4003-00ca-7e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af0bd666-952d-11e9-a81d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAzubTcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b71-4003-00ca-103a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af14a5f4-952d-11e9-bfa3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFa047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAA3HPccDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b7f-4003-00ca-1d3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af1d518c-952d-11e9-bc94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAAijlcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b9c-4003-00ca-363a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af261bca-952d-11e9-8a6d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAVs3Pgjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506baa-4003-00ca-443a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af2f5190-952d-11e9-a222-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/914e12cd-da29-4d7f-828a-393828adfbbe?popreceipt=AgAAAAMAAAAAAAAAVs3Pgjop1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506bc9-4003-00ca-5e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af389908-952d-11e9-9591-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message2831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message3415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b0e0-6003-00dd-3da3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b89de61a-ad96-11e9-94f2-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message2a047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message3cb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506bd7-4003-00ca-6b3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b112-6003-00dd-66a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml index 4f79ec258033..cb18246850ef 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml @@ -2,1121 +2,200 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cb5f240-952a-11e9-8690-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 4ce61f8f-6003-0033-1436-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cdbdadc-952a-11e9-908b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAyXih3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f99-6003-0033-1b36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ce4762e-952a-11e9-9f63-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF8c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAwd6p3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9a-6003-0033-1c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cecec34-952a-11e9-a5e2-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAtESy3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9f-6003-0033-2136-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cf568ee-952a-11e9-bb36-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFd1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAmYO63jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61fab-6003-0033-2c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cfd9dfa-952a-11e9-896e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message18c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message2ee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message3d1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 4ce61fb4-6003-0033-3536-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de5c3670-952a-11e9-837b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [eb8b0f92-ad90-11e9-ad43-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueue6405110f response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:15 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - e1a897ac-1003-0073-2a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ab763224-9003-000f-719d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de7c09d2-952a-11e9-a68c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebe04322-ad90-11e9-90d1-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAG91CoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAiP6wrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897b4-1003-0073-2e37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab763242-9003-000f-099d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8504a6-952a-11e9-b42e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebf1ec6c-ad90-11e9-a1a9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF6382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAhwZMoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFfcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAtJHArZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897bc-1003-0073-3337-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76324f-9003-000f-159d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8e1458-952a-11e9-8ed7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec017d92-ad90-11e9-9118-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAxOFUoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFb6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAbA/RrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897c8-1003-0073-3a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76325c-9003-000f-209d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de96f262-952a-11e9-b5f5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec129446-ad90-11e9-9a37-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF5425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAA6ZVdoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAwPDgrZ1B1QE=Tue, + 23 Jul 2019 21:29:16 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897cf-1003-0073-3f37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76326e-9003-000f-309d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de9f9886-952a-11e9-bd95-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec21afd2-ad90-11e9-b00f-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message16382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message24aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message35425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - e1a897d5-1003-0073-4437-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message1fcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message2b6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message3ee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763281-9003-000f-3f9d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ccf3fa-952b-11e9-aff5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 7df02fa6-3003-00ec-1538-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ed5910-952b-11e9-be2b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAqu20Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02faf-3003-00ec-1b38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75f69162-952b-11e9-bff9-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFf4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAA58i9Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fb3-3003-00ec-1f38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ff663a-952b-11e9-adab-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF7001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAADX3GNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fba-3003-00ec-2638-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76087c36-952b-11e9-9eae-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF1ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAYX/PNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fbd-3003-00ec-2938-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76115afe-952b-11e9-8512-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec33efd0-ad90-11e9-a453-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message1f4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message27001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message31ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 7df02fc2-3003-00ec-2e38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b0efd498-952d-11e9-a770-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - abd1b919-4003-0006-193a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b11061ac-952d-11e9-b8b8-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAA2cfYcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b924-4003-0006-213a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1198976-952d-11e9-a7a0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF26981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAAnzhcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b929-4003-0006-263a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1222c70-952d-11e9-ab5a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFdebf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAQ1fqcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b932-4003-0006-2d3a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b12b1240-952d-11e9-afa4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAA+PXzcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b93b-4003-0006-343a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b134a7ec-952d-11e9-a776-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:29 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message126981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message2debf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message3103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - abd1b940-4003-0006-383a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763289-9003-000f-479d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/test_queue.py b/sdk/storage/azure-storage-queue/tests/test_queue.py index 8df7fc472476..1aa1e14536ba 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue.py @@ -158,16 +158,13 @@ def test_list_queues_with_options(self): # Action generator1 = self.qsc.list_queues( name_starts_with=prefix, - results_per_page=3) - next(generator1) - queues1 = generator1.current_page + results_per_page=3).by_page() + queues1 = list(next(generator1)) generator2 = self.qsc.list_queues( name_starts_with=prefix, - marker=generator1.next_marker, - include_metadata=True) - next(generator2) - queues2 = generator2.current_page + include_metadata=True).by_page(generator1.continuation_token) + queues2 = list(next(generator2)) # Asserts self.assertIsNotNone(queues1) @@ -175,6 +172,7 @@ def test_list_queues_with_options(self): self.assertIsNotNone(queues1[0]) self.assertIsNone(queues1[0].metadata) self.assertNotEqual('', queues1[0].name) + assert generator1.location_mode is not None # Asserts self.assertIsNotNone(queues2) self.assertTrue(len(self.test_queues) - 3 <= len(queues2)) @@ -317,14 +315,14 @@ def test_get_messages_with_options(self): queue_client.enqueue_message(u'message2') queue_client.enqueue_message(u'message3') queue_client.enqueue_message(u'message4') - result = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) - next(result) + pager = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) + result = list(pager) # Asserts self.assertIsNotNone(result) - self.assertEqual(4, len(result.current_page)) + self.assertEqual(4, len(result)) - for message in result.current_page: + for message in result: self.assertIsNotNone(message) self.assertNotEqual('', message.id) self.assertNotEqual('', message.content) @@ -406,12 +404,12 @@ def test_delete_message(self): message = next(queue_client.receive_messages()) queue_client.delete_message(message) - messages = queue_client.receive_messages(messages_per_page=32) - next(messages) + messages_pager = queue_client.receive_messages(messages_per_page=32) + messages = list(messages_pager) # Asserts - self.assertIsNotNone(messages) - self.assertEqual(3, len(messages.current_page)) + assert messages is not None + assert len(messages) == 3 @record def test_update_message(self): From 6f78938ee1c5820939dbb683ba45cdee27ef2d58 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 14/37] get rid of should only propagate (#6497) --- .../pipeline/policies/distributed_tracing.py | 8 +----- sdk/core/azure-core/azure/core/settings.py | 4 --- .../azure-core/azure/core/tracing/common.py | 7 ----- .../azure/core/tracing/decorator.py | 2 +- .../azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 20 -------------- sdk/core/azure-core/tests/test_settings.py | 6 ++--- .../tests/test_tracing_decorator.py | 27 ------------------- .../azure-core/tests/test_tracing_policy.py | 6 +++-- sdk/core/azure-core/tests/tracing_common.py | 6 +---- 10 files changed, 10 insertions(+), 78 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 229b7d4380b5..ee6c1a36109f 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 @@ -77,11 +77,6 @@ def on_request(self, request): if parent_span is None: return - only_propagate = settings.tracing_should_only_propagate() - if only_propagate: - self.set_header(request, parent_span) - return - path = urlparse(request.http_request.url).path if not path: path = "/" @@ -96,8 +91,7 @@ def end_span(self, request, response=None): # type: (HttpRequest, Optional[HttpResponse]) -> None """Ends the span that is tracing the network and updates its status.""" span = tracing_context.current_span.get() # type: AbstractSpan - only_propagate = settings.tracing_should_only_propagate() - if span and not only_propagate: + if span is not None: span.set_http_attributes(request, response=response) request_id = request.headers.get(self._request_id) if request_id is not None: diff --git a/sdk/core/azure-core/azure/core/settings.py b/sdk/core/azure-core/azure/core/settings.py index e1b4c738cdb8..6bc71c9e850c 100644 --- a/sdk/core/azure-core/azure/core/settings.py +++ b/sdk/core/azure-core/azure/core/settings.py @@ -410,9 +410,5 @@ def _config(self, props): # pylint: disable=no-self-use "tracing_implementation", env_var="AZURE_SDK_TRACING_IMPLEMENTATION", convert=convert_tracing_impl, default=None ) - tracing_should_only_propagate = PrioritizedSetting( - "tracing_should_only_propagate", env_var="AZURE_TRACING_ONLY_PROPAGATE", convert=convert_bool, default=False - ) - settings = Settings() diff --git a/sdk/core/azure-core/azure/core/tracing/common.py b/sdk/core/azure-core/azure/core/tracing/common.py index f6e4716a2eb8..b0e425a14d10 100644 --- a/sdk/core/azure-core/azure/core/tracing/common.py +++ b/sdk/core/azure-core/azure/core/tracing/common.py @@ -83,10 +83,3 @@ def get_parent_span(parent_span): ) return parent_span - - -def should_use_trace(parent_span): - # type: (AbstractSpan) -> bool - """Given Parent Span Returns whether the function should be traced""" - only_propagate = settings.tracing_should_only_propagate() - return bool(parent_span and not only_propagate) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 9f647f3333c4..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) 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 1440f86525e2..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 7fb903037d80..8b43ddf71a62 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -149,23 +149,3 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - -@pytest.mark.asyncio -async def test_should_only_propagate(): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - await client.make_request(2) - with trace.span("child") as child: - await client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - await client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_settings.py b/sdk/core/azure-core/tests/test_settings.py index 11e9dc48d523..1975c1adc6f3 100644 --- a/sdk/core/azure-core/tests/test_settings.py +++ b/sdk/core/azure-core/tests/test_settings.py @@ -217,20 +217,18 @@ def test_defaults(self): val = m.settings.defaults # assert isinstance(val, tuple) defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate os.environ["AZURE_LOG_LEVEL"] = "debug" defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate del os.environ["AZURE_LOG_LEVEL"] def test_current(self): diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 873871f5b222..473060f6097a 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -105,15 +105,6 @@ def test_get_parent_span(self): should_be_old_parent = common.get_parent_span(parent.span_instance) assert should_be_old_parent.span_instance == parent.span_instance - def test_should_use_trace(self): - with ContextHelper(environ={"AZURE_TRACING_ONLY_PROPAGATE": "yes"}): - parent_span = OpenCensusSpan() - assert not common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - parent_span = OpenCensusSpan() - assert common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - class TestDecorator(object): def test_decorator_has_different_name(self): @@ -190,21 +181,3 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - def test_should_only_propagate(self): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - client.make_request(2) - with trace.span("child") as child: - client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_tracing_policy.py b/sdk/core/azure-core/tests/test_tracing_policy.py index 450baa2f4f1e..be7e1adf98e9 100644 --- a/sdk/core/azure-core/tests/test_tracing_policy.py +++ b/sdk/core/azure-core/tests/test_tracing_policy.py @@ -72,13 +72,15 @@ def test_distributed_tracing_policy_solo(should_set_sdk_context): assert network_span.span_data.attributes.get("http.status_code") == 504 -def test_distributed_tracing_policy_with_user_agent(): +@pytest.mark.parametrize("should_set_sdk_context", [True, False]) +def test_distributed_tracing_policy_with_user_agent(should_set_sdk_context): """Test policy working with user agent.""" with ContextHelper(environ={"AZURE_HTTP_USER_AGENT": "mytools"}): exporter = MockExporter() trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) with trace.span("parent"): - tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) + if should_set_sdk_context: + tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) policy = DistributedTracingPolicy() request = HttpRequest("GET", "http://127.0.0.1") diff --git a/sdk/core/azure-core/tests/tracing_common.py b/sdk/core/azure-core/tests/tracing_common.py index 18f9b4e9f839..7fecf1d746f8 100644 --- a/sdk/core/azure-core/tests/tracing_common.py +++ b/sdk/core/azure-core/tests/tracing_common.py @@ -22,13 +22,12 @@ class ContextHelper(object): - def __init__(self, environ={}, tracer_to_use=None, should_only_propagate=None): + def __init__(self, environ={}, tracer_to_use=None): self.orig_tracer = OpenCensusSpan.get_current_tracer() self.orig_current_span = OpenCensusSpan.get_current_span() 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 - self.should_only_propagate = should_only_propagate def __enter__(self): self.orig_tracer = OpenCensusSpan.get_current_tracer() @@ -38,8 +37,6 @@ def __enter__(self): tracing_context.current_span.clear() if self.tracer_to_use is not None: settings.tracing_implementation.set_value(self.tracer_to_use) - if self.should_only_propagate is not None: - settings.tracing_should_only_propagate.set_value(self.should_only_propagate) self.os_env.start() execution_context.clear() tracing_context.current_span.clear() @@ -50,7 +47,6 @@ def __exit__(self, exc_type, exc_val, exc_tb): OpenCensusSpan.set_current_span(self.orig_current_span) tracing_context.current_span.set(self.orig_sdk_context_span) settings.tracing_implementation.unset_value() - settings.tracing_should_only_propagate.unset_value() self.os_env.stop() From 3c641379468cc5111104125d148dc7590bf78ec4 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Thu, 25 Jul 2019 18:49:01 -0700 Subject: [PATCH 15/37] Enable SDK Automation pull requests (#6498) --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 4bad085c48f9..bae8c63cefa0 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -1,5 +1,5 @@ { - "$schema": "https://openapistoragetest.blob.core.windows.net/sdkautomation/test/schemas/swagger_to_sdk_config.schema.json", + "$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/swagger_to_sdk_config.schema.json", "meta": { "autorest_options": { "version": "preview", From 9efafbc154f4b4fed9e27a6a11911fa195904129 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 26 Jul 2019 02:57:37 -0700 Subject: [PATCH 16/37] [AutoPR] devtestlabs/resource-manager (#6414) * [AutoPR devtestlabs/resource-manager] [Hub Generated] Review request for Microsoft.DevTestLab to add version stable/2018-09-15 (#6359) * Generated from c64177b58d5905986be6a16e270986ccfad08d25 Modification of PATCH description, plus minor fixes * Packaging update of azure-mgmt-devtestlabs * Generated from c2786532a6bf80ceb9cddda5e2c8b8abc09d6b30 Update specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/DTL.json Co-Authored-By: Nick Schonning * modified history and version * Added general breaking changes note * fixed indentation --- .../azure-mgmt-devtestlabs/HISTORY.rst | 19 + .../azure-mgmt-devtestlabs/MANIFEST.in | 1 + .../azure-mgmt-devtestlabs/README.rst | 2 +- .../azure/mgmt/devtestlabs/__init__.py | 7 +- .../azure/mgmt/devtestlabs/_configuration.py | 48 + ...abs_client.py => _dev_test_labs_client.py} | 86 +- .../azure/mgmt/devtestlabs/models/__init__.py | 744 ++- ...nums.py => _dev_test_labs_client_enums.py} | 2 + .../azure/mgmt/devtestlabs/models/_models.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_models_py3.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_paged_models.py | 261 + .../devtestlabs/models/applicable_schedule.py | 59 - .../models/applicable_schedule_fragment.py | 38 - .../applicable_schedule_fragment_py3.py | 38 - .../models/applicable_schedule_py3.py | 59 - .../models/apply_artifacts_request.py | 29 - .../models/apply_artifacts_request_py3.py | 29 - .../mgmt/devtestlabs/models/arm_template.py | 90 - .../devtestlabs/models/arm_template_info.py | 32 - .../models/arm_template_info_py3.py | 32 - .../devtestlabs/models/arm_template_paged.py | 27 - .../arm_template_parameter_properties.py | 32 - ..._template_parameter_properties_fragment.py | 32 - ...plate_parameter_properties_fragment_py3.py | 32 - .../arm_template_parameter_properties_py3.py | 32 - .../devtestlabs/models/arm_template_py3.py | 90 - .../azure/mgmt/devtestlabs/models/artifact.py | 88 - .../artifact_deployment_status_properties.py | 38 - ...t_deployment_status_properties_fragment.py | 38 - ...ployment_status_properties_fragment_py3.py | 38 - ...tifact_deployment_status_properties_py3.py | 38 - .../models/artifact_install_properties.py | 55 - .../artifact_install_properties_fragment.py | 55 - ...rtifact_install_properties_fragment_py3.py | 55 - .../models/artifact_install_properties_py3.py | 55 - .../mgmt/devtestlabs/models/artifact_paged.py | 27 - .../models/artifact_parameter_properties.py | 32 - .../artifact_parameter_properties_fragment.py | 32 - ...ifact_parameter_properties_fragment_py3.py | 32 - .../artifact_parameter_properties_py3.py | 32 - .../mgmt/devtestlabs/models/artifact_py3.py | 88 - .../devtestlabs/models/artifact_source.py | 100 - .../models/artifact_source_fragment.py | 63 - .../models/artifact_source_fragment_py3.py | 63 - .../models/artifact_source_paged.py | 27 - .../devtestlabs/models/artifact_source_py3.py | 100 - .../models/attach_disk_properties.py | 29 - .../models/attach_disk_properties_py3.py | 29 - .../models/attach_new_data_disk_options.py | 37 - .../attach_new_data_disk_options_fragment.py | 37 - ...tach_new_data_disk_options_fragment_py3.py | 37 - .../attach_new_data_disk_options_py3.py | 37 - .../models/bulk_creation_parameters.py | 28 - .../bulk_creation_parameters_fragment.py | 28 - .../bulk_creation_parameters_fragment_py3.py | 28 - .../models/bulk_creation_parameters_py3.py | 28 - .../devtestlabs/models/compute_data_disk.py | 41 - .../models/compute_data_disk_fragment.py | 41 - .../models/compute_data_disk_fragment_py3.py | 41 - .../models/compute_data_disk_py3.py | 41 - .../models/compute_vm_instance_view_status.py | 36 - ...ompute_vm_instance_view_status_fragment.py | 36 - ...te_vm_instance_view_status_fragment_py3.py | 36 - .../compute_vm_instance_view_status_py3.py | 36 - .../models/compute_vm_properties.py | 54 - .../models/compute_vm_properties_fragment.py | 55 - .../compute_vm_properties_fragment_py3.py | 55 - .../models/compute_vm_properties_py3.py | 54 - .../models/cost_threshold_properties.py | 51 - .../models/cost_threshold_properties_py3.py | 51 - .../mgmt/devtestlabs/models/custom_image.py | 106 - .../models/custom_image_fragment.py | 71 - .../models/custom_image_fragment_py3.py | 71 - .../devtestlabs/models/custom_image_paged.py | 27 - .../models/custom_image_properties_custom.py | 43 - ...custom_image_properties_custom_fragment.py | 37 - ...om_image_properties_custom_fragment_py3.py | 37 - .../custom_image_properties_custom_py3.py | 43 - .../custom_image_properties_from_plan.py | 38 - ...tom_image_properties_from_plan_fragment.py | 38 - ...image_properties_from_plan_fragment_py3.py | 38 - .../custom_image_properties_from_plan_py3.py | 38 - .../models/custom_image_properties_from_vm.py | 36 - ...ustom_image_properties_from_vm_fragment.py | 37 - ...m_image_properties_from_vm_fragment_py3.py | 37 - .../custom_image_properties_from_vm_py3.py | 36 - .../devtestlabs/models/custom_image_py3.py | 106 - .../models/data_disk_properties.py | 41 - .../models/data_disk_properties_fragment.py | 41 - .../data_disk_properties_fragment_py3.py | 41 - .../models/data_disk_properties_py3.py | 41 - .../models/data_disk_storage_type_info.py | 33 - .../data_disk_storage_type_info_fragment.py | 33 - ...ata_disk_storage_type_info_fragment_py3.py | 33 - .../models/data_disk_storage_type_info_py3.py | 33 - .../mgmt/devtestlabs/models/day_details.py | 28 - .../models/day_details_fragment.py | 28 - .../models/day_details_fragment_py3.py | 28 - .../devtestlabs/models/day_details_py3.py | 28 - .../models/detach_data_disk_properties.py | 29 - .../models/detach_data_disk_properties_py3.py | 29 - .../models/detach_disk_properties.py | 29 - .../models/detach_disk_properties_py3.py | 29 - .../azure/mgmt/devtestlabs/models/disk.py | 97 - .../mgmt/devtestlabs/models/disk_fragment.py | 60 - .../devtestlabs/models/disk_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/disk_paged.py | 27 - .../azure/mgmt/devtestlabs/models/disk_py3.py | 97 - .../devtestlabs/models/dtl_environment.py | 81 - .../models/dtl_environment_fragment.py | 38 - .../models/dtl_environment_fragment_py3.py | 38 - .../models/dtl_environment_paged.py | 27 - .../devtestlabs/models/dtl_environment_py3.py | 81 - .../environment_deployment_properties.py | 33 - ...ironment_deployment_properties_fragment.py | 33 - ...ment_deployment_properties_fragment_py3.py | 33 - .../environment_deployment_properties_py3.py | 33 - .../models/evaluate_policies_properties.py | 40 - .../evaluate_policies_properties_py3.py | 40 - .../models/evaluate_policies_request.py | 29 - .../models/evaluate_policies_request_py3.py | 29 - .../models/evaluate_policies_response.py | 28 - .../models/evaluate_policies_response_py3.py | 28 - .../azure/mgmt/devtestlabs/models/event.py | 30 - .../mgmt/devtestlabs/models/event_fragment.py | 30 - .../devtestlabs/models/event_fragment_py3.py | 30 - .../mgmt/devtestlabs/models/event_py3.py | 30 - .../export_resource_usage_parameters.py | 35 - .../export_resource_usage_parameters_py3.py | 35 - .../devtestlabs/models/external_subnet.py | 32 - .../models/external_subnet_fragment.py | 32 - .../models/external_subnet_fragment_py3.py | 32 - .../devtestlabs/models/external_subnet_py3.py | 32 - .../azure/mgmt/devtestlabs/models/formula.py | 85 - .../devtestlabs/models/formula_fragment.py | 48 - .../models/formula_fragment_py3.py | 48 - .../mgmt/devtestlabs/models/formula_paged.py | 27 - .../models/formula_properties_from_vm.py | 29 - .../formula_properties_from_vm_fragment.py | 29 - ...formula_properties_from_vm_fragment_py3.py | 29 - .../models/formula_properties_from_vm_py3.py | 29 - .../mgmt/devtestlabs/models/formula_py3.py | 85 - .../mgmt/devtestlabs/models/gallery_image.py | 83 - .../devtestlabs/models/gallery_image_paged.py | 27 - .../devtestlabs/models/gallery_image_py3.py | 83 - .../models/gallery_image_reference.py | 44 - .../gallery_image_reference_fragment.py | 44 - .../gallery_image_reference_fragment_py3.py | 44 - .../models/gallery_image_reference_py3.py | 44 - .../models/generate_arm_template_request.py | 43 - .../generate_arm_template_request_py3.py | 43 - .../models/generate_upload_uri_parameter.py | 28 - .../generate_upload_uri_parameter_py3.py | 28 - .../models/generate_upload_uri_response.py | 28 - .../generate_upload_uri_response_py3.py | 28 - .../mgmt/devtestlabs/models/hour_details.py | 28 - .../models/hour_details_fragment.py | 28 - .../models/hour_details_fragment_py3.py | 28 - .../devtestlabs/models/hour_details_py3.py | 28 - .../devtestlabs/models/identity_properties.py | 40 - .../models/identity_properties_py3.py | 40 - .../import_lab_virtual_machine_request.py | 35 - .../import_lab_virtual_machine_request_py3.py | 35 - .../devtestlabs/models/inbound_nat_rule.py | 42 - .../models/inbound_nat_rule_fragment.py | 42 - .../models/inbound_nat_rule_fragment_py3.py | 42 - .../models/inbound_nat_rule_py3.py | 42 - .../azure/mgmt/devtestlabs/models/lab.py | 165 - .../models/lab_announcement_properties.py | 64 - .../lab_announcement_properties_fragment.py | 47 - ...ab_announcement_properties_fragment_py3.py | 47 - .../models/lab_announcement_properties_py3.py | 64 - .../azure/mgmt/devtestlabs/models/lab_cost.py | 97 - .../models/lab_cost_details_properties.py | 37 - .../models/lab_cost_details_properties_py3.py | 37 - .../mgmt/devtestlabs/models/lab_cost_py3.py | 97 - .../models/lab_cost_summary_properties.py | 28 - .../models/lab_cost_summary_properties_py3.py | 28 - .../mgmt/devtestlabs/models/lab_fragment.py | 78 - .../devtestlabs/models/lab_fragment_py3.py | 78 - .../mgmt/devtestlabs/models/lab_paged.py | 27 - .../azure/mgmt/devtestlabs/models/lab_py3.py | 165 - .../models/lab_resource_cost_properties.py | 63 - .../lab_resource_cost_properties_py3.py | 63 - .../models/lab_support_properties.py | 34 - .../models/lab_support_properties_fragment.py | 34 - .../lab_support_properties_fragment_py3.py | 34 - .../models/lab_support_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/lab_vhd.py | 28 - .../mgmt/devtestlabs/models/lab_vhd_paged.py | 27 - .../mgmt/devtestlabs/models/lab_vhd_py3.py | 28 - .../devtestlabs/models/lab_virtual_machine.py | 221 - .../lab_virtual_machine_creation_parameter.py | 192 - ...ual_machine_creation_parameter_fragment.py | 192 - ...machine_creation_parameter_fragment_py3.py | 192 - ..._virtual_machine_creation_parameter_py3.py | 192 - .../models/lab_virtual_machine_fragment.py | 177 - .../lab_virtual_machine_fragment_py3.py | 177 - .../models/lab_virtual_machine_paged.py | 27 - .../models/lab_virtual_machine_py3.py | 221 - .../mgmt/devtestlabs/models/linux_os_info.py | 30 - .../models/linux_os_info_fragment.py | 30 - .../models/linux_os_info_fragment_py3.py | 30 - .../devtestlabs/models/linux_os_info_py3.py | 30 - .../models/network_interface_properties.py | 65 - .../network_interface_properties_fragment.py | 65 - ...twork_interface_properties_fragment_py3.py | 65 - .../network_interface_properties_py3.py | 65 - .../models/notification_channel.py | 86 - .../models/notification_channel_fragment.py | 49 - .../notification_channel_fragment_py3.py | 49 - .../models/notification_channel_paged.py | 27 - .../models/notification_channel_py3.py | 86 - .../models/notification_settings.py | 49 - .../models/notification_settings_fragment.py | 49 - .../notification_settings_fragment_py3.py | 49 - .../models/notification_settings_py3.py | 49 - .../devtestlabs/models/notify_parameters.py | 34 - .../models/notify_parameters_py3.py | 34 - .../devtestlabs/models/operation_error.py | 32 - .../devtestlabs/models/operation_error_py3.py | 32 - .../devtestlabs/models/operation_metadata.py | 32 - .../models/operation_metadata_display.py | 41 - .../models/operation_metadata_display_py3.py | 41 - .../models/operation_metadata_paged.py | 27 - .../models/operation_metadata_py3.py | 32 - .../devtestlabs/models/operation_result.py | 48 - .../models/operation_result_py3.py | 48 - .../mgmt/devtestlabs/models/parameter_info.py | 32 - .../devtestlabs/models/parameter_info_py3.py | 32 - .../models/parameters_value_file_info.py | 32 - .../models/parameters_value_file_info_py3.py | 32 - .../percentage_cost_threshold_properties.py | 28 - ...ercentage_cost_threshold_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/policy.py | 97 - .../devtestlabs/models/policy_fragment.py | 60 - .../devtestlabs/models/policy_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/policy_paged.py | 27 - .../mgmt/devtestlabs/models/policy_py3.py | 97 - .../devtestlabs/models/policy_set_result.py | 34 - .../models/policy_set_result_py3.py | 34 - .../devtestlabs/models/policy_violation.py | 32 - .../models/policy_violation_py3.py | 32 - .../azure/mgmt/devtestlabs/models/port.py | 34 - .../mgmt/devtestlabs/models/port_fragment.py | 34 - .../devtestlabs/models/port_fragment_py3.py | 34 - .../azure/mgmt/devtestlabs/models/port_py3.py | 34 - .../mgmt/devtestlabs/models/rdp_connection.py | 28 - .../devtestlabs/models/rdp_connection_py3.py | 28 - .../resize_lab_virtual_machine_properties.py | 28 - ...size_lab_virtual_machine_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/resource.py | 53 - .../mgmt/devtestlabs/models/resource_py3.py | 53 - .../models/retarget_schedule_properties.py | 34 - .../retarget_schedule_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/schedule.py | 102 - .../models/schedule_creation_parameter.py | 74 - .../schedule_creation_parameter_fragment.py | 76 - ...chedule_creation_parameter_fragment_py3.py | 76 - .../models/schedule_creation_parameter_py3.py | 74 - .../devtestlabs/models/schedule_fragment.py | 67 - .../models/schedule_fragment_py3.py | 67 - .../mgmt/devtestlabs/models/schedule_paged.py | 27 - .../mgmt/devtestlabs/models/schedule_py3.py | 102 - .../azure/mgmt/devtestlabs/models/secret.py | 63 - .../devtestlabs/models/secret_fragment.py | 31 - .../devtestlabs/models/secret_fragment_py3.py | 31 - .../mgmt/devtestlabs/models/secret_paged.py | 27 - .../mgmt/devtestlabs/models/secret_py3.py | 63 - .../mgmt/devtestlabs/models/service_fabric.py | 76 - .../models/service_fabric_fragment.py | 37 - .../models/service_fabric_fragment_py3.py | 37 - .../models/service_fabric_paged.py | 27 - .../devtestlabs/models/service_fabric_py3.py | 76 - .../mgmt/devtestlabs/models/service_runner.py | 52 - .../models/service_runner_paged.py | 27 - .../devtestlabs/models/service_runner_py3.py | 52 - .../shared_public_ip_address_configuration.py | 30 - ...ublic_ip_address_configuration_fragment.py | 30 - ...c_ip_address_configuration_fragment_py3.py | 30 - ...red_public_ip_address_configuration_py3.py | 30 - .../models/shutdown_notification_content.py | 78 - .../shutdown_notification_content_py3.py | 78 - .../azure/mgmt/devtestlabs/models/subnet.py | 39 - .../devtestlabs/models/subnet_fragment.py | 39 - .../devtestlabs/models/subnet_fragment_py3.py | 39 - .../devtestlabs/models/subnet_override.py | 57 - .../models/subnet_override_fragment.py | 57 - .../models/subnet_override_fragment_py3.py | 57 - .../devtestlabs/models/subnet_override_py3.py | 57 - .../mgmt/devtestlabs/models/subnet_py3.py | 39 - ..._shared_public_ip_address_configuration.py | 29 - ...ublic_ip_address_configuration_fragment.py | 29 - ...c_ip_address_configuration_fragment_py3.py | 29 - ...red_public_ip_address_configuration_py3.py | 29 - .../models/target_cost_properties.py | 51 - .../models/target_cost_properties_py3.py | 51 - .../devtestlabs/models/update_resource.py | 28 - .../devtestlabs/models/update_resource_py3.py | 28 - .../azure/mgmt/devtestlabs/models/user.py | 72 - .../mgmt/devtestlabs/models/user_fragment.py | 35 - .../devtestlabs/models/user_fragment_py3.py | 35 - .../mgmt/devtestlabs/models/user_identity.py | 49 - .../models/user_identity_fragment.py | 49 - .../models/user_identity_fragment_py3.py | 49 - .../devtestlabs/models/user_identity_py3.py | 49 - .../mgmt/devtestlabs/models/user_paged.py | 27 - .../azure/mgmt/devtestlabs/models/user_py3.py | 72 - .../devtestlabs/models/user_secret_store.py | 32 - .../models/user_secret_store_fragment.py | 32 - .../models/user_secret_store_fragment_py3.py | 32 - .../models/user_secret_store_py3.py | 32 - .../devtestlabs/models/virtual_network.py | 88 - .../models/virtual_network_fragment.py | 45 - .../models/virtual_network_fragment_py3.py | 45 - .../models/virtual_network_paged.py | 27 - .../devtestlabs/models/virtual_network_py3.py | 88 - .../mgmt/devtestlabs/models/week_details.py | 33 - .../models/week_details_fragment.py | 33 - .../models/week_details_fragment_py3.py | 33 - .../devtestlabs/models/week_details_py3.py | 33 - .../devtestlabs/models/windows_os_info.py | 31 - .../models/windows_os_info_fragment.py | 31 - .../models/windows_os_info_fragment_py3.py | 31 - .../devtestlabs/models/windows_os_info_py3.py | 31 - .../mgmt/devtestlabs/operations/__init__.py | 50 +- ...ations.py => _arm_templates_operations.py} | 19 +- ...ons.py => _artifact_sources_operations.py} | 22 +- ...operations.py => _artifacts_operations.py} | 18 +- ...sts_operations.py => _costs_operations.py} | 4 +- ...ations.py => _custom_images_operations.py} | 21 +- ...sks_operations.py => _disks_operations.py} | 20 +- ...rations.py => _environments_operations.py} | 21 +- ..._operations.py => _formulas_operations.py} | 23 +- ...tions.py => _gallery_images_operations.py} | 16 +- ...ons.py => _global_schedules_operations.py} | 36 +- ...labs_operations.py => _labs_operations.py} | 49 +- ...y => _notification_channels_operations.py} | 34 +- .../{operations.py => _operations.py} | 3 +- ..._operations.py => _policies_operations.py} | 22 +- ...erations.py => _policy_sets_operations.py} | 3 +- ..._operations.py => _provider_operations.py} | 16 +- ...operations.py => _schedules_operations.py} | 36 +- ...s_operations.py => _secrets_operations.py} | 20 +- ...> _service_fabric_schedules_operations.py} | 34 +- ...ions.py => _service_fabrics_operations.py} | 38 +- ...ions.py => _service_runners_operations.py} | 91 +- ...ers_operations.py => _users_operations.py} | 21 +- ... _virtual_machine_schedules_operations.py} | 22 +- ...ons.py => _virtual_machines_operations.py} | 25 +- ...ons.py => _virtual_networks_operations.py} | 21 +- .../azure/mgmt/devtestlabs/version.py | 2 +- .../azure-mgmt-devtestlabs/setup.py | 2 +- 353 files changed, 12470 insertions(+), 16125 deletions(-) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/{dev_test_labs_client.py => _dev_test_labs_client.py} (72%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/{dev_test_labs_client_enums.py => _dev_test_labs_client_enums.py} (98%) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{arm_templates_operations.py => _arm_templates_operations.py} (95%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifact_sources_operations.py => _artifact_sources_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifacts_operations.py => _artifacts_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{costs_operations.py => _costs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{custom_images_operations.py => _custom_images_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{disks_operations.py => _disks_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{environments_operations.py => _environments_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{formulas_operations.py => _formulas_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{gallery_images_operations.py => _gallery_images_operations.py} (93%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{global_schedules_operations.py => _global_schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{labs_operations.py => _labs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{notification_channels_operations.py => _notification_channels_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{operations.py => _operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policies_operations.py => _policies_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policy_sets_operations.py => _policy_sets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{provider_operations.py => _provider_operations.py} (90%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{schedules_operations.py => _schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{secrets_operations.py => _secrets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabric_schedules_operations.py => _service_fabric_schedules_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabrics_operations.py => _service_fabrics_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_runners_operations.py => _service_runners_operations.py} (71%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{users_operations.py => _users_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machine_schedules_operations.py => _virtual_machine_schedules_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machines_operations.py => _virtual_machines_operations.py} (99%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_networks_operations.py => _virtual_networks_operations.py} (97%) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst index ca00766f84e0..bfb266aba9c4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst @@ -3,6 +3,25 @@ Release History =============== +4.0.0 (2019-07-26) +++++++++++++++++++ + +**Breaking changes** + +- Removed operation ServiceRunnersOperations.list + +**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. + +- DevTestLabsClient cannot be imported from `azure.mgmt.devtestlabs.dev_test_labs_management_client` anymore (import from `azure.mgmt.devtestlabs` works like before) +- DevTestLabsManagementClientConfiguration import has been moved from `azure.mgmt.devtestlabs.dev_test_labs_management_client` to `azure.mgmt.devtestlabs` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.models.my_class` (import from `azure.mgmt.devtestlabs.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.operations.my_class_operations` (import from `azure.mgmt.devtestlabs.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. + 3.0.0 (2019-02-07) ++++++++++++++++++ diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst index 3b266c6e0f32..7863788f2412 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure DevTestLabs 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/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py index 18ce91ae3337..a60396771701 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .dev_test_labs_client import DevTestLabsClient -from .version import VERSION +from ._configuration import DevTestLabsClientConfiguration +from ._dev_test_labs_client import DevTestLabsClient +__all__ = ['DevTestLabsClient', 'DevTestLabsClientConfiguration'] -__all__ = ['DevTestLabsClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py new file mode 100644 index 000000000000..ad4e6c48fb8d --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_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 DevTestLabsClientConfiguration(AzureConfiguration): + """Configuration for DevTestLabsClient + 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 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 base_url: + base_url = 'https://management.azure.com' + + super(DevTestLabsClientConfiguration, 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-devtestlabs/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py similarity index 72% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py index 74bdf0ef0fdc..aa051d2d128d 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py @@ -11,66 +11,34 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.provider_operations import ProviderOperations -from .operations.labs_operations import LabsOperations -from .operations.operations import Operations -from .operations.global_schedules_operations import GlobalSchedulesOperations -from .operations.artifact_sources_operations import ArtifactSourcesOperations -from .operations.arm_templates_operations import ArmTemplatesOperations -from .operations.artifacts_operations import ArtifactsOperations -from .operations.costs_operations import CostsOperations -from .operations.custom_images_operations import CustomImagesOperations -from .operations.formulas_operations import FormulasOperations -from .operations.gallery_images_operations import GalleryImagesOperations -from .operations.notification_channels_operations import NotificationChannelsOperations -from .operations.policy_sets_operations import PolicySetsOperations -from .operations.policies_operations import PoliciesOperations -from .operations.schedules_operations import SchedulesOperations -from .operations.service_runners_operations import ServiceRunnersOperations -from .operations.users_operations import UsersOperations -from .operations.disks_operations import DisksOperations -from .operations.environments_operations import EnvironmentsOperations -from .operations.secrets_operations import SecretsOperations -from .operations.service_fabrics_operations import ServiceFabricsOperations -from .operations.service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .operations.virtual_networks_operations import VirtualNetworksOperations -from . import models - - -class DevTestLabsClientConfiguration(AzureConfiguration): - """Configuration for DevTestLabsClient - 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 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 base_url: - base_url = 'https://management.azure.com' - - super(DevTestLabsClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-devtestlabs/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import DevTestLabsClientConfiguration +from .operations import ProviderOperations +from .operations import LabsOperations +from .operations import Operations +from .operations import GlobalSchedulesOperations +from .operations import ArtifactSourcesOperations +from .operations import ArmTemplatesOperations +from .operations import ArtifactsOperations +from .operations import CostsOperations +from .operations import CustomImagesOperations +from .operations import FormulasOperations +from .operations import GalleryImagesOperations +from .operations import NotificationChannelsOperations +from .operations import PolicySetsOperations +from .operations import PoliciesOperations +from .operations import SchedulesOperations +from .operations import ServiceRunnersOperations +from .operations import UsersOperations +from .operations import DisksOperations +from .operations import EnvironmentsOperations +from .operations import SecretsOperations +from .operations import ServiceFabricsOperations +from .operations import ServiceFabricSchedulesOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineSchedulesOperations +from .operations import VirtualNetworksOperations +from . import models class DevTestLabsClient(SDKClient): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py index 56d0fd0fe73f..1bb40772c367 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py @@ -10,322 +10,321 @@ # -------------------------------------------------------------------------- try: - from .week_details_py3 import WeekDetails - from .day_details_py3 import DayDetails - from .hour_details_py3 import HourDetails - from .notification_settings_py3 import NotificationSettings - from .schedule_py3 import Schedule - from .applicable_schedule_py3 import ApplicableSchedule - from .week_details_fragment_py3 import WeekDetailsFragment - from .day_details_fragment_py3 import DayDetailsFragment - from .hour_details_fragment_py3 import HourDetailsFragment - from .notification_settings_fragment_py3 import NotificationSettingsFragment - from .schedule_fragment_py3 import ScheduleFragment - from .applicable_schedule_fragment_py3 import ApplicableScheduleFragment - from .artifact_parameter_properties_py3 import ArtifactParameterProperties - from .artifact_install_properties_py3 import ArtifactInstallProperties - from .apply_artifacts_request_py3 import ApplyArtifactsRequest - from .parameters_value_file_info_py3 import ParametersValueFileInfo - from .arm_template_py3 import ArmTemplate - from .arm_template_info_py3 import ArmTemplateInfo - from .arm_template_parameter_properties_py3 import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment_py3 import ArmTemplateParameterPropertiesFragment - from .artifact_py3 import Artifact - from .artifact_deployment_status_properties_py3 import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment_py3 import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment_py3 import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment_py3 import ArtifactInstallPropertiesFragment - from .artifact_source_py3 import ArtifactSource - from .artifact_source_fragment_py3 import ArtifactSourceFragment - from .attach_disk_properties_py3 import AttachDiskProperties - from .attach_new_data_disk_options_py3 import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment_py3 import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters_py3 import BulkCreationParameters - from .bulk_creation_parameters_fragment_py3 import BulkCreationParametersFragment - from .compute_data_disk_py3 import ComputeDataDisk - from .compute_data_disk_fragment_py3 import ComputeDataDiskFragment - from .compute_vm_instance_view_status_py3 import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment_py3 import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties_py3 import ComputeVmProperties - from .compute_vm_properties_fragment_py3 import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties_py3 import PercentageCostThresholdProperties - from .cost_threshold_properties_py3 import CostThresholdProperties - from .windows_os_info_py3 import WindowsOsInfo - from .linux_os_info_py3 import LinuxOsInfo - from .custom_image_properties_from_vm_py3 import CustomImagePropertiesFromVm - from .custom_image_properties_custom_py3 import CustomImagePropertiesCustom - from .data_disk_storage_type_info_py3 import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan_py3 import CustomImagePropertiesFromPlan - from .custom_image_py3 import CustomImage - from .windows_os_info_fragment_py3 import WindowsOsInfoFragment - from .linux_os_info_fragment_py3 import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment_py3 import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment_py3 import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment_py3 import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment_py3 import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment_py3 import CustomImageFragment - from .data_disk_properties_py3 import DataDiskProperties - from .data_disk_properties_fragment_py3 import DataDiskPropertiesFragment - from .detach_data_disk_properties_py3 import DetachDataDiskProperties - from .detach_disk_properties_py3 import DetachDiskProperties - from .disk_py3 import Disk - from .disk_fragment_py3 import DiskFragment - from .environment_deployment_properties_py3 import EnvironmentDeploymentProperties - from .dtl_environment_py3 import DtlEnvironment - from .environment_deployment_properties_fragment_py3 import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment_py3 import DtlEnvironmentFragment - from .evaluate_policies_properties_py3 import EvaluatePoliciesProperties - from .evaluate_policies_request_py3 import EvaluatePoliciesRequest - from .policy_violation_py3 import PolicyViolation - from .policy_set_result_py3 import PolicySetResult - from .evaluate_policies_response_py3 import EvaluatePoliciesResponse - from .event_py3 import Event - from .event_fragment_py3 import EventFragment - from .export_resource_usage_parameters_py3 import ExportResourceUsageParameters - from .external_subnet_py3 import ExternalSubnet - from .external_subnet_fragment_py3 import ExternalSubnetFragment - from .gallery_image_reference_py3 import GalleryImageReference - from .inbound_nat_rule_py3 import InboundNatRule - from .shared_public_ip_address_configuration_py3 import SharedPublicIpAddressConfiguration - from .network_interface_properties_py3 import NetworkInterfaceProperties - from .schedule_creation_parameter_py3 import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter_py3 import LabVirtualMachineCreationParameter - from .formula_properties_from_vm_py3 import FormulaPropertiesFromVm - from .formula_py3 import Formula - from .gallery_image_reference_fragment_py3 import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment_py3 import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment_py3 import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment_py3 import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment_py3 import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment_py3 import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment_py3 import FormulaPropertiesFromVmFragment - from .formula_fragment_py3 import FormulaFragment - from .gallery_image_py3 import GalleryImage - from .parameter_info_py3 import ParameterInfo - from .generate_arm_template_request_py3 import GenerateArmTemplateRequest - from .generate_upload_uri_parameter_py3 import GenerateUploadUriParameter - from .generate_upload_uri_response_py3 import GenerateUploadUriResponse - from .identity_properties_py3 import IdentityProperties - from .import_lab_virtual_machine_request_py3 import ImportLabVirtualMachineRequest - from .lab_announcement_properties_py3 import LabAnnouncementProperties - from .lab_support_properties_py3 import LabSupportProperties - from .lab_py3 import Lab - from .lab_announcement_properties_fragment_py3 import LabAnnouncementPropertiesFragment - from .target_cost_properties_py3 import TargetCostProperties - from .lab_cost_summary_properties_py3 import LabCostSummaryProperties - from .lab_cost_details_properties_py3 import LabCostDetailsProperties - from .lab_resource_cost_properties_py3 import LabResourceCostProperties - from .lab_cost_py3 import LabCost - from .lab_support_properties_fragment_py3 import LabSupportPropertiesFragment - from .lab_fragment_py3 import LabFragment - from .lab_vhd_py3 import LabVhd - from .lab_virtual_machine_py3 import LabVirtualMachine - from .lab_virtual_machine_fragment_py3 import LabVirtualMachineFragment - from .notification_channel_py3 import NotificationChannel - from .notification_channel_fragment_py3 import NotificationChannelFragment - from .notify_parameters_py3 import NotifyParameters - from .operation_error_py3 import OperationError - from .operation_metadata_display_py3 import OperationMetadataDisplay - from .operation_metadata_py3 import OperationMetadata - from .operation_result_py3 import OperationResult - from .policy_py3 import Policy - from .policy_fragment_py3 import PolicyFragment - from .port_py3 import Port - from .port_fragment_py3 import PortFragment - from .rdp_connection_py3 import RdpConnection - from .resize_lab_virtual_machine_properties_py3 import ResizeLabVirtualMachineProperties - from .resource_py3 import Resource - from .retarget_schedule_properties_py3 import RetargetScheduleProperties - from .secret_py3 import Secret - from .secret_fragment_py3 import SecretFragment - from .service_fabric_py3 import ServiceFabric - from .service_fabric_fragment_py3 import ServiceFabricFragment - from .service_runner_py3 import ServiceRunner - from .shutdown_notification_content_py3 import ShutdownNotificationContent - from .subnet_py3 import Subnet - from .subnet_fragment_py3 import SubnetFragment - from .subnet_shared_public_ip_address_configuration_py3 import SubnetSharedPublicIpAddressConfiguration - from .subnet_override_py3 import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment_py3 import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment_py3 import SubnetOverrideFragment - from .update_resource_py3 import UpdateResource - from .user_identity_py3 import UserIdentity - from .user_secret_store_py3 import UserSecretStore - from .user_py3 import User - from .user_identity_fragment_py3 import UserIdentityFragment - from .user_secret_store_fragment_py3 import UserSecretStoreFragment - from .user_fragment_py3 import UserFragment - from .virtual_network_py3 import VirtualNetwork - from .virtual_network_fragment_py3 import VirtualNetworkFragment + from ._models_py3 import ApplicableSchedule + from ._models_py3 import ApplicableScheduleFragment + from ._models_py3 import ApplyArtifactsRequest + from ._models_py3 import ArmTemplate + from ._models_py3 import ArmTemplateInfo + from ._models_py3 import ArmTemplateParameterProperties + from ._models_py3 import ArmTemplateParameterPropertiesFragment + from ._models_py3 import Artifact + from ._models_py3 import ArtifactDeploymentStatusProperties + from ._models_py3 import ArtifactDeploymentStatusPropertiesFragment + from ._models_py3 import ArtifactInstallProperties + from ._models_py3 import ArtifactInstallPropertiesFragment + from ._models_py3 import ArtifactParameterProperties + from ._models_py3 import ArtifactParameterPropertiesFragment + from ._models_py3 import ArtifactSource + from ._models_py3 import ArtifactSourceFragment + from ._models_py3 import AttachDiskProperties + from ._models_py3 import AttachNewDataDiskOptions + from ._models_py3 import AttachNewDataDiskOptionsFragment + from ._models_py3 import BulkCreationParameters + from ._models_py3 import BulkCreationParametersFragment + from ._models_py3 import ComputeDataDisk + from ._models_py3 import ComputeDataDiskFragment + from ._models_py3 import ComputeVmInstanceViewStatus + from ._models_py3 import ComputeVmInstanceViewStatusFragment + from ._models_py3 import ComputeVmProperties + from ._models_py3 import ComputeVmPropertiesFragment + from ._models_py3 import CostThresholdProperties + from ._models_py3 import CustomImage + from ._models_py3 import CustomImageFragment + from ._models_py3 import CustomImagePropertiesCustom + from ._models_py3 import CustomImagePropertiesCustomFragment + from ._models_py3 import CustomImagePropertiesFromPlan + from ._models_py3 import CustomImagePropertiesFromPlanFragment + from ._models_py3 import CustomImagePropertiesFromVm + from ._models_py3 import CustomImagePropertiesFromVmFragment + from ._models_py3 import DataDiskProperties + from ._models_py3 import DataDiskPropertiesFragment + from ._models_py3 import DataDiskStorageTypeInfo + from ._models_py3 import DataDiskStorageTypeInfoFragment + from ._models_py3 import DayDetails + from ._models_py3 import DayDetailsFragment + from ._models_py3 import DetachDataDiskProperties + from ._models_py3 import DetachDiskProperties + from ._models_py3 import Disk + from ._models_py3 import DiskFragment + from ._models_py3 import DtlEnvironment + from ._models_py3 import DtlEnvironmentFragment + from ._models_py3 import EnvironmentDeploymentProperties + from ._models_py3 import EnvironmentDeploymentPropertiesFragment + from ._models_py3 import EvaluatePoliciesProperties + from ._models_py3 import EvaluatePoliciesRequest + from ._models_py3 import EvaluatePoliciesResponse + from ._models_py3 import Event + from ._models_py3 import EventFragment + from ._models_py3 import ExportResourceUsageParameters + from ._models_py3 import ExternalSubnet + from ._models_py3 import ExternalSubnetFragment + from ._models_py3 import Formula + from ._models_py3 import FormulaFragment + from ._models_py3 import FormulaPropertiesFromVm + from ._models_py3 import FormulaPropertiesFromVmFragment + from ._models_py3 import GalleryImage + from ._models_py3 import GalleryImageReference + from ._models_py3 import GalleryImageReferenceFragment + from ._models_py3 import GenerateArmTemplateRequest + from ._models_py3 import GenerateUploadUriParameter + from ._models_py3 import GenerateUploadUriResponse + from ._models_py3 import HourDetails + from ._models_py3 import HourDetailsFragment + from ._models_py3 import IdentityProperties + from ._models_py3 import ImportLabVirtualMachineRequest + from ._models_py3 import InboundNatRule + from ._models_py3 import InboundNatRuleFragment + from ._models_py3 import Lab + from ._models_py3 import LabAnnouncementProperties + from ._models_py3 import LabAnnouncementPropertiesFragment + from ._models_py3 import LabCost + from ._models_py3 import LabCostDetailsProperties + from ._models_py3 import LabCostSummaryProperties + from ._models_py3 import LabFragment + from ._models_py3 import LabResourceCostProperties + from ._models_py3 import LabSupportProperties + from ._models_py3 import LabSupportPropertiesFragment + from ._models_py3 import LabVhd + from ._models_py3 import LabVirtualMachine + from ._models_py3 import LabVirtualMachineCreationParameter + from ._models_py3 import LabVirtualMachineCreationParameterFragment + from ._models_py3 import LabVirtualMachineFragment + from ._models_py3 import LinuxOsInfo + from ._models_py3 import LinuxOsInfoFragment + from ._models_py3 import NetworkInterfaceProperties + from ._models_py3 import NetworkInterfacePropertiesFragment + from ._models_py3 import NotificationChannel + from ._models_py3 import NotificationChannelFragment + from ._models_py3 import NotificationSettings + from ._models_py3 import NotificationSettingsFragment + from ._models_py3 import NotifyParameters + from ._models_py3 import OperationError + from ._models_py3 import OperationMetadata + from ._models_py3 import OperationMetadataDisplay + from ._models_py3 import OperationResult + from ._models_py3 import ParameterInfo + from ._models_py3 import ParametersValueFileInfo + from ._models_py3 import PercentageCostThresholdProperties + from ._models_py3 import Policy + from ._models_py3 import PolicyFragment + from ._models_py3 import PolicySetResult + from ._models_py3 import PolicyViolation + from ._models_py3 import Port + from ._models_py3 import PortFragment + from ._models_py3 import RdpConnection + from ._models_py3 import ResizeLabVirtualMachineProperties + from ._models_py3 import Resource + from ._models_py3 import RetargetScheduleProperties + from ._models_py3 import Schedule + from ._models_py3 import ScheduleCreationParameter + from ._models_py3 import ScheduleCreationParameterFragment + from ._models_py3 import ScheduleFragment + from ._models_py3 import Secret + from ._models_py3 import SecretFragment + from ._models_py3 import ServiceFabric + from ._models_py3 import ServiceFabricFragment + from ._models_py3 import ServiceRunner + from ._models_py3 import SharedPublicIpAddressConfiguration + from ._models_py3 import SharedPublicIpAddressConfigurationFragment + from ._models_py3 import ShutdownNotificationContent + from ._models_py3 import Subnet + from ._models_py3 import SubnetFragment + from ._models_py3 import SubnetOverride + from ._models_py3 import SubnetOverrideFragment + from ._models_py3 import SubnetSharedPublicIpAddressConfiguration + from ._models_py3 import SubnetSharedPublicIpAddressConfigurationFragment + from ._models_py3 import TargetCostProperties + from ._models_py3 import UpdateResource + from ._models_py3 import User + from ._models_py3 import UserFragment + from ._models_py3 import UserIdentity + from ._models_py3 import UserIdentityFragment + from ._models_py3 import UserSecretStore + from ._models_py3 import UserSecretStoreFragment + from ._models_py3 import VirtualNetwork + from ._models_py3 import VirtualNetworkFragment + from ._models_py3 import WeekDetails + from ._models_py3 import WeekDetailsFragment + from ._models_py3 import WindowsOsInfo + from ._models_py3 import WindowsOsInfoFragment except (SyntaxError, ImportError): - from .week_details import WeekDetails - from .day_details import DayDetails - from .hour_details import HourDetails - from .notification_settings import NotificationSettings - from .schedule import Schedule - from .applicable_schedule import ApplicableSchedule - from .week_details_fragment import WeekDetailsFragment - from .day_details_fragment import DayDetailsFragment - from .hour_details_fragment import HourDetailsFragment - from .notification_settings_fragment import NotificationSettingsFragment - from .schedule_fragment import ScheduleFragment - from .applicable_schedule_fragment import ApplicableScheduleFragment - from .artifact_parameter_properties import ArtifactParameterProperties - from .artifact_install_properties import ArtifactInstallProperties - from .apply_artifacts_request import ApplyArtifactsRequest - from .parameters_value_file_info import ParametersValueFileInfo - from .arm_template import ArmTemplate - from .arm_template_info import ArmTemplateInfo - from .arm_template_parameter_properties import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment import ArmTemplateParameterPropertiesFragment - from .artifact import Artifact - from .artifact_deployment_status_properties import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment import ArtifactInstallPropertiesFragment - from .artifact_source import ArtifactSource - from .artifact_source_fragment import ArtifactSourceFragment - from .attach_disk_properties import AttachDiskProperties - from .attach_new_data_disk_options import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters import BulkCreationParameters - from .bulk_creation_parameters_fragment import BulkCreationParametersFragment - from .compute_data_disk import ComputeDataDisk - from .compute_data_disk_fragment import ComputeDataDiskFragment - from .compute_vm_instance_view_status import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties import ComputeVmProperties - from .compute_vm_properties_fragment import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties import PercentageCostThresholdProperties - from .cost_threshold_properties import CostThresholdProperties - from .windows_os_info import WindowsOsInfo - from .linux_os_info import LinuxOsInfo - from .custom_image_properties_from_vm import CustomImagePropertiesFromVm - from .custom_image_properties_custom import CustomImagePropertiesCustom - from .data_disk_storage_type_info import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan import CustomImagePropertiesFromPlan - from .custom_image import CustomImage - from .windows_os_info_fragment import WindowsOsInfoFragment - from .linux_os_info_fragment import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment import CustomImageFragment - from .data_disk_properties import DataDiskProperties - from .data_disk_properties_fragment import DataDiskPropertiesFragment - from .detach_data_disk_properties import DetachDataDiskProperties - from .detach_disk_properties import DetachDiskProperties - from .disk import Disk - from .disk_fragment import DiskFragment - from .environment_deployment_properties import EnvironmentDeploymentProperties - from .dtl_environment import DtlEnvironment - from .environment_deployment_properties_fragment import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment import DtlEnvironmentFragment - from .evaluate_policies_properties import EvaluatePoliciesProperties - from .evaluate_policies_request import EvaluatePoliciesRequest - from .policy_violation import PolicyViolation - from .policy_set_result import PolicySetResult - from .evaluate_policies_response import EvaluatePoliciesResponse - from .event import Event - from .event_fragment import EventFragment - from .export_resource_usage_parameters import ExportResourceUsageParameters - from .external_subnet import ExternalSubnet - from .external_subnet_fragment import ExternalSubnetFragment - from .gallery_image_reference import GalleryImageReference - from .inbound_nat_rule import InboundNatRule - from .shared_public_ip_address_configuration import SharedPublicIpAddressConfiguration - from .network_interface_properties import NetworkInterfaceProperties - from .schedule_creation_parameter import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter import LabVirtualMachineCreationParameter - from .formula_properties_from_vm import FormulaPropertiesFromVm - from .formula import Formula - from .gallery_image_reference_fragment import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment import FormulaPropertiesFromVmFragment - from .formula_fragment import FormulaFragment - from .gallery_image import GalleryImage - from .parameter_info import ParameterInfo - from .generate_arm_template_request import GenerateArmTemplateRequest - from .generate_upload_uri_parameter import GenerateUploadUriParameter - from .generate_upload_uri_response import GenerateUploadUriResponse - from .identity_properties import IdentityProperties - from .import_lab_virtual_machine_request import ImportLabVirtualMachineRequest - from .lab_announcement_properties import LabAnnouncementProperties - from .lab_support_properties import LabSupportProperties - from .lab import Lab - from .lab_announcement_properties_fragment import LabAnnouncementPropertiesFragment - from .target_cost_properties import TargetCostProperties - from .lab_cost_summary_properties import LabCostSummaryProperties - from .lab_cost_details_properties import LabCostDetailsProperties - from .lab_resource_cost_properties import LabResourceCostProperties - from .lab_cost import LabCost - from .lab_support_properties_fragment import LabSupportPropertiesFragment - from .lab_fragment import LabFragment - from .lab_vhd import LabVhd - from .lab_virtual_machine import LabVirtualMachine - from .lab_virtual_machine_fragment import LabVirtualMachineFragment - from .notification_channel import NotificationChannel - from .notification_channel_fragment import NotificationChannelFragment - from .notify_parameters import NotifyParameters - from .operation_error import OperationError - from .operation_metadata_display import OperationMetadataDisplay - from .operation_metadata import OperationMetadata - from .operation_result import OperationResult - from .policy import Policy - from .policy_fragment import PolicyFragment - from .port import Port - from .port_fragment import PortFragment - from .rdp_connection import RdpConnection - from .resize_lab_virtual_machine_properties import ResizeLabVirtualMachineProperties - from .resource import Resource - from .retarget_schedule_properties import RetargetScheduleProperties - from .secret import Secret - from .secret_fragment import SecretFragment - from .service_fabric import ServiceFabric - from .service_fabric_fragment import ServiceFabricFragment - from .service_runner import ServiceRunner - from .shutdown_notification_content import ShutdownNotificationContent - from .subnet import Subnet - from .subnet_fragment import SubnetFragment - from .subnet_shared_public_ip_address_configuration import SubnetSharedPublicIpAddressConfiguration - from .subnet_override import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment import SubnetOverrideFragment - from .update_resource import UpdateResource - from .user_identity import UserIdentity - from .user_secret_store import UserSecretStore - from .user import User - from .user_identity_fragment import UserIdentityFragment - from .user_secret_store_fragment import UserSecretStoreFragment - from .user_fragment import UserFragment - from .virtual_network import VirtualNetwork - from .virtual_network_fragment import VirtualNetworkFragment -from .operation_metadata_paged import OperationMetadataPaged -from .lab_paged import LabPaged -from .lab_vhd_paged import LabVhdPaged -from .schedule_paged import SchedulePaged -from .artifact_source_paged import ArtifactSourcePaged -from .arm_template_paged import ArmTemplatePaged -from .artifact_paged import ArtifactPaged -from .custom_image_paged import CustomImagePaged -from .formula_paged import FormulaPaged -from .gallery_image_paged import GalleryImagePaged -from .notification_channel_paged import NotificationChannelPaged -from .policy_paged import PolicyPaged -from .service_runner_paged import ServiceRunnerPaged -from .user_paged import UserPaged -from .disk_paged import DiskPaged -from .dtl_environment_paged import DtlEnvironmentPaged -from .secret_paged import SecretPaged -from .service_fabric_paged import ServiceFabricPaged -from .lab_virtual_machine_paged import LabVirtualMachinePaged -from .virtual_network_paged import VirtualNetworkPaged -from .dev_test_labs_client_enums import ( + from ._models import ApplicableSchedule + from ._models import ApplicableScheduleFragment + from ._models import ApplyArtifactsRequest + from ._models import ArmTemplate + from ._models import ArmTemplateInfo + from ._models import ArmTemplateParameterProperties + from ._models import ArmTemplateParameterPropertiesFragment + from ._models import Artifact + from ._models import ArtifactDeploymentStatusProperties + from ._models import ArtifactDeploymentStatusPropertiesFragment + from ._models import ArtifactInstallProperties + from ._models import ArtifactInstallPropertiesFragment + from ._models import ArtifactParameterProperties + from ._models import ArtifactParameterPropertiesFragment + from ._models import ArtifactSource + from ._models import ArtifactSourceFragment + from ._models import AttachDiskProperties + from ._models import AttachNewDataDiskOptions + from ._models import AttachNewDataDiskOptionsFragment + from ._models import BulkCreationParameters + from ._models import BulkCreationParametersFragment + from ._models import ComputeDataDisk + from ._models import ComputeDataDiskFragment + from ._models import ComputeVmInstanceViewStatus + from ._models import ComputeVmInstanceViewStatusFragment + from ._models import ComputeVmProperties + from ._models import ComputeVmPropertiesFragment + from ._models import CostThresholdProperties + from ._models import CustomImage + from ._models import CustomImageFragment + from ._models import CustomImagePropertiesCustom + from ._models import CustomImagePropertiesCustomFragment + from ._models import CustomImagePropertiesFromPlan + from ._models import CustomImagePropertiesFromPlanFragment + from ._models import CustomImagePropertiesFromVm + from ._models import CustomImagePropertiesFromVmFragment + from ._models import DataDiskProperties + from ._models import DataDiskPropertiesFragment + from ._models import DataDiskStorageTypeInfo + from ._models import DataDiskStorageTypeInfoFragment + from ._models import DayDetails + from ._models import DayDetailsFragment + from ._models import DetachDataDiskProperties + from ._models import DetachDiskProperties + from ._models import Disk + from ._models import DiskFragment + from ._models import DtlEnvironment + from ._models import DtlEnvironmentFragment + from ._models import EnvironmentDeploymentProperties + from ._models import EnvironmentDeploymentPropertiesFragment + from ._models import EvaluatePoliciesProperties + from ._models import EvaluatePoliciesRequest + from ._models import EvaluatePoliciesResponse + from ._models import Event + from ._models import EventFragment + from ._models import ExportResourceUsageParameters + from ._models import ExternalSubnet + from ._models import ExternalSubnetFragment + from ._models import Formula + from ._models import FormulaFragment + from ._models import FormulaPropertiesFromVm + from ._models import FormulaPropertiesFromVmFragment + from ._models import GalleryImage + from ._models import GalleryImageReference + from ._models import GalleryImageReferenceFragment + from ._models import GenerateArmTemplateRequest + from ._models import GenerateUploadUriParameter + from ._models import GenerateUploadUriResponse + from ._models import HourDetails + from ._models import HourDetailsFragment + from ._models import IdentityProperties + from ._models import ImportLabVirtualMachineRequest + from ._models import InboundNatRule + from ._models import InboundNatRuleFragment + from ._models import Lab + from ._models import LabAnnouncementProperties + from ._models import LabAnnouncementPropertiesFragment + from ._models import LabCost + from ._models import LabCostDetailsProperties + from ._models import LabCostSummaryProperties + from ._models import LabFragment + from ._models import LabResourceCostProperties + from ._models import LabSupportProperties + from ._models import LabSupportPropertiesFragment + from ._models import LabVhd + from ._models import LabVirtualMachine + from ._models import LabVirtualMachineCreationParameter + from ._models import LabVirtualMachineCreationParameterFragment + from ._models import LabVirtualMachineFragment + from ._models import LinuxOsInfo + from ._models import LinuxOsInfoFragment + from ._models import NetworkInterfaceProperties + from ._models import NetworkInterfacePropertiesFragment + from ._models import NotificationChannel + from ._models import NotificationChannelFragment + from ._models import NotificationSettings + from ._models import NotificationSettingsFragment + from ._models import NotifyParameters + from ._models import OperationError + from ._models import OperationMetadata + from ._models import OperationMetadataDisplay + from ._models import OperationResult + from ._models import ParameterInfo + from ._models import ParametersValueFileInfo + from ._models import PercentageCostThresholdProperties + from ._models import Policy + from ._models import PolicyFragment + from ._models import PolicySetResult + from ._models import PolicyViolation + from ._models import Port + from ._models import PortFragment + from ._models import RdpConnection + from ._models import ResizeLabVirtualMachineProperties + from ._models import Resource + from ._models import RetargetScheduleProperties + from ._models import Schedule + from ._models import ScheduleCreationParameter + from ._models import ScheduleCreationParameterFragment + from ._models import ScheduleFragment + from ._models import Secret + from ._models import SecretFragment + from ._models import ServiceFabric + from ._models import ServiceFabricFragment + from ._models import ServiceRunner + from ._models import SharedPublicIpAddressConfiguration + from ._models import SharedPublicIpAddressConfigurationFragment + from ._models import ShutdownNotificationContent + from ._models import Subnet + from ._models import SubnetFragment + from ._models import SubnetOverride + from ._models import SubnetOverrideFragment + from ._models import SubnetSharedPublicIpAddressConfiguration + from ._models import SubnetSharedPublicIpAddressConfigurationFragment + from ._models import TargetCostProperties + from ._models import UpdateResource + from ._models import User + from ._models import UserFragment + from ._models import UserIdentity + from ._models import UserIdentityFragment + from ._models import UserSecretStore + from ._models import UserSecretStoreFragment + from ._models import VirtualNetwork + from ._models import VirtualNetworkFragment + from ._models import WeekDetails + from ._models import WeekDetailsFragment + from ._models import WindowsOsInfo + from ._models import WindowsOsInfoFragment +from ._paged_models import ArmTemplatePaged +from ._paged_models import ArtifactPaged +from ._paged_models import ArtifactSourcePaged +from ._paged_models import CustomImagePaged +from ._paged_models import DiskPaged +from ._paged_models import DtlEnvironmentPaged +from ._paged_models import FormulaPaged +from ._paged_models import GalleryImagePaged +from ._paged_models import LabPaged +from ._paged_models import LabVhdPaged +from ._paged_models import LabVirtualMachinePaged +from ._paged_models import NotificationChannelPaged +from ._paged_models import OperationMetadataPaged +from ._paged_models import PolicyPaged +from ._paged_models import SchedulePaged +from ._paged_models import SecretPaged +from ._paged_models import ServiceFabricPaged +from ._paged_models import UserPaged +from ._paged_models import VirtualNetworkPaged +from ._dev_test_labs_client_enums import ( EnableStatus, SourceControlType, StorageType, @@ -351,22 +350,9 @@ ) __all__ = [ - 'WeekDetails', - 'DayDetails', - 'HourDetails', - 'NotificationSettings', - 'Schedule', 'ApplicableSchedule', - 'WeekDetailsFragment', - 'DayDetailsFragment', - 'HourDetailsFragment', - 'NotificationSettingsFragment', - 'ScheduleFragment', 'ApplicableScheduleFragment', - 'ArtifactParameterProperties', - 'ArtifactInstallProperties', 'ApplyArtifactsRequest', - 'ParametersValueFileInfo', 'ArmTemplate', 'ArmTemplateInfo', 'ArmTemplateParameterProperties', @@ -374,8 +360,10 @@ 'Artifact', 'ArtifactDeploymentStatusProperties', 'ArtifactDeploymentStatusPropertiesFragment', - 'ArtifactParameterPropertiesFragment', + 'ArtifactInstallProperties', 'ArtifactInstallPropertiesFragment', + 'ArtifactParameterProperties', + 'ArtifactParameterPropertiesFragment', 'ArtifactSource', 'ArtifactSourceFragment', 'AttachDiskProperties', @@ -389,115 +377,126 @@ 'ComputeVmInstanceViewStatusFragment', 'ComputeVmProperties', 'ComputeVmPropertiesFragment', - 'PercentageCostThresholdProperties', 'CostThresholdProperties', - 'WindowsOsInfo', - 'LinuxOsInfo', - 'CustomImagePropertiesFromVm', - 'CustomImagePropertiesCustom', - 'DataDiskStorageTypeInfo', - 'CustomImagePropertiesFromPlan', 'CustomImage', - 'WindowsOsInfoFragment', - 'LinuxOsInfoFragment', - 'CustomImagePropertiesFromVmFragment', + 'CustomImageFragment', + 'CustomImagePropertiesCustom', 'CustomImagePropertiesCustomFragment', - 'DataDiskStorageTypeInfoFragment', + 'CustomImagePropertiesFromPlan', 'CustomImagePropertiesFromPlanFragment', - 'CustomImageFragment', + 'CustomImagePropertiesFromVm', + 'CustomImagePropertiesFromVmFragment', 'DataDiskProperties', 'DataDiskPropertiesFragment', + 'DataDiskStorageTypeInfo', + 'DataDiskStorageTypeInfoFragment', + 'DayDetails', + 'DayDetailsFragment', 'DetachDataDiskProperties', 'DetachDiskProperties', 'Disk', 'DiskFragment', - 'EnvironmentDeploymentProperties', 'DtlEnvironment', - 'EnvironmentDeploymentPropertiesFragment', 'DtlEnvironmentFragment', + 'EnvironmentDeploymentProperties', + 'EnvironmentDeploymentPropertiesFragment', 'EvaluatePoliciesProperties', 'EvaluatePoliciesRequest', - 'PolicyViolation', - 'PolicySetResult', 'EvaluatePoliciesResponse', 'Event', 'EventFragment', 'ExportResourceUsageParameters', 'ExternalSubnet', 'ExternalSubnetFragment', - 'GalleryImageReference', - 'InboundNatRule', - 'SharedPublicIpAddressConfiguration', - 'NetworkInterfaceProperties', - 'ScheduleCreationParameter', - 'LabVirtualMachineCreationParameter', - 'FormulaPropertiesFromVm', 'Formula', - 'GalleryImageReferenceFragment', - 'InboundNatRuleFragment', - 'SharedPublicIpAddressConfigurationFragment', - 'NetworkInterfacePropertiesFragment', - 'ScheduleCreationParameterFragment', - 'LabVirtualMachineCreationParameterFragment', - 'FormulaPropertiesFromVmFragment', 'FormulaFragment', + 'FormulaPropertiesFromVm', + 'FormulaPropertiesFromVmFragment', 'GalleryImage', - 'ParameterInfo', + 'GalleryImageReference', + 'GalleryImageReferenceFragment', 'GenerateArmTemplateRequest', 'GenerateUploadUriParameter', 'GenerateUploadUriResponse', + 'HourDetails', + 'HourDetailsFragment', 'IdentityProperties', 'ImportLabVirtualMachineRequest', - 'LabAnnouncementProperties', - 'LabSupportProperties', + 'InboundNatRule', + 'InboundNatRuleFragment', 'Lab', + 'LabAnnouncementProperties', 'LabAnnouncementPropertiesFragment', - 'TargetCostProperties', - 'LabCostSummaryProperties', + 'LabCost', 'LabCostDetailsProperties', + 'LabCostSummaryProperties', + 'LabFragment', 'LabResourceCostProperties', - 'LabCost', + 'LabSupportProperties', 'LabSupportPropertiesFragment', - 'LabFragment', 'LabVhd', 'LabVirtualMachine', + 'LabVirtualMachineCreationParameter', + 'LabVirtualMachineCreationParameterFragment', 'LabVirtualMachineFragment', + 'LinuxOsInfo', + 'LinuxOsInfoFragment', + 'NetworkInterfaceProperties', + 'NetworkInterfacePropertiesFragment', 'NotificationChannel', 'NotificationChannelFragment', + 'NotificationSettings', + 'NotificationSettingsFragment', 'NotifyParameters', 'OperationError', - 'OperationMetadataDisplay', 'OperationMetadata', + 'OperationMetadataDisplay', 'OperationResult', + 'ParameterInfo', + 'ParametersValueFileInfo', + 'PercentageCostThresholdProperties', 'Policy', 'PolicyFragment', + 'PolicySetResult', + 'PolicyViolation', 'Port', 'PortFragment', 'RdpConnection', 'ResizeLabVirtualMachineProperties', 'Resource', 'RetargetScheduleProperties', + 'Schedule', + 'ScheduleCreationParameter', + 'ScheduleCreationParameterFragment', + 'ScheduleFragment', 'Secret', 'SecretFragment', 'ServiceFabric', 'ServiceFabricFragment', 'ServiceRunner', + 'SharedPublicIpAddressConfiguration', + 'SharedPublicIpAddressConfigurationFragment', 'ShutdownNotificationContent', 'Subnet', 'SubnetFragment', - 'SubnetSharedPublicIpAddressConfiguration', 'SubnetOverride', - 'SubnetSharedPublicIpAddressConfigurationFragment', 'SubnetOverrideFragment', + 'SubnetSharedPublicIpAddressConfiguration', + 'SubnetSharedPublicIpAddressConfigurationFragment', + 'TargetCostProperties', 'UpdateResource', - 'UserIdentity', - 'UserSecretStore', 'User', + 'UserFragment', + 'UserIdentity', 'UserIdentityFragment', + 'UserSecretStore', 'UserSecretStoreFragment', - 'UserFragment', 'VirtualNetwork', 'VirtualNetworkFragment', + 'WeekDetails', + 'WeekDetailsFragment', + 'WindowsOsInfo', + 'WindowsOsInfoFragment', 'OperationMetadataPaged', 'LabPaged', 'LabVhdPaged', @@ -510,7 +509,6 @@ 'GalleryImagePaged', 'NotificationChannelPaged', 'PolicyPaged', - 'ServiceRunnerPaged', 'UserPaged', 'DiskPaged', 'DtlEnvironmentPaged', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py index 035e4b81b91c..6a60d733ee01 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py @@ -28,6 +28,7 @@ class StorageType(str, Enum): standard = "Standard" premium = "Premium" + standard_ssd = "StandardSSD" class CostThresholdStatus(str, Enum): @@ -80,6 +81,7 @@ class VirtualMachineCreationSource(str, Enum): from_custom_image = "FromCustomImage" from_gallery_image = "FromGalleryImage" + from_shared_gallery_image = "FromSharedGalleryImage" class FileUploadOptions(str, Enum): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py new file mode 100644 index 000000000000..cd489495c90c --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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 Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, **kwargs): + super(ApplicableSchedule, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, **kwargs): + super(ApplicableScheduleFragment, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, **kwargs): + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = kwargs.get('artifacts', None) + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'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}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ArmTemplate, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = kwargs.get('template', None) + self.parameters = kwargs.get('parameters', None) + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'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}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Artifact, self).__init__(**kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSource, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSourceFragment, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', 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 CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = kwargs.get('threshold_id', None) + self.percentage_threshold = kwargs.get('percentage_threshold', None) + self.display_on_chart = kwargs.get('display_on_chart', None) + self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) + self.notification_sent = kwargs.get('notification_sent', None) + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImage, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.creation_date = None + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CustomImageFragment, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetails, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.created_date = None + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskFragment, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironmentFragment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.value_offset = kwargs.get('value_offset', None) + self.user_object_id = kwargs.get('user_object_id', None) + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = kwargs.get('policies', None) + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Event, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventFragment, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) + self.usage_start_date = kwargs.get('usage_start_date', None) + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnet, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Formula, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.creation_date = None + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, **kwargs): + super(FormulaFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'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}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GalleryImage, self).__init__(**kwargs) + self.author = kwargs.get('author', None) + self.created_date = None + self.description = kwargs.get('description', None) + self.image_reference = kwargs.get('image_reference', None) + self.icon = kwargs.get('icon', None) + self.enabled = kwargs.get('enabled', None) + self.plan_id = kwargs.get('plan_id', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = kwargs.get('virtual_machine_name', None) + self.parameters = kwargs.get('parameters', None) + self.location = kwargs.get('location', None) + self.file_upload_options = kwargs.get('file_upload_options', None) + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = kwargs.get('blob_name', None) + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = kwargs.get('upload_uri', None) + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetails, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.client_secret_url = kwargs.get('client_secret_url', None) + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) + self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Lab, self).__init__(**kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.created_date = None + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = kwargs.get('extended_properties', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCost, self).__init__(**kwargs) + self.target_cost = kwargs.get('target_cost', None) + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = kwargs.get('currency_code', None) + self.start_date_time = kwargs.get('start_date_time', None) + self.end_date_time = kwargs.get('end_date_time', None) + self.created_date = kwargs.get('created_date', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.cost = kwargs.get('cost', None) + self.cost_type = kwargs.get('cost_type', None) + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabFragment, self).__init__(**kwargs) + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.extended_properties = kwargs.get('extended_properties', None) + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = kwargs.get('resourcename', None) + self.resource_uid = kwargs.get('resource_uid', None) + self.resource_cost = kwargs.get('resource_cost', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_owner = kwargs.get('resource_owner', None) + self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) + self.resource_status = kwargs.get('resource_status', None) + self.resource_id = kwargs.get('resource_id', None) + self.external_resource_id = kwargs.get('external_resource_id', None) + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVhd, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachine, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.compute_vm = None + self.network_interface = kwargs.get('network_interface', None) + self.applicable_schedule = None + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineFragment, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationChannel, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, **kwargs): + super(NotificationChannelFragment, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettings, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + self.json_payload = kwargs.get('json_payload', None) + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, **kwargs): + super(OperationMetadata, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name 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(OperationMetadataDisplay, 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 OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_code = kwargs.get('status_code', None) + self.error = kwargs.get('error', None) + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ParameterInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = kwargs.get('file_name', None) + self.parameters_value_info = kwargs.get('parameters_value_info', None) + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = kwargs.get('threshold_value', None) + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Policy, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, **kwargs): + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = kwargs.get('has_error', None) + self.policy_violations = kwargs.get('policy_violations', None) + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyViolation, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Port, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RdpConnection, self).__init__(**kwargs) + self.contents = kwargs.get('contents', None) + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = kwargs.get('size', None) + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = kwargs.get('current_resource_id', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Schedule, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.created_date = None + self.target_resource_id = kwargs.get('target_resource_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScheduleFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Secret, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretFragment, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabric, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabricFragment, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, **kwargs): + super(ServiceRunner, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = kwargs.get('skip_url', None) + self.delay_url60 = kwargs.get('delay_url60', None) + self.delay_url120 = kwargs.get('delay_url120', None) + self.vm_name = kwargs.get('vm_name', None) + self.guid = kwargs.get('guid', None) + self.owner = kwargs.get('owner', None) + self.vm_url = kwargs.get('vm_url', None) + self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) + self.event_type = kwargs.get('event_type', None) + self.text = kwargs.get('text', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.lab_name = kwargs.get('lab_name', None) + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Subnet, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetCostProperties, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.target = kwargs.get('target', None) + self.cost_thresholds = kwargs.get('cost_thresholds', None) + self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) + self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) + self.cycle_type = kwargs.get('cycle_type', None) + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, **kwargs): + super(UserFragment, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetwork, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.external_subnets = None + self.subnet_overrides = kwargs.get('subnet_overrides', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkFragment, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.subnet_overrides = kwargs.get('subnet_overrides', None) + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py new file mode 100644 index 000000000000..17a0bd5726ce --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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 Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, *, artifacts=None, **kwargs) -> None: + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = artifacts + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'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}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, *, template=None, parameters=None, **kwargs) -> None: + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = template + self.parameters = parameters + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'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}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Artifact, self).__init__(location=location, tags=tags, **kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = instance_count + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = instance_count + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +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 CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = threshold_id + self.percentage_threshold = percentage_threshold + self.display_on_chart = display_on_chart + self.send_notification_when_exceeded = send_notification_when_exceeded + self.notification_sent = notification_sent + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.creation_date = None + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImageFragment, self).__init__(tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetails, self).__init__(**kwargs) + self.time = time + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = time + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = existing_lab_disk_id + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.created_date = None + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(DiskFragment, self).__init__(tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = fact_name + self.fact_data = fact_data + self.value_offset = value_offset + self.user_object_id = user_object_id + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, *, policies=None, **kwargs) -> None: + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = policies + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, *, results=None, **kwargs) -> None: + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = results + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(Event, self).__init__(**kwargs) + self.event_name = event_name + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(EventFragment, self).__init__(**kwargs) + self.event_name = event_name + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri + self.usage_start_date = usage_start_date + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnet, self).__init__(**kwargs) + self.id = id + self.name = name + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = id + self.name = name + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(Formula, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.creation_date = None + self.formula_content = formula_content + self.vm = vm + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(FormulaFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.formula_content = formula_content + self.vm = vm + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'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}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) + self.author = author + self.created_date = None + self.description = description + self.image_reference = image_reference + self.icon = icon + self.enabled = enabled + self.plan_id = plan_id + self.is_plan_authorized = is_plan_authorized + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = virtual_machine_name + self.parameters = parameters + self.location = location + self.file_upload_options = file_upload_options + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, *, blob_name: str=None, **kwargs) -> None: + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = blob_name + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, *, upload_uri: str=None, **kwargs) -> None: + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = upload_uri + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetails, self).__init__(**kwargs) + self.minute = minute + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = minute + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id + self.client_secret_url = client_secret_url + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = source_virtual_machine_resource_id + self.destination_virtual_machine_name = destination_virtual_machine_name + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(Lab, self).__init__(location=location, tags=tags, **kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.created_date = None + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = extended_properties + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: + super(LabCost, self).__init__(location=location, tags=tags, **kwargs) + self.target_cost = target_cost + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = currency_code + self.start_date_time = start_date_time + self.end_date_time = end_date_time + self.created_date = created_date + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = date_property + self.cost = cost + self.cost_type = cost_type + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = estimated_lab_cost + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(LabFragment, self).__init__(tags=tags, **kwargs) + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.extended_properties = extended_properties + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = resourcename + self.resource_uid = resource_uid + self.resource_cost = resource_cost + self.resource_type = resource_type + self.resource_owner = resource_owner + self.resource_pricing_tier = resource_pricing_tier + self.resource_status = resource_status + self.resource_id = resource_id + self.external_resource_id = external_resource_id + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(LabVhd, self).__init__(**kwargs) + self.id = id + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.compute_vm = None + self.network_interface = network_interface + self.applicable_schedule = None + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettings, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = event_name + self.json_payload = json_payload + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :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(OperationError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(OperationMetadata, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name 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(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: + super(OperationResult, self).__init__(**kwargs) + self.status = status + self.status_code = status_code + self.error = error + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ParameterInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = file_name + self.parameters_value_info = parameters_value_info + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, *, threshold_value: float=None, **kwargs) -> None: + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = threshold_value + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(Policy, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(PolicyFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = has_error + self.policy_violations = policy_violations + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :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(PolicyViolation, self).__init__(**kwargs) + self.code = code + self.message = message + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(Port, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, *, contents: str=None, **kwargs) -> None: + super(RdpConnection, self).__init__(**kwargs) + self.contents = contents + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, *, size: str=None, **kwargs) -> None: + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = size + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = current_resource_id + self.target_resource_id = target_resource_id + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(Schedule, self).__init__(location=location, tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.created_date = None + self.target_resource_id = target_resource_id + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(ScheduleFragment, self).__init__(tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: + super(Secret, self).__init__(location=location, tags=tags, **kwargs) + self.value = value + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: + super(SecretFragment, self).__init__(tags=tags, **kwargs) + self.value = value + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: + super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = skip_url + self.delay_url60 = delay_url60 + self.delay_url120 = delay_url120 + self.vm_name = vm_name + self.guid = guid + self.owner = owner + self.vm_url = vm_url + self.minutes_until_shutdown = minutes_until_shutdown + self.event_type = event_type + self.text = text + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.lab_name = lab_name + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(Subnet, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: + super(TargetCostProperties, self).__init__(**kwargs) + self.status = status + self.target = target + self.cost_thresholds = cost_thresholds + self.cycle_start_date_time = cycle_start_date_time + self.cycle_end_date_time = cycle_end_date_time + self.cycle_type = cycle_type + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(User, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(UserFragment, self).__init__(tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'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}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.external_subnets = None + self.subnet_overrides = subnet_overrides + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.subnet_overrides = subnet_overrides + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = windows_os_state + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py new file mode 100644 index 000000000000..3e947c89d709 --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py @@ -0,0 +1,261 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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 OperationMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationMetadataPaged, self).__init__(*args, **kwargs) +class LabPaged(Paged): + """ + A paging container for iterating over a list of :class:`Lab ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Lab]'} + } + + def __init__(self, *args, **kwargs): + + super(LabPaged, self).__init__(*args, **kwargs) +class LabVhdPaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVhd ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVhd]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVhdPaged, self).__init__(*args, **kwargs) +class SchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`Schedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Schedule]'} + } + + def __init__(self, *args, **kwargs): + + super(SchedulePaged, self).__init__(*args, **kwargs) +class ArtifactSourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArtifactSource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactSourcePaged, self).__init__(*args, **kwargs) +class ArmTemplatePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArmTemplate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} + } + + def __init__(self, *args, **kwargs): + + super(ArmTemplatePaged, self).__init__(*args, **kwargs) +class ArtifactPaged(Paged): + """ + A paging container for iterating over a list of :class:`Artifact ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Artifact]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactPaged, self).__init__(*args, **kwargs) +class CustomImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`CustomImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CustomImage]'} + } + + def __init__(self, *args, **kwargs): + + super(CustomImagePaged, self).__init__(*args, **kwargs) +class FormulaPaged(Paged): + """ + A paging container for iterating over a list of :class:`Formula ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Formula]'} + } + + def __init__(self, *args, **kwargs): + + super(FormulaPaged, self).__init__(*args, **kwargs) +class GalleryImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryImage]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryImagePaged, self).__init__(*args, **kwargs) +class NotificationChannelPaged(Paged): + """ + A paging container for iterating over a list of :class:`NotificationChannel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} + } + + def __init__(self, *args, **kwargs): + + super(NotificationChannelPaged, self).__init__(*args, **kwargs) +class PolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`Policy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Policy]'} + } + + def __init__(self, *args, **kwargs): + + super(PolicyPaged, self).__init__(*args, **kwargs) +class UserPaged(Paged): + """ + A paging container for iterating over a list of :class:`User ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[User]'} + } + + def __init__(self, *args, **kwargs): + + super(UserPaged, self).__init__(*args, **kwargs) +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class DtlEnvironmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DtlEnvironment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} + } + + def __init__(self, *args, **kwargs): + + super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) +class SecretPaged(Paged): + """ + A paging container for iterating over a list of :class:`Secret ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Secret]'} + } + + def __init__(self, *args, **kwargs): + + super(SecretPaged, self).__init__(*args, **kwargs) +class ServiceFabricPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceFabric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceFabricPaged, self).__init__(*args, **kwargs) +class LabVirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) +class VirtualNetworkPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetwork ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py deleted file mode 100644 index bbdc049f2f3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, **kwargs): - super(ApplicableSchedule, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py deleted file mode 100644 index 8139b26bbb37..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, **kwargs): - super(ApplicableScheduleFragment, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py deleted file mode 100644 index d1ddb7b37caa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py deleted file mode 100644 index dabce38bbcae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py deleted file mode 100644 index 5576e79bf0ad..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.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 ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, **kwargs): - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = kwargs.get('artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py deleted file mode 100644 index 2e5de7eca69f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, *, artifacts=None, **kwargs) -> None: - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py deleted file mode 100644 index 9ff3ebed92de..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.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 ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'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}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ArmTemplate, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py deleted file mode 100644 index 9706cf3d1122..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.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 ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = kwargs.get('template', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py deleted file mode 100644 index 6194e4d20559..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_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 ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, *, template=None, parameters=None, **kwargs) -> None: - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = template - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py deleted file mode 100644 index e209fa704487..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_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 ArmTemplatePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArmTemplate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} - } - - def __init__(self, *args, **kwargs): - - super(ArmTemplatePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py deleted file mode 100644 index 9c939b46ff98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.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 ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py deleted file mode 100644 index c73b8c260aee..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.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 ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py deleted file mode 100644 index ca110d0ee441..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_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 ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py deleted file mode 100644 index 16ab6753be2e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_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 ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py deleted file mode 100644 index 64b55696e79c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.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_py3 import Resource - - -class ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'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}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py deleted file mode 100644 index cf1884020662..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'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}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(Artifact, self).__init__(**kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py deleted file mode 100644 index 00e10ab200d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py deleted file mode 100644 index b5231c92c635..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py deleted file mode 100644 index d3dd5372ef6d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py deleted file mode 100644 index 5b38610af59e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py deleted file mode 100644 index 7a976ea8f7b1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py deleted file mode 100644 index 0149af16d549..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py deleted file mode 100644 index 4aa552477186..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py deleted file mode 100644 index 3df682e56bc6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py deleted file mode 100644 index 67c8e3601237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_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 ArtifactPaged(Paged): - """ - A paging container for iterating over a list of :class:`Artifact ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Artifact]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py deleted file mode 100644 index 546480baabd2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.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 ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py deleted file mode 100644 index 77be250d5e11..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.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 ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py deleted file mode 100644 index 326ea3643623..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_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 ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py deleted file mode 100644 index c3ef4207b385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_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 ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py deleted file mode 100644 index 9e36ad2abf3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'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}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Artifact, self).__init__(location=location, tags=tags, **kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py deleted file mode 100644 index ba6cbfc20988..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSource, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py deleted file mode 100644 index 3c07b25eeb13..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.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 .update_resource import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSourceFragment, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py deleted file mode 100644 index a243837b76d0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_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 .update_resource_py3 import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py deleted file mode 100644 index d5990ee0e94f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_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 ArtifactSourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArtifactSource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactSourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py deleted file mode 100644 index 53eeac5462f6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py deleted file mode 100644 index 1935925ef669..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.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 AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py deleted file mode 100644 index 6cf94213e53e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py deleted file mode 100644 index c4c18be9b277..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py deleted file mode 100644 index 4ab7695dd872..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py deleted file mode 100644 index ec8d6863f811..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py deleted file mode 100644 index a03bb685e96c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py deleted file mode 100644 index f54138ff7a98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.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 BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py deleted file mode 100644 index 1f03bf7aeffd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.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 BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py deleted file mode 100644 index 3d78014f88c5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_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 BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py deleted file mode 100644 index c17ac0c6da94..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_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 BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py deleted file mode 100644 index 36637b964ecc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.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 ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py deleted file mode 100644 index 5dc673a52f22..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.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 ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py deleted file mode 100644 index 22fcaa4b3ad8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_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 ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py deleted file mode 100644 index c88f007a5c0d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_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 ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py deleted file mode 100644 index 896d9562e61d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.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 ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py deleted file mode 100644 index 2b403562e4df..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.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 ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py deleted file mode 100644 index 81b1bd388f89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_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 ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py deleted file mode 100644 index 75fca83157a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_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 ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py deleted file mode 100644 index e4b785b9c47a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.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 ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py deleted file mode 100644 index c6295526ebd6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py deleted file mode 100644 index 7668ed7983c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py deleted file mode 100644 index 90c4ae4e246a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_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 ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py deleted file mode 100644 index 73269a4dd25d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.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 msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = kwargs.get('threshold_id', None) - self.percentage_threshold = kwargs.get('percentage_threshold', None) - self.display_on_chart = kwargs.get('display_on_chart', None) - self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) - self.notification_sent = kwargs.get('notification_sent', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py deleted file mode 100644 index fba335d6c3e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_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 msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = threshold_id - self.percentage_threshold = percentage_threshold - self.display_on_chart = display_on_chart - self.send_notification_when_exceeded = send_notification_when_exceeded - self.notification_sent = notification_sent diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py deleted file mode 100644 index 136ee0481ee1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImage, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.creation_date = None - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py deleted file mode 100644 index 5ac36c53a6cd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(CustomImageFragment, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py deleted file mode 100644 index a3ccac2274eb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImageFragment, self).__init__(tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py deleted file mode 100644 index d0e4b61d4560..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_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 CustomImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`CustomImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CustomImage]'} - } - - def __init__(self, *args, **kwargs): - - super(CustomImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py deleted file mode 100644 index a1bd5ab66712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.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 CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py deleted file mode 100644 index 4fc581738e57..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py deleted file mode 100644 index 3869682ca53d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py deleted file mode 100644 index 5aede6b5507c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_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 CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py deleted file mode 100644 index 37067a750936..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py deleted file mode 100644 index b8db62a3738f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py deleted file mode 100644 index 159740e13c32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py deleted file mode 100644 index fcbfeea22012..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py deleted file mode 100644 index d08828df0def..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.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 CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py deleted file mode 100644 index c0274dab51e7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py deleted file mode 100644 index 437a4005cf1e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py deleted file mode 100644 index 02a54467b6a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_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 CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py deleted file mode 100644 index fd4736a3744b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.creation_date = None - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py deleted file mode 100644 index 7bbfad08d256..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_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 DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py deleted file mode 100644 index 71e152680e3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.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 DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py deleted file mode 100644 index d709d92d7113..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_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 DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py deleted file mode 100644 index 9e654d16cd45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_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 DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py deleted file mode 100644 index 68a97bf75845..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.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 DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py deleted file mode 100644 index 62b512b1f863..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.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 DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py deleted file mode 100644 index 9a1c830a7dcb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py deleted file mode 100644 index d817ca84fdd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py deleted file mode 100644 index 7391a793dc1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.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 DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetails, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py deleted file mode 100644 index b4f977d74fdf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.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 DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py deleted file mode 100644 index 38c15b48bc89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_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 DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py deleted file mode 100644 index 593e341169d8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_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 DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetails, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py deleted file mode 100644 index 9e66b91c3832..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.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 DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py deleted file mode 100644 index ece9ea7842fb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = existing_lab_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py deleted file mode 100644 index 2b781ad4f7ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.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 DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py deleted file mode 100644 index bc02a7d21dc2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py deleted file mode 100644 index e61a526ec3f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.created_date = None - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py deleted file mode 100644 index fd351baa9716..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskFragment, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py deleted file mode 100644 index 6becee37891a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(DiskFragment, self).__init__(tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py deleted file mode 100644 index 18396d66590a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_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 DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py deleted file mode 100644 index 5263a0668bcf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.created_date = None - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py deleted file mode 100644 index 47f7a67992f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py deleted file mode 100644 index 14103673db5f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironmentFragment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py deleted file mode 100644 index 9cd4e5caa7bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py deleted file mode 100644 index e7c297f07ffa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_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 DtlEnvironmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DtlEnvironment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} - } - - def __init__(self, *args, **kwargs): - - super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py deleted file mode 100644 index f2fbb899f8cf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py deleted file mode 100644 index 31dc62dfc89e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py deleted file mode 100644 index e441cfd4a17d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.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 EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py deleted file mode 100644 index 1a30a6aef98e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py deleted file mode 100644 index 866bbe7d7ebf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py deleted file mode 100644 index ec21cf9c743e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.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 EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.value_offset = kwargs.get('value_offset', None) - self.user_object_id = kwargs.get('user_object_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py deleted file mode 100644 index 5f45b40617a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_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 EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = fact_name - self.fact_data = fact_data - self.value_offset = value_offset - self.user_object_id = user_object_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py deleted file mode 100644 index 3476c2176cd0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.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 EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = kwargs.get('policies', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py deleted file mode 100644 index 657e3a980fbb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, *, policies=None, **kwargs) -> None: - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = policies diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py deleted file mode 100644 index be1baad1d5a8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.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 EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = kwargs.get('results', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py deleted file mode 100644 index 166eb2130754..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_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 EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, *, results=None, **kwargs) -> None: - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = results diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py deleted file mode 100644 index 98395545b13e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.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 Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Event, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py deleted file mode 100644 index f6d18b5ba3e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.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 EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventFragment, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py deleted file mode 100644 index a785e4b7201a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_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 EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(EventFragment, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py deleted file mode 100644 index faa50f83daea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_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 Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(Event, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py deleted file mode 100644 index 464db115a353..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.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 ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) - self.usage_start_date = kwargs.get('usage_start_date', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py deleted file mode 100644 index f58597733273..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_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 ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri - self.usage_start_date = usage_start_date diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py deleted file mode 100644 index 6f7f1ff89fca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.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 ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnet, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py deleted file mode 100644 index ab2d5769fdab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.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 ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py deleted file mode 100644 index f5f57186e9e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_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 ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py deleted file mode 100644 index 8a780e424313..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_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 ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnet, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py deleted file mode 100644 index e4b18a64b9fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Formula, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.creation_date = None - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py deleted file mode 100644 index f072e37b3036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.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 .update_resource import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, **kwargs): - super(FormulaFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py deleted file mode 100644 index 0f212fb85237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(FormulaFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.formula_content = formula_content - self.vm = vm diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py deleted file mode 100644 index b8ae79e7de9d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_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 FormulaPaged(Paged): - """ - A paging container for iterating over a list of :class:`Formula ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Formula]'} - } - - def __init__(self, *args, **kwargs): - - super(FormulaPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py deleted file mode 100644 index 0811ea901b40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.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 FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py deleted file mode 100644 index 240d0674d57e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.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 FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py deleted file mode 100644 index 1fff926ae626..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py deleted file mode 100644 index 2d7ac51274fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py deleted file mode 100644 index 907919f44485..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(Formula, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.creation_date = None - self.formula_content = formula_content - self.vm = vm - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py deleted file mode 100644 index c16dcfd6e97f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.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 .resource import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'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}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(GalleryImage, self).__init__(**kwargs) - self.author = kwargs.get('author', None) - self.created_date = None - self.description = kwargs.get('description', None) - self.image_reference = kwargs.get('image_reference', None) - self.icon = kwargs.get('icon', None) - self.enabled = kwargs.get('enabled', None) - self.plan_id = kwargs.get('plan_id', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py deleted file mode 100644 index 2712de454c83..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_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 GalleryImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`GalleryImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GalleryImage]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py deleted file mode 100644 index 2097997302c9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.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 .resource_py3 import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'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}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) - self.author = author - self.created_date = None - self.description = description - self.image_reference = image_reference - self.icon = icon - self.enabled = enabled - self.plan_id = plan_id - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py deleted file mode 100644 index c896911316fd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.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 GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py deleted file mode 100644 index 6bd266dbfbd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.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 GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py deleted file mode 100644 index 3ebbfa4662f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_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 GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py deleted file mode 100644 index 2541dc5b63e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_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 GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py deleted file mode 100644 index 3c5fb7b2fafd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.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 GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = kwargs.get('virtual_machine_name', None) - self.parameters = kwargs.get('parameters', None) - self.location = kwargs.get('location', None) - self.file_upload_options = kwargs.get('file_upload_options', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py deleted file mode 100644 index 677085554d25..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_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 GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = virtual_machine_name - self.parameters = parameters - self.location = location - self.file_upload_options = file_upload_options diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py deleted file mode 100644 index 801afae7e028..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.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 GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = kwargs.get('blob_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py deleted file mode 100644 index ebc5724f0614..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_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 GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, *, blob_name: str=None, **kwargs) -> None: - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = blob_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py deleted file mode 100644 index 6b89d3111051..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.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 GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = kwargs.get('upload_uri', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py deleted file mode 100644 index 8807569409ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_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 GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, *, upload_uri: str=None, **kwargs) -> None: - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = upload_uri diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py deleted file mode 100644 index e310a1bbc923..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.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 HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetails, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py deleted file mode 100644 index 3a41af20481d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.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 HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py deleted file mode 100644 index afa962a3c628..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_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 HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py deleted file mode 100644 index 52c323352b24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_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 HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetails, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py deleted file mode 100644 index ed4b127fc39c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.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 IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityProperties, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.client_secret_url = kwargs.get('client_secret_url', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py deleted file mode 100644 index 63fb90a1b974..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_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 IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: - super(IdentityProperties, self).__init__(**kwargs) - self.type = type - self.principal_id = principal_id - self.tenant_id = tenant_id - self.client_secret_url = client_secret_url diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py deleted file mode 100644 index 0c910e9b203e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.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 ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) - self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py deleted file mode 100644 index 6ca10ecff7a6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_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 ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = source_virtual_machine_resource_id - self.destination_virtual_machine_name = destination_virtual_machine_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py deleted file mode 100644 index 56d745d71893..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py deleted file mode 100644 index 034404f9923f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py deleted file mode 100644 index 397d4c523e32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py deleted file mode 100644 index 9ec4bd8a3d52..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py deleted file mode 100644 index e495c96e01fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.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 Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Lab, self).__init__(**kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.created_date = None - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = kwargs.get('extended_properties', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py deleted file mode 100644 index aee243079a09..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.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 LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py deleted file mode 100644 index 9d82a4819afa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py deleted file mode 100644 index 33eea147dcf1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py deleted file mode 100644 index 3d818d58a02f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_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 LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py deleted file mode 100644 index 6825b1e82b74..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCost, self).__init__(**kwargs) - self.target_cost = kwargs.get('target_cost', None) - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = kwargs.get('currency_code', None) - self.start_date_time = kwargs.get('start_date_time', None) - self.end_date_time = kwargs.get('end_date_time', None) - self.created_date = kwargs.get('created_date', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py deleted file mode 100644 index ac7c70074036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = kwargs.get('date_property', None) - self.cost = kwargs.get('cost', None) - self.cost_type = kwargs.get('cost_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py deleted file mode 100644 index f6690c8c2184..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = date_property - self.cost = cost - self.cost_type = cost_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py deleted file mode 100644 index cef3ac68fdf8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: - super(LabCost, self).__init__(location=location, tags=tags, **kwargs) - self.target_cost = target_cost - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = currency_code - self.start_date_time = start_date_time - self.end_date_time = end_date_time - self.created_date = created_date - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py deleted file mode 100644 index edeb814ef472..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.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 LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py deleted file mode 100644 index df5a84f3e609..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_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 LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = estimated_lab_cost diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py deleted file mode 100644 index 2ad6dc84b4ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabFragment, self).__init__(**kwargs) - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.extended_properties = kwargs.get('extended_properties', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py deleted file mode 100644 index c5aa5b816807..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(LabFragment, self).__init__(tags=tags, **kwargs) - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.extended_properties = extended_properties diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py deleted file mode 100644 index 869d4b1dee38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_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 LabPaged(Paged): - """ - A paging container for iterating over a list of :class:`Lab ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Lab]'} - } - - def __init__(self, *args, **kwargs): - - super(LabPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py deleted file mode 100644 index ec30462d9336..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_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 Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(Lab, self).__init__(location=location, tags=tags, **kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.created_date = None - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = extended_properties - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py deleted file mode 100644 index 8883745b9735..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.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 LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = kwargs.get('resourcename', None) - self.resource_uid = kwargs.get('resource_uid', None) - self.resource_cost = kwargs.get('resource_cost', None) - self.resource_type = kwargs.get('resource_type', None) - self.resource_owner = kwargs.get('resource_owner', None) - self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) - self.resource_status = kwargs.get('resource_status', None) - self.resource_id = kwargs.get('resource_id', None) - self.external_resource_id = kwargs.get('external_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py deleted file mode 100644 index 5b360dee84b9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_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 LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = resourcename - self.resource_uid = resource_uid - self.resource_cost = resource_cost - self.resource_type = resource_type - self.resource_owner = resource_owner - self.resource_pricing_tier = resource_pricing_tier - self.resource_status = resource_status - self.resource_id = resource_id - self.external_resource_id = external_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py deleted file mode 100644 index e948a530fa44..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py deleted file mode 100644 index 53bf876c5a2c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.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 LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py deleted file mode 100644 index 0495bf2657d2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_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 LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py deleted file mode 100644 index 0eac2ef2c950..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py deleted file mode 100644 index acb777ea8f1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.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 LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVhd, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py deleted file mode 100644 index 34d5dda853fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_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 LabVhdPaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVhd ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVhd]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVhdPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py deleted file mode 100644 index 7f0adddb42ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_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 LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(LabVhd, self).__init__(**kwargs) - self.id = id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py deleted file mode 100644 index 079a4c3bb59f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachine, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.compute_vm = None - self.network_interface = kwargs.get('network_interface', None) - self.applicable_schedule = None - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py deleted file mode 100644 index db9aad603356..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py deleted file mode 100644 index 2a58002ea2bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py deleted file mode 100644 index d583a499210f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py deleted file mode 100644 index f6df337a6179..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py deleted file mode 100644 index 132affe5f1ba..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineFragment, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py deleted file mode 100644 index 11dca443d47b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py deleted file mode 100644 index 08e2d31e58dc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_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 LabVirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py deleted file mode 100644 index 354acb458cc9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.compute_vm = None - self.network_interface = network_interface - self.applicable_schedule = None - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py deleted file mode 100644 index 70154219e989..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.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 LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py deleted file mode 100644 index a7b98b278ea7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.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 LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py deleted file mode 100644 index b8b4919c8eab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_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 LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py deleted file mode 100644 index a8176b7be240..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_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 LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py deleted file mode 100644 index 67bd4ee0a9fc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py deleted file mode 100644 index e42965548e38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py deleted file mode 100644 index 87854401d799..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py deleted file mode 100644 index c68daf4e897b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py deleted file mode 100644 index 7132c4436c6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationChannel, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py deleted file mode 100644 index 588dee5b2395..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.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 .update_resource import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, **kwargs): - super(NotificationChannelFragment, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py deleted file mode 100644 index a7179388c512..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_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 .update_resource_py3 import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py deleted file mode 100644 index 9a74839b31a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_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 NotificationChannelPaged(Paged): - """ - A paging container for iterating over a list of :class:`NotificationChannel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} - } - - def __init__(self, *args, **kwargs): - - super(NotificationChannelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py deleted file mode 100644 index 08a0f47db1da..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py deleted file mode 100644 index 656eae9f9cb4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.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 NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettings, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py deleted file mode 100644 index bc707e6ecfe7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.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 NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py deleted file mode 100644 index 260ce034f89d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_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 NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py deleted file mode 100644 index 66c77b99768a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_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 NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettings, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py deleted file mode 100644 index 8adc994f1e40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.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 NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) - self.json_payload = kwargs.get('json_payload', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py deleted file mode 100644 index 40b8e900f189..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_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 NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = event_name - self.json_payload = json_payload diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py deleted file mode 100644 index 5ee1f80b2712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.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 OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py deleted file mode 100644 index 19c57b944297..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_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 OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :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(OperationError, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py deleted file mode 100644 index 3551895bd8c6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.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 OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, **kwargs): - super(OperationMetadata, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py deleted file mode 100644 index c20b0b519d3e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.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 OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name 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(OperationMetadataDisplay, 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/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py deleted file mode 100644 index a566cc55bfe8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_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 OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name 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(OperationMetadataDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py deleted file mode 100644 index f0fa25a37bed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_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 OperationMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationMetadataPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py deleted file mode 100644 index c1f8e2997f51..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_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 OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(OperationMetadata, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py deleted file mode 100644 index 90f43aa80f9f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.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 OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, **kwargs): - super(OperationResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.status_code = kwargs.get('status_code', None) - self.error = kwargs.get('error', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py deleted file mode 100644 index cb371c521fb0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: - super(OperationResult, self).__init__(**kwargs) - self.status = status - self.status_code = status_code - self.error = error diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py deleted file mode 100644 index 6e1972e6eace..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.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 ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ParameterInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py deleted file mode 100644 index f35b39ef3fe4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_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 ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ParameterInfo, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py deleted file mode 100644 index a671306eac1c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.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 ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = kwargs.get('file_name', None) - self.parameters_value_info = kwargs.get('parameters_value_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py deleted file mode 100644 index fcbc00df3f23..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_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 ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = file_name - self.parameters_value_info = parameters_value_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py deleted file mode 100644 index 73de17d9ee24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.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 PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = kwargs.get('threshold_value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py deleted file mode 100644 index 22ae6e7d274c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_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 PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, *, threshold_value: float=None, **kwargs) -> None: - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = threshold_value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py deleted file mode 100644 index 96719fffb5d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Policy, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py deleted file mode 100644 index 4d240945e5a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py deleted file mode 100644 index b10648b0cdc7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(PolicyFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py deleted file mode 100644 index 6ef7f073726e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/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 PolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`Policy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Policy]'} - } - - def __init__(self, *args, **kwargs): - - super(PolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py deleted file mode 100644 index 1bfd40ab2402..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(Policy, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py deleted file mode 100644 index 3dc1698dc354..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.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 PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, **kwargs): - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = kwargs.get('has_error', None) - self.policy_violations = kwargs.get('policy_violations', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py deleted file mode 100644 index 5368647ec498..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_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 PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = has_error - self.policy_violations = policy_violations diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py deleted file mode 100644 index b8404db70da6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.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 PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyViolation, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py deleted file mode 100644 index 8f33f97afeed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_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 PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :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(PolicyViolation, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py deleted file mode 100644 index 794610b68871..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.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 Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Port, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py deleted file mode 100644 index 60e28efa9dd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.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 PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py deleted file mode 100644 index dd39e446c5ff..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_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 PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py deleted file mode 100644 index c4b7645a0a18..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_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 Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(Port, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py deleted file mode 100644 index 71926d62a621..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.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 RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RdpConnection, self).__init__(**kwargs) - self.contents = kwargs.get('contents', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py deleted file mode 100644 index 3f92de164fea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_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 RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, *, contents: str=None, **kwargs) -> None: - super(RdpConnection, self).__init__(**kwargs) - self.contents = contents diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py deleted file mode 100644 index 13725ea5e306..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.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 ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = kwargs.get('size', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py deleted file mode 100644 index 266b19149f7a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_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 ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, *, size: str=None, **kwargs) -> None: - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = size diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py deleted file mode 100644 index f25b57698413..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.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 Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, 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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py deleted file mode 100644 index e59df581aa79..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, 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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py deleted file mode 100644 index 210f4a7b2eca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = kwargs.get('current_resource_id', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py deleted file mode 100644 index debd7258fb28..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = current_resource_id - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py deleted file mode 100644 index a0c09919fa48..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Schedule, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.created_date = None - self.target_resource_id = kwargs.get('target_resource_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py deleted file mode 100644 index 1eced41c432d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py deleted file mode 100644 index e3f67d9d59bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.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 ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py deleted file mode 100644 index 47e9ece35bfb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_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 ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py deleted file mode 100644 index 8254f67c85be..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py deleted file mode 100644 index 17cb84a52572..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.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 .update_resource import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ScheduleFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py deleted file mode 100644 index a51222b2406e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_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 .update_resource_py3 import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(ScheduleFragment, self).__init__(tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py deleted file mode 100644 index 1aa4946ff51e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_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 SchedulePaged(Paged): - """ - A paging container for iterating over a list of :class:`Schedule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Schedule]'} - } - - def __init__(self, *args, **kwargs): - - super(SchedulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py deleted file mode 100644 index efd16216ef6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(Schedule, self).__init__(location=location, tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.created_date = None - self.target_resource_id = target_resource_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py deleted file mode 100644 index ae1048a9e9ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.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 .resource import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Secret, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py deleted file mode 100644 index 06df551c944b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.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 .update_resource import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretFragment, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py deleted file mode 100644 index 64907637295e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_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 .update_resource_py3 import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: - super(SecretFragment, self).__init__(tags=tags, **kwargs) - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py deleted file mode 100644 index 1c6a8f295064..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_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 SecretPaged(Paged): - """ - A paging container for iterating over a list of :class:`Secret ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Secret]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py deleted file mode 100644 index 16b45cb8ccde..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_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 .resource_py3 import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: - super(Secret, self).__init__(location=location, tags=tags, **kwargs) - self.value = value - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py deleted file mode 100644 index e8f46ff06337..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.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 .resource import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabric, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py deleted file mode 100644 index 8feb8f2b0dcd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabricFragment, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py deleted file mode 100644 index a1471c5984ea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py deleted file mode 100644 index 7de95722931e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_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 ServiceFabricPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceFabric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceFabricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py deleted file mode 100644 index 50cf5f715bf4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_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 .resource_py3 import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py deleted file mode 100644 index 38d8100572ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.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 .resource import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, **kwargs): - super(ServiceRunner, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py deleted file mode 100644 index c5f8658f70e1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_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 ServiceRunnerPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceRunner ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceRunner]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceRunnerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py deleted file mode 100644 index 5afa18026e0c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: - super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py deleted file mode 100644 index c372a21093bd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.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 SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 48eef7b014cc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.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 SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index d2121254c806..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_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 SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py deleted file mode 100644 index 13c9209e5140..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_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 SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py deleted file mode 100644 index 00b760315ab8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = kwargs.get('skip_url', None) - self.delay_url60 = kwargs.get('delay_url60', None) - self.delay_url120 = kwargs.get('delay_url120', None) - self.vm_name = kwargs.get('vm_name', None) - self.guid = kwargs.get('guid', None) - self.owner = kwargs.get('owner', None) - self.vm_url = kwargs.get('vm_url', None) - self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) - self.event_type = kwargs.get('event_type', None) - self.text = kwargs.get('text', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.lab_name = kwargs.get('lab_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py deleted file mode 100644 index 47242c6a1816..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = skip_url - self.delay_url60 = delay_url60 - self.delay_url120 = delay_url120 - self.vm_name = vm_name - self.guid = guid - self.owner = owner - self.vm_url = vm_url - self.minutes_until_shutdown = minutes_until_shutdown - self.event_type = event_type - self.text = text - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.lab_name = lab_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py deleted file mode 100644 index 520ea0b84c0b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.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 Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Subnet, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py deleted file mode 100644 index db484aef5efc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.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 SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py deleted file mode 100644 index bdca8f51fc58..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py deleted file mode 100644 index c091e516241d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.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 SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py deleted file mode 100644 index 839368724e6a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.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 SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py deleted file mode 100644 index a48b90a27c65..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_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 SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py deleted file mode 100644 index 30ddcbe9a971..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_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 SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py deleted file mode 100644 index 6faba11229c2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(Subnet, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py deleted file mode 100644 index c300efe3e12a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.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 SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 737aba0c3385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.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 SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index b108414e8db0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py deleted file mode 100644 index b0149a863f64..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py deleted file mode 100644 index d6eca3dfd40e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.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 msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TargetCostProperties, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.target = kwargs.get('target', None) - self.cost_thresholds = kwargs.get('cost_thresholds', None) - self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) - self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) - self.cycle_type = kwargs.get('cycle_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py deleted file mode 100644 index 8e79d34b0ed9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_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 msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: - super(TargetCostProperties, self).__init__(**kwargs) - self.status = status - self.target = target - self.cost_thresholds = cost_thresholds - self.cycle_start_date_time = cycle_start_date_time - self.cycle_end_date_time = cycle_end_date_time - self.cycle_type = cycle_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py deleted file mode 100644 index 4849be7f6102..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.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 UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py deleted file mode 100644 index 62a3c23c2164..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_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 UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py deleted file mode 100644 index 28099b85f900..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py deleted file mode 100644 index cd9a685bdbbe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.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 .update_resource import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, **kwargs): - super(UserFragment, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py deleted file mode 100644 index 357a81712e45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_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 .update_resource_py3 import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(UserFragment, self).__init__(tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py deleted file mode 100644 index 557f65e2b82f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.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 UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py deleted file mode 100644 index 0783b56f47b3..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.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 UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py deleted file mode 100644 index 3c2fdb6e005b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_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 UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py deleted file mode 100644 index 03615a6e15b7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_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 UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py deleted file mode 100644 index b48ce5901d56..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_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 UserPaged(Paged): - """ - A paging container for iterating over a list of :class:`User ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[User]'} - } - - def __init__(self, *args, **kwargs): - - super(UserPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py deleted file mode 100644 index 96d981829827..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license 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 User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(User, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py deleted file mode 100644 index de4ee5cb6447..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.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 UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py deleted file mode 100644 index 7789bff72056..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.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 UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py deleted file mode 100644 index 241c44664e06..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_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 UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py deleted file mode 100644 index ad56603f7926..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_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 UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py deleted file mode 100644 index 460ae9a78af0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetwork, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.external_subnets = None - self.subnet_overrides = kwargs.get('subnet_overrides', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py deleted file mode 100644 index 4840d07f21bb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.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 .update_resource import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkFragment, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.subnet_overrides = kwargs.get('subnet_overrides', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py deleted file mode 100644 index bdc572018008..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_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 .update_resource_py3 import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.subnet_overrides = subnet_overrides diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py deleted file mode 100644 index c4a6bac12054..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_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 VirtualNetworkPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetwork ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py deleted file mode 100644 index 4af05c325513..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# 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 VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'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}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.external_subnets = None - self.subnet_overrides = subnet_overrides - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py deleted file mode 100644 index 92d7a61279c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.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 WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py deleted file mode 100644 index f40c5e26d54a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.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 WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py deleted file mode 100644 index 4521250deffc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py deleted file mode 100644 index d3bdddf6f4e4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py deleted file mode 100644 index 377c585b9162..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py deleted file mode 100644 index c54bfea8922a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.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 WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py deleted file mode 100644 index e2009eab0094..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_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 WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py deleted file mode 100644 index 6c59c08b3f5a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py index 89d5496052a3..659acdca2a6c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py @@ -9,31 +9,31 @@ # regenerated. # -------------------------------------------------------------------------- -from .provider_operations import ProviderOperations -from .labs_operations import LabsOperations -from .operations import Operations -from .global_schedules_operations import GlobalSchedulesOperations -from .artifact_sources_operations import ArtifactSourcesOperations -from .arm_templates_operations import ArmTemplatesOperations -from .artifacts_operations import ArtifactsOperations -from .costs_operations import CostsOperations -from .custom_images_operations import CustomImagesOperations -from .formulas_operations import FormulasOperations -from .gallery_images_operations import GalleryImagesOperations -from .notification_channels_operations import NotificationChannelsOperations -from .policy_sets_operations import PolicySetsOperations -from .policies_operations import PoliciesOperations -from .schedules_operations import SchedulesOperations -from .service_runners_operations import ServiceRunnersOperations -from .users_operations import UsersOperations -from .disks_operations import DisksOperations -from .environments_operations import EnvironmentsOperations -from .secrets_operations import SecretsOperations -from .service_fabrics_operations import ServiceFabricsOperations -from .service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .virtual_networks_operations import VirtualNetworksOperations +from ._provider_operations import ProviderOperations +from ._labs_operations import LabsOperations +from ._operations import Operations +from ._global_schedules_operations import GlobalSchedulesOperations +from ._artifact_sources_operations import ArtifactSourcesOperations +from ._arm_templates_operations import ArmTemplatesOperations +from ._artifacts_operations import ArtifactsOperations +from ._costs_operations import CostsOperations +from ._custom_images_operations import CustomImagesOperations +from ._formulas_operations import FormulasOperations +from ._gallery_images_operations import GalleryImagesOperations +from ._notification_channels_operations import NotificationChannelsOperations +from ._policy_sets_operations import PolicySetsOperations +from ._policies_operations import PoliciesOperations +from ._schedules_operations import SchedulesOperations +from ._service_runners_operations import ServiceRunnersOperations +from ._users_operations import UsersOperations +from ._disks_operations import DisksOperations +from ._environments_operations import EnvironmentsOperations +from ._secrets_operations import SecretsOperations +from ._service_fabrics_operations import ServiceFabricsOperations +from ._service_fabric_schedules_operations import ServiceFabricSchedulesOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_schedules_operations import VirtualMachineSchedulesOperations +from ._virtual_networks_operations import VirtualNetworksOperations __all__ = [ 'ProviderOperations', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py similarity index 95% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py index fd4567544366..245a750452de 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py @@ -19,6 +19,8 @@ class ArmTemplatesOperations(object): """ArmTemplatesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArmTemplatePaged[~azure.mgmt.devtestlabs.models.ArmTemplate] :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'] @@ -110,6 +111,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]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates'} @@ -140,7 +144,7 @@ def get( :type lab_name: str :param artifact_source_name: The name of the artifact source. :type artifact_source_name: str - :param name: The name of the azure Resource Manager template. + :param name: The name of the azure resource manager template. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=displayName)' @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplate', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py index 67f75d5d6079..6ec87de82fc0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py @@ -19,6 +19,8 @@ class ArtifactSourcesOperations(object): """ArtifactSourcesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactSourcePaged[~azure.mgmt.devtestlabs.models.ArtifactSource] :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'] @@ -107,6 +108,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]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources'} @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) @@ -257,7 +260,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) if response.status_code == 201: @@ -328,7 +330,8 @@ def delete( def update( self, resource_group_name, lab_name, name, artifact_source, custom_headers=None, raw=False, **operation_config): - """Modify properties of artifact sources. + """Allows modifying tags of artifact sources. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -387,7 +390,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py index d036a6026f51..e4a5d9693cd5 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py @@ -19,6 +19,8 @@ class ArtifactsOperations(object): """ArtifactsOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactPaged[~azure.mgmt.devtestlabs.models.Artifact] :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'] @@ -110,6 +111,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]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Artifact', response) @@ -269,7 +272,6 @@ def generate_arm_template( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplateInfo', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py index b63651cdcedc..b0f9ccc59db7 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py @@ -19,6 +19,8 @@ class CostsOperations(object): """CostsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) @@ -167,7 +168,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py index 4471269a40a5..06d30d912df6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py @@ -21,6 +21,8 @@ class CustomImagesOperations(object): """CustomImagesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.CustomImagePaged[~azure.mgmt.devtestlabs.models.CustomImage] :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'] @@ -109,6 +110,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]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, custom_image, custom_headers=None, raw=False, **operation_config): - """Modify properties of custom images. + """Allows modifying tags of custom images. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py index 3fbe8eac7cb0..5e5fea17acdd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py @@ -21,6 +21,8 @@ class DisksOperations(object): """DisksOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DiskPaged[~azure.mgmt.devtestlabs.models.Disk] :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'] @@ -112,6 +113,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]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) @@ -405,7 +408,7 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, disk, custom_headers=None, raw=False, **operation_config): - """Modify properties of disks. + """Allows modifying tags of disks. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -466,7 +469,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py index 61947381c66d..5805df9f86c1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py @@ -21,6 +21,8 @@ class EnvironmentsOperations(object): """EnvironmentsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DtlEnvironmentPaged[~azure.mgmt.devtestlabs.models.DtlEnvironment] :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'] @@ -112,6 +113,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]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) @@ -406,7 +409,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, dtl_environment, custom_headers=None, raw=False, **operation_config): - """Modify properties of environments. + """Allows modifying tags of environments. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -469,7 +473,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py index 366a1a2a129e..1c0665356f52 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py @@ -21,6 +21,8 @@ class FormulasOperations(object): """FormulasOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.FormulaPaged[~azure.mgmt.devtestlabs.models.Formula] :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'] @@ -109,6 +110,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]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Formula. This operation can take a while + """Create or replace an existing formula. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -365,7 +368,8 @@ def delete( def update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, **operation_config): - """Modify properties of formulas. + """Allows modifying tags of formulas. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -424,7 +428,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py similarity index 93% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py index 849946066b15..97c3cf13e2c0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py @@ -19,6 +19,8 @@ class GalleryImagesOperations(object): """GalleryImagesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.GalleryImagePaged[~azure.mgmt.devtestlabs.models.GalleryImage] :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'] @@ -107,6 +108,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]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/galleryimages'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py index 736efa3c0cea..c05fe0f1308e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py @@ -21,6 +21,8 @@ class GlobalSchedulesOperations(object): """GlobalSchedulesOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :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_subscription.metadata['url'] @@ -103,6 +104,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]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :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'] @@ -190,6 +193,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 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -334,7 +339,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -402,7 +406,8 @@ def delete( def update( self, resource_group_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -457,7 +462,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py index d6ce7c62635f..a0b03f5a0c53 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py @@ -21,6 +21,8 @@ class LabsOperations(object): """LabsOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :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_subscription.metadata['url'] @@ -103,6 +104,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]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :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'] @@ -190,6 +193,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 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -461,7 +466,7 @@ def get_long_running_output(response): def update( self, resource_group_name, name, lab, custom_headers=None, raw=False, **operation_config): - """Modify properties of labs. + """Allows modifying tags of labs. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -516,7 +521,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -850,7 +854,6 @@ def generate_upload_uri( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GenerateUploadUriResponse', response) @@ -973,8 +976,7 @@ def list_vhds( ~azure.mgmt.devtestlabs.models.LabVhdPaged[~azure.mgmt.devtestlabs.models.LabVhd] :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_vhds.metadata['url'] @@ -1005,6 +1007,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(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]: @@ -1015,12 +1022,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_vhds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py index 0c19dd07462e..d0f4de2d054b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py @@ -19,6 +19,8 @@ class NotificationChannelsOperations(object): """NotificationChannelsOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.NotificationChannelPaged[~azure.mgmt.devtestlabs.models.NotificationChannel] :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'] @@ -107,6 +108,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]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels'} @@ -135,7 +139,7 @@ def get( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=webHookUrl)' @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -199,13 +202,13 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing notificationChannel. + """Create or replace an existing notification channel. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -258,7 +261,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) if response.status_code == 201: @@ -279,7 +281,7 @@ def delete( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -329,13 +331,14 @@ def delete( def update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Modify properties of notification channels. + """Allows modifying tags of notification channels. All other properties + will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -407,7 +409,7 @@ def notify( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py index 2f0636e39f26..5576b0e6fc0f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/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. @@ -88,7 +90,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('OperationResult', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py index da02489f324b..90b956a0d88c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py @@ -19,6 +19,8 @@ class PoliciesOperations(object): """PoliciesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.PolicyPaged[~azure.mgmt.devtestlabs.models.Policy] :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'] @@ -110,6 +111,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]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) @@ -266,7 +269,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) if response.status_code == 201: @@ -340,7 +342,8 @@ def delete( def update( self, resource_group_name, lab_name, policy_set_name, name, policy, custom_headers=None, raw=False, **operation_config): - """Modify properties of policies. + """Allows modifying tags of policies. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -401,7 +404,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py index ed602a5ba340..66acd3ffb5e6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py @@ -19,6 +19,8 @@ class PolicySetsOperations(object): """PolicySetsOperations 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. @@ -100,7 +102,6 @@ def evaluate_policies( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EvaluatePoliciesResponse', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py similarity index 90% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py index 3597edb7fa87..5b12492d4b39 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py @@ -19,6 +19,8 @@ class ProviderOperations(object): """ProviderOperations 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.devtestlabs.models.OperationMetadataPaged[~azure.mgmt.devtestlabs.models.OperationMetadata] :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.OperationMetadataPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.DevTestLab/operations'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py index 5f4e9429e3a1..996b11b9e6d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py @@ -21,6 +21,8 @@ class SchedulesOperations(object): """SchedulesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :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'] @@ -109,6 +110,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]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -259,7 +262,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -330,7 +332,8 @@ def delete( def update( self, resource_group_name, lab_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -502,8 +504,7 @@ def list_applicable( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :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_applicable.metadata['url'] @@ -535,6 +536,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(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]: @@ -545,12 +551,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_applicable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py index 46e2a62a2b88..aa04f243c68c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py @@ -21,6 +21,8 @@ class SecretsOperations(object): """SecretsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SecretPaged[~azure.mgmt.devtestlabs.models.Secret] :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'] @@ -112,6 +113,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]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) @@ -377,7 +380,7 @@ def delete( def update( self, resource_group_name, lab_name, user_name, name, tags=None, value=None, custom_headers=None, raw=False, **operation_config): - """Modify properties of secrets. + """Allows modifying tags of secrets. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -442,7 +445,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py index 892b9b3fb50b..62ac4ca15eb1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py @@ -21,6 +21,8 @@ class ServiceFabricSchedulesOperations(object): """ServiceFabricSchedulesOperations 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. @@ -49,7 +51,7 @@ def list( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param expand: Specify the $expand query. Example: 'properties($select=status)' @@ -73,8 +75,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :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'] @@ -115,6 +116,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]: @@ -125,12 +131,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules'} @@ -145,7 +149,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -200,7 +204,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -221,7 +224,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -277,7 +280,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -300,7 +302,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -354,7 +356,8 @@ def delete( def update( self, resource_group_name, lab_name, user_name, service_fabric_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -362,7 +365,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -418,7 +421,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -480,7 +482,7 @@ def execute( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py index 076aa87a7963..f3ef18b8584e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py @@ -21,6 +21,8 @@ class ServiceFabricsOperations(object): """ServiceFabricsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.ServiceFabricPaged[~azure.mgmt.devtestlabs.models.ServiceFabric] :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'] @@ -112,6 +113,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]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics'} @@ -142,7 +146,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param expand: Specify the $expand query. Example: 'properties($expand=applicableSchedule)' @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -261,7 +264,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Service Fabric. This operation can take a + """Create or replace an existing service fabric. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -270,7 +273,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabric @@ -366,7 +369,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -405,7 +408,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, **operation_config): - """Modify properties of service fabrics. + """Allows modifying tags of service fabrics. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -413,7 +417,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: @@ -467,7 +471,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -488,7 +491,7 @@ def list_applicable_schedules( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -535,7 +538,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) @@ -596,7 +598,7 @@ def start( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -683,7 +685,7 @@ def stop( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py similarity index 71% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py index 83b4e9dae88c..aa464691b2fd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py @@ -19,6 +19,8 @@ class ServiceRunnersOperations(object): """ServiceRunnersOperations 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. @@ -37,91 +39,6 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list( - self, resource_group_name, lab_name, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """List service runners in a given lab. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param lab_name: The name of the lab. - :type lab_name: str - :param filter: The filter to apply to the operation. Example: - '$filter=contains(name,'myName') - :type filter: str - :param top: The maximum number of resources to return from the - operation. Example: '$top=10' - :type top: int - :param orderby: The ordering expression for the results, using OData - notation. Example: '$orderby=name desc' - :type orderby: 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 ServiceRunner - :rtype: - ~azure.mgmt.devtestlabs.models.ServiceRunnerPaged[~azure.mgmt.devtestlabs.models.ServiceRunner] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - 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'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'labName': self._serialize.url("lab_name", lab_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '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) - 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 - deserialized = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners'} - def get( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): """Get service runner. @@ -176,7 +93,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) @@ -189,7 +105,7 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, service_runner, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing Service runner. + """Create or replace an existing service runner. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -248,7 +164,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py index 5f68155fece3..7e4d74c46fab 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py @@ -21,6 +21,8 @@ class UsersOperations(object): """UsersOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.UserPaged[~azure.mgmt.devtestlabs.models.User] :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'] @@ -109,6 +110,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]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, user, custom_headers=None, raw=False, **operation_config): - """Modify properties of user profiles. + """Allows modifying tags of user profiles. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py index dadb93a7e064..080a6514a343 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py @@ -21,6 +21,8 @@ class VirtualMachineSchedulesOperations(object): """VirtualMachineSchedulesOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :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'] @@ -112,6 +113,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]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -268,7 +271,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -342,7 +344,8 @@ def delete( def update( self, resource_group_name, lab_name, virtual_machine_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -403,7 +406,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py similarity index 99% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py index 16c7762bfc04..32c51685fb71 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py @@ -21,6 +21,8 @@ class VirtualMachinesOperations(object): """VirtualMachinesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.LabVirtualMachinePaged[~azure.mgmt.devtestlabs.models.LabVirtualMachine] :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'] @@ -109,6 +110,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]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Virtual machine. This operation can take + """Create or replace an existing virtual machine. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -392,7 +395,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual machines. + """Allows modifying tags of virtual machines. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -451,7 +455,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -882,7 +885,6 @@ def get_rdp_file_contents( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RdpConnection', response) @@ -947,7 +949,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py index 12ee56cd36ad..659a7cc31b2f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py @@ -21,6 +21,8 @@ class VirtualNetworksOperations(object): """VirtualNetworksOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.VirtualNetworkPaged[~azure.mgmt.devtestlabs.models.VirtualNetwork] :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'] @@ -109,6 +110,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]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, virtual_network, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual networks. + """Allows modifying tags of virtual networks. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -450,7 +454,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py index 7f225c6aab41..20cee28211d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.0" +VERSION = "4.0.0" diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py index c74bcc7d5281..b136f9c8d9bf 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/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 a4936f33c9b7b07d538334256f04b146be9f0aab Mon Sep 17 00:00:00 2001 From: annatisch Date: Fri, 26 Jul 2019 12:15:22 -0700 Subject: [PATCH 17/37] [azure-core] Small fixes for aiohttp (#6490) * Aiohttp read timeout * Aiohttp response status code * Aiohttp content type header * Review feedback * Fixed typo * Fixed async transport sleep coroutine * Fix for stream generators * Reverted attribute error handling * Fixed trio sleep test * Fixed identity test mocks * Fix identity mock to return content-type as string * Fix universal policy tests --- sdk/core/azure-core/azure/core/exceptions.py | 1 + .../azure/core/pipeline/policies/universal.py | 2 +- .../azure/core/pipeline/transport/aiohttp.py | 26 +++++++++---------- .../pipeline/transport/requests_asyncio.py | 20 +++++++------- .../core/pipeline/transport/requests_basic.py | 20 ++++++-------- .../core/pipeline/transport/requests_trio.py | 17 +++++------- .../azure_core_asynctests/test_pipeline.py | 17 ++++++++++++ .../tests/test_universal_pipeline.py | 4 +-- sdk/identity/azure-identity/tests/helpers.py | 2 +- .../azure-identity/tests/test_authn_client.py | 8 +++--- .../azure-identity/tests/test_identity.py | 4 +-- .../tests/test_identity_async.py | 4 +-- 12 files changed, 66 insertions(+), 59 deletions(-) diff --git a/sdk/core/azure-core/azure/core/exceptions.py b/sdk/core/azure-core/azure/core/exceptions.py index ae6ff7c53eb8..b69912108a40 100644 --- a/sdk/core/azure-core/azure/core/exceptions.py +++ b/sdk/core/azure-core/azure/core/exceptions.py @@ -114,6 +114,7 @@ def __init__(self, message=None, response=None, **kwargs): if response: self.reason = response.reason self.status_code = response.status_code + message = message or "Operation returned an invalid status '{}'".format(self.reason) try: try: 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 79b48bb162ce..b9338950ff38 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -350,7 +350,7 @@ def deserialize_from_http_generics(cls, response): # Try to use content-type from headers if available content_type = None if response.content_type: # type: ignore - content_type = response.content_type[0].strip().lower() # type: ignore + content_type = response.content_type.split(";")[0].strip().lower() # type: ignore # Ouch, this server did not declare what it sent... # Let's guess it's JSON... 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 f6ee555cea1c..9fb2eb125a5c 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 +from azure.core.exceptions import ServiceRequestError, ServiceResponseError from azure.core.pipeline import Pipeline from requests.exceptions import ( @@ -181,7 +181,8 @@ async def send(self, request: HttpRequest, **config: Any) -> Optional[AsyncHttpR await response.load_body() except aiohttp.client_exceptions.ClientConnectorError as err: error = ServiceRequestError(err, error=err) - + except asyncio.TimeoutError as err: + error = ServiceResponseError(err, error=err) if error: raise error return response @@ -191,19 +192,16 @@ class AioHttpStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The client response object. - :type response: aiohttp.ClientResponse :param block_size: block size of data sent over connection. :type block_size: int """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, - response: aiohttp.ClientResponse, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.content_length = int(response.headers.get('Content-Length', 0)) + self.block_size = response.block_size + self.content_length = int(response.internal_response.headers.get('Content-Length', 0)) self.downloaded = 0 def __len__(self): @@ -215,13 +213,13 @@ async def __anext__(self): retry_interval = 1000 while retry_active: try: - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise _ResponseStopIteration() self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (ChunkedEncodingError, ConnectionError): retry_total -= 1 @@ -233,7 +231,7 @@ async def __anext__(self): resp = self.pipeline.run(self.request, stream=True, headers=headers) if resp.status_code == 416: raise - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise StopIteration() self.downloaded += chunk @@ -243,7 +241,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class AioHttpTransportResponse(AsyncHttpResponse): @@ -282,4 +280,4 @@ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: :param pipeline: The pipeline object :type pipeline: azure.core.pipeline """ - return AioHttpStreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return AioHttpStreamDownloadGenerator(pipeline, self) diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py index 1f302034a173..6093713c2928 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py @@ -78,6 +78,9 @@ async def __aenter__(self): async def __aexit__(self, *exc_details): # pylint: disable=arguments-differ return super(AsyncioRequestsTransport, self).__exit__() + async def sleep(self, duration): + await asyncio.sleep(duration) + async def send(self, request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: # type: ignore """Send the request using this HTTP sender. @@ -135,18 +138,16 @@ class AsyncioStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: block size of data sent over connection. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -170,7 +171,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -197,7 +198,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise @@ -206,5 +207,4 @@ class AsyncioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportRespo """ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming request body data.""" - return AsyncioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return AsyncioStreamDownloadGenerator(pipeline, self) # type: ignore diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py index 8907937c9a5a..95757edb63dd 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py @@ -65,9 +65,7 @@ def __init__(self, request, requests_response, block_size=None): self.status_code = requests_response.status_code self.headers = requests_response.headers self.reason = requests_response.reason - content_type = requests_response.headers.get('content-type') - if content_type: - self.content_type = content_type.split(";") + self.content_type = requests_response.headers.get('content-type') def body(self): return self.internal_response.content @@ -82,18 +80,16 @@ class StreamDownloadGenerator(object): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline, request, response, block_size): + def __init__(self, pipeline, response): self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -115,7 +111,7 @@ def __next__(self): self.downloaded += self.block_size return chunk except StopIteration: - self.response.close() + self.response.internal_response.close() raise StopIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -138,7 +134,7 @@ def __next__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise next = __next__ # Python 2 compatibility. @@ -149,7 +145,7 @@ class RequestsTransportResponse(HttpResponse, _RequestsTransportResponseBase): def stream_download(self, pipeline): # type: (PipelineType) -> Iterator[bytes] """Generator for streaming request body data.""" - return StreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return StreamDownloadGenerator(pipeline, self) class RequestsTransport(HttpTransport): diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py index c3a1c591587b..f27f034033ea 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py @@ -53,18 +53,16 @@ class TrioStreamDownloadGenerator(AsyncIterator): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -85,7 +83,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -111,7 +109,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse): # type: ignore @@ -120,8 +118,7 @@ class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming response data. """ - return TrioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return TrioStreamDownloadGenerator(pipeline, self) # type: ignore class TrioRequestsTransport(RequestsTransport, AsyncHttpTransport): # type: ignore diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py index d344a9f90fff..bcefb9b4bb1a 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py @@ -119,6 +119,23 @@ async def test_basic_async_requests(): assert response.http_response.status_code == 200 +@pytest.mark.asyncio +async def test_async_transport_sleep(): + + async with AsyncioRequestsTransport() as transport: + await transport.sleep(1) + + async with AioHttpTransport() as transport: + await transport.sleep(1) + +def test_async_trio_transport_sleep(): + + async def do(): + async with TrioRequestsTransport() as transport: + await transport.sleep(1) + + response = trio.run(do) + @pytest.mark.asyncio async def test_conf_async_requests(): diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index 0049e2277374..cc783b0d4c74 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -123,9 +123,7 @@ class MockResponse(HttpResponse): def __init__(self, body, content_type): super(MockResponse, self).__init__(None, None) self._body = body - self.content_type = None - if content_type: - self.content_type = [content_type] + self.content_type = content_type def body(self): return self._body diff --git a/sdk/identity/azure-identity/tests/helpers.py b/sdk/identity/azure-identity/tests/helpers.py index 8acb3d5f646b..694a92df922a 100644 --- a/sdk/identity/azure-identity/tests/helpers.py +++ b/sdk/identity/azure-identity/tests/helpers.py @@ -41,7 +41,7 @@ def mock_response(status_code=200, headers={}, json_payload=None): if json_payload is not None: response.text = lambda: json.dumps(json_payload) response.headers["content-type"] = "application/json" - response.content_type = ["application/json"] + response.content_type = "application/json" return response diff --git a/sdk/identity/azure-identity/tests/test_authn_client.py b/sdk/identity/azure-identity/tests/test_authn_client.py index 39889f003627..1aca947b3d89 100644 --- a/sdk/identity/azure-identity/tests/test_authn_client.py +++ b/sdk/identity/azure-identity/tests/test_authn_client.py @@ -28,7 +28,7 @@ def test_authn_client_deserialization(): scope = "scope" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -87,7 +87,7 @@ def test_caching_when_only_expires_in_set(): text=lambda: json.dumps({"access_token": access_token, "expires_in": expires_in, "token_type": "Bearer"}), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -106,7 +106,7 @@ def test_expires_in_strings(): expected_token = "token" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -133,7 +133,7 @@ def test_cache_expiry(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index c9756ad3b344..b017792595a8 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -191,7 +191,7 @@ def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -219,7 +219,7 @@ def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity_async.py b/sdk/identity/azure-identity/tests/test_identity_async.py index ba203cd2eb59..03b53db9eccd 100644 --- a/sdk/identity/azure-identity/tests/test_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_identity_async.py @@ -196,7 +196,7 @@ async def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -225,7 +225,7 @@ async def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) From ba856cebfbaa96e07d6f93cb82c0f7f1c7c9ca15 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2019 02:44:40 +0000 Subject: [PATCH 18/37] Generated from 7e0f5408fe4fa42660222ec1c5cca8ae9440afde (#27) fix: Batch model validation errors - Add body for RESPONSE_BODY_NOT_IN_EXAMPLE errors - active -> Active for state enum in 2017-09-01 examples --- .../azure/mgmt/batch/__init__.py | 7 +- ..._client.py => _batch_management_client.py} | 59 +- .../azure/mgmt/batch/_configuration.py | 49 + .../azure/mgmt/batch/models/__init__.py | 97 +- .../models/_batch_management_client_enums.py | 146 +- .../azure/mgmt/batch/models/_models.py | 2267 +++++++------- .../azure/mgmt/batch/models/_models_py3.py | 2649 +++++++++-------- .../azure/mgmt/batch/models/_paged_models.py | 10 - .../azure/mgmt/batch/operations/__init__.py | 14 +- ...erations.py => _application_operations.py} | 53 +- ....py => _application_package_operations.py} | 53 +- ...ations.py => _batch_account_operations.py} | 192 +- ...erations.py => _certificate_operations.py} | 165 +- ..._operations.py => _location_operations.py} | 20 +- .../{operations.py => _operations.py} | 27 +- ...pool_operations.py => _pool_operations.py} | 174 +- 16 files changed, 3115 insertions(+), 2867 deletions(-) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/{batch_management_client.py => _batch_management_client.py} (61%) create mode 100644 sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{application_operations.py => _application_operations.py} (92%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{application_package_operations.py => _application_package_operations.py} (92%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{batch_account_operations.py => _batch_account_operations.py} (84%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{certificate_operations.py => _certificate_operations.py} (84%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{location_operations.py => _location_operations.py} (91%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{operations.py => _operations.py} (82%) rename sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/{pool_operations.py => _pool_operations.py} (85%) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py index da4d07e1222e..bfdd6ac1c466 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_management_client import BatchManagementClient -from .version import VERSION +from ._configuration import BatchManagementClientConfiguration +from ._batch_management_client import BatchManagementClient +__all__ = ['BatchManagementClient', 'BatchManagementClientConfiguration'] -__all__ = ['BatchManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py similarity index 61% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py index d31cfa110ab2..6cdcc5ca3eaf 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py @@ -9,54 +9,21 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.batch_account_operations import BatchAccountOperations -from .operations.application_package_operations import ApplicationPackageOperations -from .operations.application_operations import ApplicationOperations -from .operations.location_operations import LocationOperations -from .operations.operations import Operations -from .operations.certificate_operations import CertificateOperations -from .operations.pool_operations import PoolOperations -from . import models - - -class BatchManagementClientConfiguration(AzureConfiguration): - """Configuration for BatchManagementClient - 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 Azure subscription ID. This is a - GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - :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(BatchManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-batch/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import BatchManagementClientConfiguration +from .operations import BatchAccountOperations +from .operations import ApplicationPackageOperations +from .operations import ApplicationOperations +from .operations import LocationOperations +from .operations import Operations +from .operations import CertificateOperations +from .operations import PoolOperations +from . import models -class BatchManagementClient(object): +class BatchManagementClient(SDKClient): """BatchManagementClient :ivar config: Configuration for client. @@ -90,10 +57,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = BatchManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(BatchManagementClient, 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-12-01' + self.api_version = '2019-04-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py new file mode 100644 index 000000000000..75c9d4004f40 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class BatchManagementClientConfiguration(AzureConfiguration): + """Configuration for BatchManagementClient + 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 Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :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(BatchManagementClientConfiguration, 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-batch/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py index ad7c3fe653cf..b17bdd9834c9 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py @@ -9,21 +9,26 @@ # regenerated. # -------------------------------------------------------------------------- - try: from ._models_py3 import ActivateApplicationPackageParameters + from ._models_py3 import Application + from ._models_py3 import ApplicationPackage from ._models_py3 import ApplicationPackageReference from ._models_py3 import AutoScaleRun from ._models_py3 import AutoScaleRunError from ._models_py3 import AutoScaleSettings from ._models_py3 import AutoStorageBaseProperties + from ._models_py3 import AutoStorageProperties from ._models_py3 import AutoUserSpecification + from ._models_py3 import BatchAccount from ._models_py3 import BatchAccountCreateParameters from ._models_py3 import BatchAccountKeys from ._models_py3 import BatchAccountRegenerateKeyParameters from ._models_py3 import BatchAccountUpdateParameters from ._models_py3 import BatchLocationQuota + from ._models_py3 import Certificate from ._models_py3 import CertificateBaseProperties + from ._models_py3 import CertificateCreateOrUpdateParameters from ._models_py3 import CertificateReference from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import CheckNameAvailabilityResult @@ -44,6 +49,7 @@ from ._models_py3 import NetworkSecurityGroupRule from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import Pool from ._models_py3 import PoolEndpointConfiguration from ._models_py3 import ProxyResource from ._models_py3 import ResizeError @@ -57,29 +63,29 @@ from ._models_py3 import UserAccount from ._models_py3 import UserIdentity from ._models_py3 import VirtualMachineConfiguration + from ._models_py3 import VirtualMachineFamilyCoreQuota from ._models_py3 import WindowsConfiguration from ._models_py3 import WindowsUserConfiguration - from ._models_py3 import Application - from ._models_py3 import ApplicationPackage - from ._models_py3 import AutoStorageProperties - from ._models_py3 import BatchAccount - from ._models_py3 import Certificate - from ._models_py3 import CertificateCreateOrUpdateParameters - from ._models_py3 import Pool except (SyntaxError, ImportError): from ._models import ActivateApplicationPackageParameters + from ._models import Application + from ._models import ApplicationPackage from ._models import ApplicationPackageReference from ._models import AutoScaleRun from ._models import AutoScaleRunError from ._models import AutoScaleSettings from ._models import AutoStorageBaseProperties + from ._models import AutoStorageProperties from ._models import AutoUserSpecification + from ._models import BatchAccount from ._models import BatchAccountCreateParameters from ._models import BatchAccountKeys from ._models import BatchAccountRegenerateKeyParameters from ._models import BatchAccountUpdateParameters from ._models import BatchLocationQuota + from ._models import Certificate from ._models import CertificateBaseProperties + from ._models import CertificateCreateOrUpdateParameters from ._models import CertificateReference from ._models import CheckNameAvailabilityParameters from ._models import CheckNameAvailabilityResult @@ -100,6 +106,7 @@ from ._models import NetworkSecurityGroupRule from ._models import Operation from ._models import OperationDisplay + from ._models import Pool from ._models import PoolEndpointConfiguration from ._models import ProxyResource from ._models import ResizeError @@ -113,58 +120,59 @@ from ._models import UserAccount from ._models import UserIdentity from ._models import VirtualMachineConfiguration + from ._models import VirtualMachineFamilyCoreQuota from ._models import WindowsConfiguration from ._models import WindowsUserConfiguration - from ._models import Application - from ._models import ApplicationPackage - from ._models import AutoStorageProperties - from ._models import BatchAccount - from ._models import Certificate - from ._models import CertificateCreateOrUpdateParameters - from ._models import Pool -from ._paged_models import BatchAccountPaged from ._paged_models import ApplicationPackagePaged from ._paged_models import ApplicationPaged -from ._paged_models import OperationPaged +from ._paged_models import BatchAccountPaged from ._paged_models import CertificatePaged +from ._paged_models import OperationPaged from ._paged_models import PoolPaged -from ._batch_management_client_enums import PoolAllocationMode -from ._batch_management_client_enums import ProvisioningState -from ._batch_management_client_enums import AccountKeyType -from ._batch_management_client_enums import PackageState -from ._batch_management_client_enums import CertificateFormat -from ._batch_management_client_enums import CertificateProvisioningState -from ._batch_management_client_enums import PoolProvisioningState -from ._batch_management_client_enums import AllocationState -from ._batch_management_client_enums import CachingType -from ._batch_management_client_enums import StorageAccountType -from ._batch_management_client_enums import ComputeNodeDeallocationOption -from ._batch_management_client_enums import InterNodeCommunicationState -from ._batch_management_client_enums import InboundEndpointProtocol -from ._batch_management_client_enums import NetworkSecurityGroupRuleAccess -from ._batch_management_client_enums import ComputeNodeFillType -from ._batch_management_client_enums import ElevationLevel -from ._batch_management_client_enums import LoginMode -from ._batch_management_client_enums import AutoUserScope -from ._batch_management_client_enums import CertificateStoreLocation -from ._batch_management_client_enums import CertificateVisibility -from ._batch_management_client_enums import NameAvailabilityReason +from ._batch_management_client_enums import ( + PoolAllocationMode, + ProvisioningState, + AccountKeyType, + PackageState, + CertificateFormat, + CertificateProvisioningState, + PoolProvisioningState, + AllocationState, + CachingType, + StorageAccountType, + ComputeNodeDeallocationOption, + InterNodeCommunicationState, + InboundEndpointProtocol, + NetworkSecurityGroupRuleAccess, + ComputeNodeFillType, + ElevationLevel, + LoginMode, + AutoUserScope, + CertificateStoreLocation, + CertificateVisibility, + NameAvailabilityReason, +) - -__all__=[ +__all__ = [ 'ActivateApplicationPackageParameters', + 'Application', + 'ApplicationPackage', 'ApplicationPackageReference', 'AutoScaleRun', 'AutoScaleRunError', 'AutoScaleSettings', 'AutoStorageBaseProperties', + 'AutoStorageProperties', 'AutoUserSpecification', + 'BatchAccount', 'BatchAccountCreateParameters', 'BatchAccountKeys', 'BatchAccountRegenerateKeyParameters', 'BatchAccountUpdateParameters', 'BatchLocationQuota', + 'Certificate', 'CertificateBaseProperties', + 'CertificateCreateOrUpdateParameters', 'CertificateReference', 'CheckNameAvailabilityParameters', 'CheckNameAvailabilityResult', @@ -185,6 +193,7 @@ 'NetworkSecurityGroupRule', 'Operation', 'OperationDisplay', + 'Pool', 'PoolEndpointConfiguration', 'ProxyResource', 'ResizeError', @@ -198,15 +207,9 @@ 'UserAccount', 'UserIdentity', 'VirtualMachineConfiguration', + 'VirtualMachineFamilyCoreQuota', 'WindowsConfiguration', 'WindowsUserConfiguration', - 'Application', - 'ApplicationPackage', - 'AutoStorageProperties', - 'BatchAccount', - 'Certificate', - 'CertificateCreateOrUpdateParameters', - 'Pool', 'BatchAccountPaged', 'ApplicationPackagePaged', 'ApplicationPaged', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py index da2eba944432..0bd6782557aa 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py @@ -12,137 +12,137 @@ from enum import Enum -class PoolAllocationMode(Enum): +class PoolAllocationMode(str, Enum): - batch_service = "BatchService" - user_subscription = "UserSubscription" + batch_service = "BatchService" #: Pools will be allocated in subscriptions owned by the Batch service. + user_subscription = "UserSubscription" #: Pools will be allocated in a subscription owned by the user. -class ProvisioningState(Enum): +class ProvisioningState(str, Enum): - invalid = "Invalid" - creating = "Creating" - deleting = "Deleting" - succeeded = "Succeeded" - failed = "Failed" - cancelled = "Cancelled" + invalid = "Invalid" #: The account is in an invalid state. + creating = "Creating" #: The account is being created. + deleting = "Deleting" #: The account is being deleted. + succeeded = "Succeeded" #: The account has been created and is ready for use. + failed = "Failed" #: The last operation for the account is failed. + cancelled = "Cancelled" #: The last operation for the account is cancelled. -class AccountKeyType(Enum): +class AccountKeyType(str, Enum): - primary = "Primary" - secondary = "Secondary" + primary = "Primary" #: The primary account key. + secondary = "Secondary" #: The secondary account key. -class PackageState(Enum): +class PackageState(str, Enum): - pending = "Pending" - active = "Active" + pending = "Pending" #: The application package has been created but has not yet been activated. + active = "Active" #: The application package is ready for use. -class CertificateFormat(Enum): +class CertificateFormat(str, Enum): - pfx = "Pfx" - cer = "Cer" + pfx = "Pfx" #: The certificate is a PFX (PKCS#12) formatted certificate or certificate chain. + cer = "Cer" #: The certificate is a base64-encoded X.509 certificate. -class CertificateProvisioningState(Enum): +class CertificateProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" - failed = "Failed" + succeeded = "Succeeded" #: The certificate is available for use in pools. + deleting = "Deleting" #: The user has requested that the certificate be deleted, but the delete operation has not yet completed. You may not reference the certificate when creating or updating pools. + failed = "Failed" #: The user requested that the certificate be deleted, but there are pools that still have references to the certificate, or it is still installed on one or more compute nodes. (The latter can occur if the certificate has been removed from the pool, but the node has not yet restarted. Nodes refresh their certificates only when they restart.) You may use the cancel certificate delete operation to cancel the delete, or the delete certificate operation to retry the delete. -class PoolProvisioningState(Enum): +class PoolProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" + succeeded = "Succeeded" #: The pool is available to run tasks subject to the availability of compute nodes. + deleting = "Deleting" #: The user has requested that the pool be deleted, but the delete operation has not yet completed. -class AllocationState(Enum): +class AllocationState(str, Enum): - steady = "Steady" - resizing = "Resizing" - stopping = "Stopping" + steady = "Steady" #: The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this state when it is created and when no operations are being performed on the pool to change the number of nodes. + resizing = "Resizing" #: The pool is resizing; that is, compute nodes are being added to or removed from the pool. + stopping = "Stopping" #: The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed. -class CachingType(Enum): +class CachingType(str, Enum): - none = "None" - read_only = "ReadOnly" - read_write = "ReadWrite" + none = "None" #: The caching mode for the disk is not enabled. + read_only = "ReadOnly" #: The caching mode for the disk is read only. + read_write = "ReadWrite" #: The caching mode for the disk is read and write. -class StorageAccountType(Enum): +class StorageAccountType(str, Enum): - standard_lrs = "Standard_LRS" - premium_lrs = "Premium_LRS" + standard_lrs = "Standard_LRS" #: The data disk should use standard locally redundant storage. + premium_lrs = "Premium_LRS" #: The data disk should use premium locally redundant storage. -class ComputeNodeDeallocationOption(Enum): +class ComputeNodeDeallocationOption(str, Enum): - requeue = "Requeue" - terminate = "Terminate" - task_completion = "TaskCompletion" - retained_data = "RetainedData" + requeue = "Requeue" #: Terminate running task processes and requeue the tasks. The tasks will run again when a node is available. Remove nodes as soon as tasks have been terminated. + terminate = "Terminate" #: Terminate running tasks. The tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Remove nodes as soon as tasks have been terminated. + task_completion = "TaskCompletion" #: Allow currently running tasks to complete. Schedule no new tasks while waiting. Remove nodes when all tasks have completed. + retained_data = "RetainedData" #: Allow currently running tasks to complete, then wait for all task data retention periods to expire. Schedule no new tasks while waiting. Remove nodes when all task retention periods have expired. -class InterNodeCommunicationState(Enum): +class InterNodeCommunicationState(str, Enum): - enabled = "Enabled" - disabled = "Disabled" + enabled = "Enabled" #: Enable network communication between virtual machines. + disabled = "Disabled" #: Disable network communication between virtual machines. -class InboundEndpointProtocol(Enum): +class InboundEndpointProtocol(str, Enum): - tcp = "TCP" - udp = "UDP" + tcp = "TCP" #: Use TCP for the endpoint. + udp = "UDP" #: Use UDP for the endpoint. -class NetworkSecurityGroupRuleAccess(Enum): +class NetworkSecurityGroupRuleAccess(str, Enum): - allow = "Allow" - deny = "Deny" + allow = "Allow" #: Allow access. + deny = "Deny" #: Deny access. -class ComputeNodeFillType(Enum): +class ComputeNodeFillType(str, Enum): - spread = "Spread" - pack = "Pack" + spread = "Spread" #: Tasks should be assigned evenly across all nodes in the pool. + pack = "Pack" #: As many tasks as possible (maxTasksPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool. -class ElevationLevel(Enum): +class ElevationLevel(str, Enum): - non_admin = "NonAdmin" - admin = "Admin" + non_admin = "NonAdmin" #: The user is a standard user without elevated access. + admin = "Admin" #: The user is a user with elevated access and operates with full Administrator permissions. -class LoginMode(Enum): +class LoginMode(str, Enum): - batch = "Batch" - interactive = "Interactive" + batch = "Batch" #: The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel processes. + interactive = "Interactive" #: The LOGON32_LOGON_INTERACTIVE Win32 login mode. Some applications require having permissions associated with the interactive login mode. If this is the case for an application used in your task, then this option is recommended. -class AutoUserScope(Enum): +class AutoUserScope(str, Enum): - task = "Task" - pool = "Pool" + task = "Task" #: Specifies that the service should create a new user for the task. + pool = "Pool" #: Specifies that the task runs as the common auto user account which is created on every node in a pool. -class CertificateStoreLocation(Enum): +class CertificateStoreLocation(str, Enum): - current_user = "CurrentUser" - local_machine = "LocalMachine" + current_user = "CurrentUser" #: Certificates should be installed to the CurrentUser certificate store. + local_machine = "LocalMachine" #: Certificates should be installed to the LocalMachine certificate store. -class CertificateVisibility(Enum): +class CertificateVisibility(str, Enum): - start_task = "StartTask" - task = "Task" - remote_user = "RemoteUser" + start_task = "StartTask" #: The certificate should be visible to the user account under which the start task is run. + task = "Task" #: The certificate should be visible to the user accounts under which job tasks are run. + remote_user = "RemoteUser" #: The certificate should be visible to the user accounts under which users remotely access the node. -class NameAvailabilityReason(Enum): +class NameAvailabilityReason(str, Enum): - invalid = "Invalid" - already_exists = "AlreadyExists" + invalid = "Invalid" #: The requested name is invalid. + already_exists = "AlreadyExists" #: The requested name is already in use. diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py index c64ee92d4c21..4b01ce194f4f 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() - self.format = format + def __init__(self, **kwargs): + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + + +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Application, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.allow_updates = kwargs.get('allow_updates', None) + self.default_version = kwargs.get('default_version', None) + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,17 +213,19 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() - self.id = id - self.version = version + def __init__(self, **kwargs): + super(ApplicationPackageReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.version = kwargs.get('version', None) class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,21 +246,23 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() - self.evaluation_time = evaluation_time - self.results = results - self.error = error + def __init__(self, **kwargs): + super(AutoScaleRun, self).__init__(**kwargs) + self.evaluation_time = kwargs.get('evaluation_time', None) + self.results = kwargs.get('results', None) + self.error = kwargs.get('error', None) class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,18 +279,20 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(AutoScaleRunError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,31 +309,62 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() - self.formula = formula - self.evaluation_interval = evaluation_interval + def __init__(self, **kwargs): + super(AutoScaleSettings, self).__init__(**kwargs) + self.formula = kwargs.get('formula', None) + self.evaluation_interval = kwargs.get('evaluation_interval', None) class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + """ + + _validation = { + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoStorageBaseProperties, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + + +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime """ _validation = { 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, } _attribute_map = { 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() - self.storage_account_id = storage_account_id + def __init__(self, **kwargs): + super(AutoStorageProperties, self).__init__(**kwargs) + self.last_key_sync = kwargs.get('last_key_sync', None) class AutoUserSpecification(Model): @@ -194,94 +387,261 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() - self.scope = scope - self.elevation_level = elevation_level + def __init__(self, **kwargs): + super(AutoUserSpecification, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.elevation_level = kwargs.get('elevation_level', None) -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. +class Resource(Model): + """A definition of an Azure resource. - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'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}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class BatchAccount(Resource): + """Contains information about an Azure Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str - """ - - _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, - 'secondary': {'key': 'secondary', 'type': 'str'}, - } - - def __init__(self): - super(BatchAccountKeys, self).__init__() - self.account_name = None - self.primary = None - self.secondary = None - - -class BatchAccountRegenerateKeyParameters(Model): + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'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}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, **kwargs): + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) + self.pool_allocation_mode = kwargs.get('pool_allocation_mode', None) + self.key_vault_reference = kwargs.get('key_vault_reference', None) + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, + 'secondary': {'key': 'secondary', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BatchAccountKeys, self).__init__(**kwargs) + self.account_name = None + self.primary = None + self.secondary = None + + +class BatchAccountRegenerateKeyParameters(Model): """Parameters supplied to the RegenerateKey operation. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ @@ -293,9 +653,9 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() - self.key_name = key_name + def __init__(self, **kwargs): + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) class BatchAccountUpdateParameters(Model): @@ -312,10 +672,10 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() - self.tags = tags - self.auto_storage = auto_storage + def __init__(self, **kwargs): + super(BatchAccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) class BatchLocationQuota(Model): @@ -337,11 +697,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs): + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, **kwargs): + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,35 +812,101 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format + def __init__(self, **kwargs): + super(CertificateBaseProperties, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. - This must exist inside the same account as the pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. - :type id: str - :param store_location: The location of the certificate store on the - compute node into which to install the certificate. The default value is - currentUser. This property is applicable only for pools configured with - Windows nodes (that is, created with cloudServiceConfiguration, or with - virtualMachineConfiguration using a Windows image reference). For Linux - compute nodes, the certificates are stored in a directory inside the task - working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - supplied to the task to query for this location. For certificates with - visibility of 'remoteUser', a 'certs' directory is created in the user's - home directory (e.g., /home/{user-name}/certs) and certificates are placed - in that directory. Possible values include: 'CurrentUser', 'LocalMachine' - :type store_location: str or - ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: The name of the certificate store on the compute node - into which to install the certificate. This property is applicable only + 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 ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.data = kwargs.get('data', None) + self.password = kwargs.get('password', None) + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. + This must exist inside the same account as the pool. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. + :type id: str + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' + :type store_location: str or + ~azure.mgmt.batch.models.CertificateStoreLocation + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, @@ -415,12 +930,12 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() - self.id = id - self.store_location = store_location - self.store_name = store_name - self.visibility = visibility + def __init__(self, **kwargs): + super(CertificateReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.store_location = kwargs.get('store_location', None) + self.store_name = kwargs.get('store_name', None) + self.visibility = kwargs.get('visibility', None) class CheckNameAvailabilityParameters(Model): @@ -429,9 +944,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,9 +966,9 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) class CheckNameAvailabilityResult(Model): @@ -485,23 +1002,85 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', 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 CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,10 +1098,10 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() - self.os_family = os_family - self.os_version = os_version + def __init__(self, **kwargs): + super(CloudServiceConfiguration, self).__init__(**kwargs) + self.os_family = kwargs.get('os_family', None) + self.os_version = kwargs.get('os_version', None) class ContainerConfiguration(Model): @@ -531,7 +1110,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,21 +1140,23 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() - self.container_image_names = container_image_names - self.container_registries = container_registries + def __init__(self, **kwargs): + super(ContainerConfiguration, self).__init__(**kwargs) + self.container_image_names = kwargs.get('container_image_names', None) + self.container_registries = kwargs.get('container_registries', None) class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,20 +1171,22 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() - self.registry_server = registry_server - self.user_name = user_name - self.password = password + def __init__(self, **kwargs): + super(ContainerRegistry, self).__init__(**kwargs) + self.registry_server = kwargs.get('registry_server', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) class DataDisk(Model): """Data Disk settings which will be used by the data disks associated to Compute Nodes in the pool. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1198,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,22 +1223,24 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() - self.lun = lun - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,12 +1261,12 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() - self.code = code - self.message = message - self.target = target - self.details = details + def __init__(self, **kwargs): + super(DeleteCertificateError, 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 DeploymentConfiguration(Model): @@ -704,16 +1291,18 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() - self.cloud_service_configuration = cloud_service_configuration - self.virtual_machine_configuration = virtual_machine_configuration + def __init__(self, **kwargs): + super(DeploymentConfiguration, self).__init__(**kwargs) + self.cloud_service_configuration = kwargs.get('cloud_service_configuration', None) + self.virtual_machine_configuration = kwargs.get('virtual_machine_configuration', None) class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,10 +1317,10 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(EnvironmentSetting, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) class FixedScaleSettings(Model): @@ -767,12 +1356,12 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() - self.resize_timeout = resize_timeout - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.node_deallocation_option = node_deallocation_option + def __init__(self, **kwargs): + super(FixedScaleSettings, self).__init__(**kwargs) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) class ImageReference(Model): @@ -815,43 +1404,45 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version - self.id = id + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + self.id = kwargs.get('id', None) class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,24 +1477,26 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() - self.name = name - self.protocol = protocol - self.backend_port = backend_port - self.frontend_port_range_start = frontend_port_range_start - self.frontend_port_range_end = frontend_port_range_end - self.network_security_group_rules = network_security_group_rules + def __init__(self, **kwargs): + super(InboundNatPool, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.protocol = kwargs.get('protocol', None) + self.backend_port = kwargs.get('backend_port', None) + self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) + self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) + self.network_security_group_rules = kwargs.get('network_security_group_rules', None) class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,10 +1510,10 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() - self.id = id - self.url = url + def __init__(self, **kwargs): + super(KeyVaultReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.url = kwargs.get('url', None) class LinuxUserConfiguration(Model): @@ -951,11 +1544,11 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() - self.uid = uid - self.gid = gid - self.ssh_private_key = ssh_private_key + def __init__(self, **kwargs): + super(LinuxUserConfiguration, self).__init__(**kwargs) + self.uid = kwargs.get('uid', None) + self.gid = kwargs.get('gid', None) + self.ssh_private_key = kwargs.get('ssh_private_key', None) class MetadataItem(Model): @@ -964,9 +1557,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,10 +1575,10 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(MetadataItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) class NetworkConfiguration(Model): @@ -1027,31 +1622,34 @@ class NetworkConfiguration(Model): 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() - self.subnet_id = subnet_id - self.endpoint_configuration = endpoint_configuration + def __init__(self, **kwargs): + super(NetworkConfiguration, self).__init__(**kwargs) + self.subnet_id = kwargs.get('subnet_id', None) + self.endpoint_configuration = kwargs.get('endpoint_configuration', None) class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str """ @@ -1067,11 +1665,11 @@ class NetworkSecurityGroupRule(Model): 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() - self.priority = priority - self.access = access - self.source_address_prefix = source_address_prefix + def __init__(self, **kwargs): + super(NetworkSecurityGroupRule, self).__init__(**kwargs) + self.priority = kwargs.get('priority', None) + self.access = kwargs.get('access', None) + self.source_address_prefix = kwargs.get('source_address_prefix', None) class Operation(Model): @@ -1095,12 +1693,12 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) class OperationDisplay(Model): @@ -1124,40 +1722,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools - - -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,6 +1744,123 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus """ _validation = { @@ -1177,6 +1868,16 @@ class ProxyResource(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { @@ -1184,24 +1885,96 @@ class ProxyResource(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, } - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None + def __init__(self, **kwargs): + super(Pool, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = kwargs.get('vm_size', None) + self.deployment_configuration = kwargs.get('deployment_configuration', None) + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = kwargs.get('scale_settings', None) + self.auto_scale_run = None + self.inter_node_communication = kwargs.get('inter_node_communication', None) + self.network_configuration = kwargs.get('network_configuration', None) + self.max_tasks_per_node = kwargs.get('max_tasks_per_node', None) + self.task_scheduling_policy = kwargs.get('task_scheduling_policy', None) + self.user_accounts = kwargs.get('user_accounts', None) + self.metadata = kwargs.get('metadata', None) + self.start_task = kwargs.get('start_task', None) + self.certificates = kwargs.get('certificates', None) + self.application_packages = kwargs.get('application_packages', None) + self.application_licenses = kwargs.get('application_licenses', None) + self.resize_operation_status = None + + +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. + + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] + """ + + _validation = { + 'inbound_nat_pools': {'required': True}, + } + + _attribute_map = { + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, + } + + def __init__(self, **kwargs): + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = kwargs.get('inbound_nat_pools', None) class ResizeError(Model): """An error that occurred when resizing a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.ResizeError] @@ -1218,11 +1991,11 @@ class ResizeError(Model): 'details': {'key': 'details', 'type': '[ResizeError]'}, } - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(ResizeError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) class ResizeOperationStatus(Model): @@ -1267,57 +2040,14 @@ class ResizeOperationStatus(Model): 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'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}'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None + def __init__(self, **kwargs): + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) + self.start_time = kwargs.get('start_time', None) + self.errors = kwargs.get('errors', None) class ResourceFile(Model): @@ -1333,10 +2063,10 @@ class ResourceFile(Model): httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. :type storage_container_url: str :param http_url: The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are @@ -1383,14 +2113,14 @@ class ResourceFile(Model): 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode + def __init__(self, **kwargs): + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = kwargs.get('auto_storage_container_name', None) + self.storage_container_url = kwargs.get('storage_container_url', None) + self.http_url = kwargs.get('http_url', None) + self.blob_prefix = kwargs.get('blob_prefix', None) + self.file_path = kwargs.get('file_path', None) + self.file_mode = kwargs.get('file_mode', None) class ScaleSettings(Model): @@ -1417,16 +2147,23 @@ class ScaleSettings(Model): 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = kwargs.get('fixed_scale', None) + self.auto_scale = kwargs.get('auto_scale', None) class StartTask(Model): """A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged. + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + :param command_line: The command line of the start task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take @@ -1486,28 +2223,30 @@ class StartTask(Model): 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings + def __init__(self, **kwargs): + super(StartTask, self).__init__(**kwargs) + self.command_line = kwargs.get('command_line', None) + self.resource_files = kwargs.get('resource_files', None) + self.environment_settings = kwargs.get('environment_settings', None) + self.user_identity = kwargs.get('user_identity', None) + self.max_task_retry_count = kwargs.get('max_task_retry_count', None) + self.wait_for_success = kwargs.get('wait_for_success', None) + self.container_settings = kwargs.get('container_settings', None) class TaskContainerSettings(Model): """The container settings for a task. + All required parameters must be populated in order to send to Azure. + :param container_run_options: Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. :type image_name: str :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. @@ -1524,18 +2263,20 @@ class TaskContainerSettings(Model): 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, } - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry + def __init__(self, **kwargs): + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = kwargs.get('container_run_options', None) + self.image_name = kwargs.get('image_name', None) + self.registry = kwargs.get('registry', None) class TaskSchedulingPolicy(Model): """Specifies how tasks should be distributed across compute nodes. - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' + All required parameters must be populated in order to send to Azure. + + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ @@ -1547,17 +2288,19 @@ class TaskSchedulingPolicy(Model): 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type + def __init__(self, **kwargs): + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = kwargs.get('node_fill_type', None) class UserAccount(Model): """Properties used to create a user on an Azure Batch node. - :param name: The name of the user account. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the user account. :type name: str - :param password: The password for the user account. + :param password: Required. The password for the user account. :type password: str :param elevation_level: The elevation level of the user account. nonAdmin - The auto user is a standard user without elevated access. admin - The @@ -1591,13 +2334,13 @@ class UserAccount(Model): 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration + def __init__(self, **kwargs): + super(UserAccount, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.password = kwargs.get('password', None) + self.elevation_level = kwargs.get('elevation_level', None) + self.linux_user_configuration = kwargs.get('linux_user_configuration', None) + self.windows_user_configuration = kwargs.get('windows_user_configuration', None) class UserIdentity(Model): @@ -1620,20 +2363,22 @@ class UserIdentity(Model): 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, } - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + self.auto_user = kwargs.get('auto_user', None) class VirtualMachineConfiguration(Model): """The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure. - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. + All required parameters must be populated in order to send to Azure. + + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be provisioned on compute nodes in the pool. The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. @@ -1682,639 +2427,75 @@ class VirtualMachineConfiguration(Model): 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration - - -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. - - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool - """ - - _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - } - - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates - - -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. - - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode - """ - - _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, - } - - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode + def __init__(self, **kwargs): + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.node_agent_sku_id = kwargs.get('node_agent_sku_id', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.data_disks = kwargs.get('data_disks', None) + self.license_type = kwargs.get('license_type', None) + self.container_configuration = kwargs.get('container_configuration', None) -class Application(ProxyResource): - """Contains information about an application in a Batch account. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version - + def __init__(self, **kwargs): + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode """ - _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, - } - _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync - - -class BatchAccount(Resource): - """Contains information about an Azure Batch account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'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}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, - } - - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None - - -class Certificate(ProxyResource): - """Contains information about a certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, - } - - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None - - -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - - -class Pool(ProxyResource): - """Contains information about a pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, - } - - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, **kwargs): + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = kwargs.get('login_mode', None) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py index c64ee92d4c21..edb71960c6fb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() + def __init__(self, *, format: str, **kwargs) -> None: + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) self.format = format +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, allow_updates: bool=None, default_version: str=None, **kwargs) -> None: + super(Application, self).__init__(**kwargs) + self.display_name = display_name + self.allow_updates = allow_updates + self.default_version = default_version + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None + + class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,8 +213,8 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() + def __init__(self, *, id: str, version: str=None, **kwargs) -> None: + super(ApplicationPackageReference, self).__init__(**kwargs) self.id = id self.version = version @@ -66,8 +222,10 @@ def __init__(self, id, version=None): class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,8 +246,8 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() + def __init__(self, *, evaluation_time, results: str=None, error=None, **kwargs) -> None: + super(AutoScaleRun, self).__init__(**kwargs) self.evaluation_time = evaluation_time self.results = results self.error = error @@ -98,11 +256,13 @@ def __init__(self, evaluation_time, results=None, error=None): class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,8 +279,8 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(AutoScaleRunError, self).__init__(**kwargs) self.code = code self.message = message self.details = details @@ -129,8 +289,10 @@ def __init__(self, code, message, details=None): class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,8 +309,8 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() + def __init__(self, *, formula: str, evaluation_interval=None, **kwargs) -> None: + super(AutoScaleSettings, self).__init__(**kwargs) self.formula = formula self.evaluation_interval = evaluation_interval @@ -156,8 +318,10 @@ def __init__(self, formula, evaluation_interval=None): class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str """ @@ -169,11 +333,40 @@ class AutoStorageBaseProperties(Model): 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() + def __init__(self, *, storage_account_id: str, **kwargs) -> None: + super(AutoStorageBaseProperties, self).__init__(**kwargs) self.storage_account_id = storage_account_id +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime + """ + + _validation = { + 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + } + + def __init__(self, *, storage_account_id: str, last_key_sync, **kwargs) -> None: + super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id, **kwargs) + self.last_key_sync = last_key_sync + + class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. @@ -194,84 +387,249 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() + def __init__(self, *, scope=None, elevation_level=None, **kwargs) -> None: + super(AutoUserSpecification, self).__init__(**kwargs) self.scope = scope self.elevation_level = elevation_level -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. +class Resource(Model): + """A definition of an Azure resource. - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'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}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class BatchAccount(Resource): + """Contains information about an Azure Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str - """ - - _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'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}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, *, location: str, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None, **kwargs) -> None: + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.auto_storage = auto_storage + self.pool_allocation_mode = pool_allocation_mode + self.key_vault_reference = key_vault_reference + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, 'secondary': {'key': 'secondary', 'type': 'str'}, } - def __init__(self): - super(BatchAccountKeys, self).__init__() + def __init__(self, **kwargs) -> None: + super(BatchAccountKeys, self).__init__(**kwargs) self.account_name = None self.primary = None self.secondary = None @@ -280,8 +638,10 @@ def __init__(self): class BatchAccountRegenerateKeyParameters(Model): """Parameters supplied to the RegenerateKey operation. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ @@ -293,8 +653,8 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() + def __init__(self, *, key_name, **kwargs) -> None: + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) self.key_name = key_name @@ -312,8 +672,8 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() + def __init__(self, *, tags=None, auto_storage=None, **kwargs) -> None: + super(BatchAccountUpdateParameters, self).__init__(**kwargs) self.tags = tags self.auto_storage = auto_storage @@ -337,11 +697,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs) -> None: + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,36 +812,102 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(CertificateBaseProperties, self).__init__(**kwargs) self.thumbprint_algorithm = thumbprint_algorithm self.thumbprint = thumbprint self.format = format -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. - This must exist inside the same account as the pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. - :type id: str - :param store_location: The location of the certificate store on the - compute node into which to install the certificate. The default value is - currentUser. This property is applicable only for pools configured with - Windows nodes (that is, created with cloudServiceConfiguration, or with - virtualMachineConfiguration using a Windows image reference). For Linux - compute nodes, the certificates are stored in a directory inside the task - working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - supplied to the task to query for this location. For certificates with - visibility of 'remoteUser', a 'certs' directory is created in the user's - home directory (e.g., /home/{user-name}/certs) and certificates are placed - in that directory. Possible values include: 'CurrentUser', 'LocalMachine' - :type store_location: str or - ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: The name of the certificate store on the compute node - into which to install the certificate. This property is applicable only - for pools configured with Windows nodes (that is, created with + 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 ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, data: str, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, password: str=None, **kwargs) -> None: + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.data = data + self.password = password + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. + This must exist inside the same account as the pool. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. + :type id: str + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' + :type store_location: str or + ~azure.mgmt.batch.models.CertificateStoreLocation + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only + for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but @@ -415,8 +930,8 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() + def __init__(self, *, id: str, store_location=None, store_name: str=None, visibility=None, **kwargs) -> None: + super(CertificateReference, self).__init__(**kwargs) self.id = id self.store_location = store_location self.store_name = store_name @@ -429,9 +944,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,8 +966,8 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) self.name = name @@ -485,23 +1002,85 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +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 CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,8 +1098,8 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() + def __init__(self, *, os_family: str, os_version: str=None, **kwargs) -> None: + super(CloudServiceConfiguration, self).__init__(**kwargs) self.os_family = os_family self.os_version = os_version @@ -531,7 +1110,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,8 +1140,8 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() + def __init__(self, *, container_image_names=None, container_registries=None, **kwargs) -> None: + super(ContainerConfiguration, self).__init__(**kwargs) self.container_image_names = container_image_names self.container_registries = container_registries @@ -568,12 +1149,14 @@ def __init__(self, container_image_names=None, container_registries=None): class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,8 +1171,8 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() + def __init__(self, *, user_name: str, password: str, registry_server: str=None, **kwargs) -> None: + super(ContainerRegistry, self).__init__(**kwargs) self.registry_server = registry_server self.user_name = user_name self.password = password @@ -599,9 +1182,11 @@ class DataDisk(Model): """Data Disk settings which will be used by the data disks associated to Compute Nodes in the pool. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1198,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,8 +1223,8 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() + def __init__(self, *, lun: int, disk_size_gb: int, caching=None, storage_account_type=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) self.lun = lun self.caching = caching self.disk_size_gb = disk_size_gb @@ -649,11 +1234,13 @@ def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,8 +1261,8 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() + def __init__(self, *, code: str, message: str, target: str=None, details=None, **kwargs) -> None: + super(DeleteCertificateError, self).__init__(**kwargs) self.code = code self.message = message self.target = target @@ -704,8 +1291,8 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() + def __init__(self, *, cloud_service_configuration=None, virtual_machine_configuration=None, **kwargs) -> None: + super(DeploymentConfiguration, self).__init__(**kwargs) self.cloud_service_configuration = cloud_service_configuration self.virtual_machine_configuration = virtual_machine_configuration @@ -713,7 +1300,9 @@ def __init__(self, cloud_service_configuration=None, virtual_machine_configurati class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,8 +1317,8 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() + def __init__(self, *, name: str, value: str=None, **kwargs) -> None: + super(EnvironmentSetting, self).__init__(**kwargs) self.name = name self.value = value @@ -767,8 +1356,8 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() + def __init__(self, *, resize_timeout=None, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, node_deallocation_option=None, **kwargs) -> None: + super(FixedScaleSettings, self).__init__(**kwargs) self.resize_timeout = resize_timeout self.target_dedicated_nodes = target_dedicated_nodes self.target_low_priority_nodes = target_low_priority_nodes @@ -815,8 +1404,8 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() + def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, id: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(**kwargs) self.publisher = publisher self.offer = offer self.sku = sku @@ -828,30 +1417,32 @@ class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,8 +1477,8 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() + def __init__(self, *, name: str, protocol, backend_port: int, frontend_port_range_start: int, frontend_port_range_end: int, network_security_group_rules=None, **kwargs) -> None: + super(InboundNatPool, self).__init__(**kwargs) self.name = name self.protocol = protocol self.backend_port = backend_port @@ -899,11 +1490,13 @@ def __init__(self, name, protocol, backend_port, frontend_port_range_start, fron class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,8 +1510,8 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() + def __init__(self, *, id: str, url: str, **kwargs) -> None: + super(KeyVaultReference, self).__init__(**kwargs) self.id = id self.url = url @@ -951,8 +1544,8 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() + def __init__(self, *, uid: int=None, gid: int=None, ssh_private_key: str=None, **kwargs) -> None: + super(LinuxUserConfiguration, self).__init__(**kwargs) self.uid = uid self.gid = gid self.ssh_private_key = ssh_private_key @@ -964,9 +1557,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,8 +1575,8 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(MetadataItem, self).__init__(**kwargs) self.name = name self.value = value @@ -1027,8 +1622,8 @@ class NetworkConfiguration(Model): 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() + def __init__(self, *, subnet_id: str=None, endpoint_configuration=None, **kwargs) -> None: + super(NetworkConfiguration, self).__init__(**kwargs) self.subnet_id = subnet_id self.endpoint_configuration = endpoint_configuration @@ -1036,22 +1631,25 @@ def __init__(self, subnet_id=None, endpoint_configuration=None): class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str """ @@ -1067,8 +1665,8 @@ class NetworkSecurityGroupRule(Model): 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() + def __init__(self, *, priority: int, access, source_address_prefix: str, **kwargs) -> None: + super(NetworkSecurityGroupRule, self).__init__(**kwargs) self.priority = priority self.access = access self.source_address_prefix = source_address_prefix @@ -1095,8 +1693,8 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) self.name = name self.display = display self.origin = origin @@ -1124,40 +1722,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) self.provider = provider self.operation = operation self.resource = resource self.description = description -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools - - -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,1151 +1744,758 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None - - -class ResizeError(Model): - """An error that occurred when resizing a pool. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param details: Additional details about the error. - :type details: list[~azure.mgmt.batch.models.ResizeError] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ResizeError]'}, - } - - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details - - -class ResizeOperationStatus(Model): - """Details about the current or last completed resize operation. - - Describes either the current operation (if the pool AllocationState is - Resizing) or the previously completed operation (if the AllocationState is - Steady). - - :param target_dedicated_nodes: The desired number of dedicated compute - nodes in the pool. - :type target_dedicated_nodes: int - :param target_low_priority_nodes: The desired number of low-priority - compute nodes in the pool. - :type target_low_priority_nodes: int - :param resize_timeout: The timeout for allocation of compute nodes to the - pool or removal of compute nodes from the pool. The default value is 15 - minutes. The minimum value is 5 minutes. If you specify a value less than - 5 minutes, the Batch service returns an error; if you are calling the REST - API directly, the HTTP status code is 400 (Bad Request). - :type resize_timeout: timedelta - :param node_deallocation_option: Determines what to do with a node and its - running task(s) if the pool size is decreasing. The default value is - requeue. Possible values include: 'Requeue', 'Terminate', - 'TaskCompletion', 'RetainedData' - :type node_deallocation_option: str or - ~azure.mgmt.batch.models.ComputeNodeDeallocationOption - :param start_time: The time when this resize operation was started. - :type start_time: datetime - :param errors: Details of any errors encountered while performing the last - resize on the pool. This property is set only if an error occurred during - the last pool resize, and only when the pool allocationState is Steady. - :type errors: list[~azure.mgmt.batch.models.ResizeError] - """ - - _attribute_map = { - 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, - 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, - 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, - 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[ResizeError]'}, - } - - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'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}'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None - - -class ResourceFile(Model): - """A single file or multiple files to be downloaded to a compute node. - - :param auto_storage_container_name: The storage container name in the auto - storage account. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. - :type auto_storage_container_name: str - :param storage_container_url: The URL of the blob container within Azure - Blob Storage. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. This URL must be readable and listable using anonymous access; - that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. - :type storage_container_url: str - :param http_url: The URL of the file to download. The - autoStorageContainerName, storageContainerUrl and httpUrl properties are - mutually exclusive and one of them must be specified. If the URL is Azure - Blob Storage, it must be readable using anonymous access; that is, the - Batch service does not present any credentials when downloading the blob. - There are two ways to get such a URL for a blob in Azure storage: include - a Shared Access Signature (SAS) granting read permissions on the blob, or - set the ACL for the blob or its container to allow public access. - :type http_url: str - :param blob_prefix: The blob prefix to use when downloading blobs from an - Azure Storage container. Only the blobs whose names begin with the - specified prefix will be downloaded. The property is valid only when - autoStorageContainerName or storageContainerUrl is used. This prefix can - be a partial filename or a subdirectory. If a prefix is not specified, all - the files in the container will be downloaded. - :type blob_prefix: str - :param file_path: The location on the compute node to which to download - the file, relative to the task's working directory. If the httpUrl - property is specified, the filePath is required and describes the path - which the file will be downloaded to, including the filename. Otherwise, - if the autoStorageContainerName or storageContainerUrl property is - specified, filePath is optional and is the directory to download the files - to. In the case where filePath is used as a directory, any directory - structure already associated with the input data will be retained in full - and appended to the specified filePath directory. The specified relative - path cannot break out of the task's working directory (for example by - using '..'). - :type file_path: str - :param file_mode: The file permission mode attribute in octal format. This - property applies only to files being downloaded to Linux compute nodes. It - will be ignored if it is specified for a resourceFile which will be - downloaded to a Windows node. If this property is not specified for a - Linux node, then a default value of 0770 is applied to the file. - :type file_mode: str - """ - - _attribute_map = { - 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, - 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, - 'http_url': {'key': 'httpUrl', 'type': 'str'}, - 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - 'file_mode': {'key': 'fileMode', 'type': 'str'}, - } - - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode - - -class ScaleSettings(Model): - """Scale settings for the pool. - - Defines the desired size of the pool. This can either be 'fixedScale' where - the requested targetDedicatedNodes is specified, or 'autoScale' which - defines a formula which is periodically reevaluated. If this property is - not specified, the pool will have a fixed scale with 0 - targetDedicatedNodes. - - :param fixed_scale: Fixed scale settings for the pool. This property and - autoScale are mutually exclusive and one of the properties must be - specified. - :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings - :param auto_scale: AutoScale settings for the pool. This property and - fixedScale are mutually exclusive and one of the properties must be - specified. - :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings - """ - - _attribute_map = { - 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, - 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, - } - - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale - - -class StartTask(Model): - """A task which is run when a compute node joins a pool in the Azure Batch - service, or when the compute node is rebooted or reimaged. - - :param command_line: The command line of the start task. The command line - does not run under a shell, and therefore cannot take advantage of shell - features such as environment variable expansion. If you want to take - advantage of such features, you should invoke the shell in the command - line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - MyCommand" in Linux. Required if any other properties of the startTask are - specified. - :type command_line: str - :param resource_files: A list of files that the Batch service will - download to the compute node before running the command line. - :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] - :param environment_settings: A list of environment variable settings for - the start task. - :type environment_settings: - list[~azure.mgmt.batch.models.EnvironmentSetting] - :param user_identity: The user identity under which the start task runs. - If omitted, the task runs as a non-administrative user unique to the task. - :type user_identity: ~azure.mgmt.batch.models.UserIdentity - :param max_task_retry_count: The maximum number of times the task may be - retried. The Batch service retries a task if its exit code is nonzero. - Note that this value specifically controls the number of retries. The - Batch service will try the task once, and may then retry up to this limit. - For example, if the maximum retry count is 3, Batch tries the task up to 4 - times (one initial try and 3 retries). If the maximum retry count is 0, - the Batch service does not retry the task. If the maximum retry count is - -1, the Batch service retries the task without limit. - :type max_task_retry_count: int - :param wait_for_success: Whether the Batch service should wait for the - start task to complete successfully (that is, to exit with exit code 0) - before scheduling any tasks on the compute node. If true and the start - task fails on a compute node, the Batch service retries the start task up - to its maximum retry count (maxTaskRetryCount). If the task has still not - completed successfully after all retries, then the Batch service marks the - compute node unusable, and will not schedule tasks to it. This condition - can be detected via the node state and scheduling error detail. If false, - the Batch service will not wait for the start task to complete. In this - case, other tasks can start executing on the compute node while the start - task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. - :type wait_for_success: bool - :param container_settings: The settings for the container under which the - start task runs. When this is specified, all directories recursively below - the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the - node) are mapped into the container, all task environment variables are - mapped into the container, and the task command line is executed in the - container. - :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings - """ - - _attribute_map = { - 'command_line': {'key': 'commandLine', 'type': 'str'}, - 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, - 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, - 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, - 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, - 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, - 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, - } - - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings - - -class TaskContainerSettings(Model): - """The container settings for a task. - - :param container_run_options: Additional options to the container create - command. These additional options are supplied as arguments to the "docker - create" command, in addition to those controlled by the Batch Service. - :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. - :type image_name: str - :param registry: The private registry which contains the container image. - This setting can be omitted if was already provided at pool creation. - :type registry: ~azure.mgmt.batch.models.ContainerRegistry - """ - - _validation = { - 'image_name': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { - 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, } - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry + def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, **kwargs) -> None: + super(Pool, self).__init__(**kwargs) + self.display_name = display_name + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = vm_size + self.deployment_configuration = deployment_configuration + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = scale_settings + self.auto_scale_run = None + self.inter_node_communication = inter_node_communication + self.network_configuration = network_configuration + self.max_tasks_per_node = max_tasks_per_node + self.task_scheduling_policy = task_scheduling_policy + self.user_accounts = user_accounts + self.metadata = metadata + self.start_task = start_task + self.certificates = certificates + self.application_packages = application_packages + self.application_licenses = application_licenses + self.resize_operation_status = None -class TaskSchedulingPolicy(Model): - """Specifies how tasks should be distributed across compute nodes. +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' - :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] """ _validation = { - 'node_fill_type': {'required': True}, + 'inbound_nat_pools': {'required': True}, } _attribute_map = { - 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, } - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type + def __init__(self, *, inbound_nat_pools, **kwargs) -> None: + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = inbound_nat_pools -class UserAccount(Model): - """Properties used to create a user on an Azure Batch node. +class ResizeError(Model): + """An error that occurred when resizing a pool. - :param name: The name of the user account. - :type name: str - :param password: The password for the user account. - :type password: str - :param elevation_level: The elevation level of the user account. nonAdmin - - The auto user is a standard user without elevated access. admin - The - auto user is a user with elevated access and operates with full - Administrator permissions. The default value is nonAdmin. Possible values - include: 'NonAdmin', 'Admin' - :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel - :param linux_user_configuration: The Linux-specific user configuration for - the user account. This property is ignored if specified on a Windows pool. - If not specified, the user is created with the default options. - :type linux_user_configuration: - ~azure.mgmt.batch.models.LinuxUserConfiguration - :param windows_user_configuration: The Windows-specific user configuration - for the user account. This property can only be specified if the user is - on a Windows pool. If not specified and on a Windows pool, the user is - created with the default options. - :type windows_user_configuration: - ~azure.mgmt.batch.models.WindowsUserConfiguration + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. + :type code: str + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. + :type message: str + :param details: Additional details about the error. + :type details: list[~azure.mgmt.batch.models.ResizeError] """ _validation = { - 'name': {'required': True}, - 'password': {'required': True}, + 'code': {'required': True}, + 'message': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, - 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, - 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ResizeError]'}, } - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(ResizeError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details -class UserIdentity(Model): - """The definition of the user identity under which the task is run. +class ResizeOperationStatus(Model): + """Details about the current or last completed resize operation. - Specify either the userName or autoUser property, but not both. + Describes either the current operation (if the pool AllocationState is + Resizing) or the previously completed operation (if the AllocationState is + Steady). - :param user_name: The name of the user identity under which the task is - run. The userName and autoUser properties are mutually exclusive; you must - specify one but not both. - :type user_name: str - :param auto_user: The auto user under which the task is run. The userName - and autoUser properties are mutually exclusive; you must specify one but - not both. - :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification + :param target_dedicated_nodes: The desired number of dedicated compute + nodes in the pool. + :type target_dedicated_nodes: int + :param target_low_priority_nodes: The desired number of low-priority + compute nodes in the pool. + :type target_low_priority_nodes: int + :param resize_timeout: The timeout for allocation of compute nodes to the + pool or removal of compute nodes from the pool. The default value is 15 + minutes. The minimum value is 5 minutes. If you specify a value less than + 5 minutes, the Batch service returns an error; if you are calling the REST + API directly, the HTTP status code is 400 (Bad Request). + :type resize_timeout: timedelta + :param node_deallocation_option: Determines what to do with a node and its + running task(s) if the pool size is decreasing. The default value is + requeue. Possible values include: 'Requeue', 'Terminate', + 'TaskCompletion', 'RetainedData' + :type node_deallocation_option: str or + ~azure.mgmt.batch.models.ComputeNodeDeallocationOption + :param start_time: The time when this resize operation was started. + :type start_time: datetime + :param errors: Details of any errors encountered while performing the last + resize on the pool. This property is set only if an error occurred during + the last pool resize, and only when the pool allocationState is Steady. + :type errors: list[~azure.mgmt.batch.models.ResizeError] """ _attribute_map = { - 'user_name': {'key': 'userName', 'type': 'str'}, - 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, + 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, + 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, + 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, + 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user + def __init__(self, *, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None, **kwargs) -> None: + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = target_dedicated_nodes + self.target_low_priority_nodes = target_low_priority_nodes + self.resize_timeout = resize_timeout + self.node_deallocation_option = node_deallocation_option + self.start_time = start_time + self.errors = errors -class VirtualMachineConfiguration(Model): - """The configuration for compute nodes in a pool based on the Azure Virtual - Machines infrastructure. +class ResourceFile(Model): + """A single file or multiple files to be downloaded to a compute node. - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. - :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be - provisioned on compute nodes in the pool. The Batch node agent is a - program that runs on each node in the pool, and provides the - command-and-control interface between the node and the Batch service. - There are different implementations of the node agent, known as SKUs, for - different operating systems. You must specify a node agent SKU which - matches the selected image reference. To get the list of supported node - agent SKUs along with their list of verified image references, see the - 'List supported node agent SKUs' operation. - :type node_agent_sku_id: str - :param windows_configuration: Windows operating system settings on the - virtual machine. This property must not be specified if the imageReference - specifies a Linux OS image. - :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration - :param data_disks: The configuration for data disks attached to the - compute nodes in the pool. This property must be specified if the compute - nodes in the pool need to have empty data disks attached to them. - :type data_disks: list[~azure.mgmt.batch.models.DataDisk] - :param license_type: The type of on-premises license to be used when - deploying the operating system. This only applies to images that contain - the Windows operating system, and should only be used when you hold valid - on-premises licenses for the nodes which will be deployed. If omitted, no - on-premises licensing discount is applied. Values are: - Windows_Server - The on-premises license is for Windows Server. - Windows_Client - The on-premises license is for Windows Client. - :type license_type: str - :param container_configuration: The container configuration for the pool. - If specified, setup is performed on each node in the pool to allow tasks - to run in containers. All regular tasks and job manager tasks run on this - pool must specify the containerSettings property, and all other tasks may - specify it. - :type container_configuration: - ~azure.mgmt.batch.models.ContainerConfiguration + :param auto_storage_container_name: The storage container name in the auto + storage account. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. + :type auto_storage_container_name: str + :param storage_container_url: The URL of the blob container within Azure + Blob Storage. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. This URL must be readable and listable using anonymous access; + that is, the Batch service does not present any credentials when + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. + :type storage_container_url: str + :param http_url: The URL of the file to download. The + autoStorageContainerName, storageContainerUrl and httpUrl properties are + mutually exclusive and one of them must be specified. If the URL is Azure + Blob Storage, it must be readable using anonymous access; that is, the + Batch service does not present any credentials when downloading the blob. + There are two ways to get such a URL for a blob in Azure storage: include + a Shared Access Signature (SAS) granting read permissions on the blob, or + set the ACL for the blob or its container to allow public access. + :type http_url: str + :param blob_prefix: The blob prefix to use when downloading blobs from an + Azure Storage container. Only the blobs whose names begin with the + specified prefix will be downloaded. The property is valid only when + autoStorageContainerName or storageContainerUrl is used. This prefix can + be a partial filename or a subdirectory. If a prefix is not specified, all + the files in the container will be downloaded. + :type blob_prefix: str + :param file_path: The location on the compute node to which to download + the file, relative to the task's working directory. If the httpUrl + property is specified, the filePath is required and describes the path + which the file will be downloaded to, including the filename. Otherwise, + if the autoStorageContainerName or storageContainerUrl property is + specified, filePath is optional and is the directory to download the files + to. In the case where filePath is used as a directory, any directory + structure already associated with the input data will be retained in full + and appended to the specified filePath directory. The specified relative + path cannot break out of the task's working directory (for example by + using '..'). + :type file_path: str + :param file_mode: The file permission mode attribute in octal format. This + property applies only to files being downloaded to Linux compute nodes. It + will be ignored if it is specified for a resourceFile which will be + downloaded to a Windows node. If this property is not specified for a + Linux node, then a default value of 0770 is applied to the file. + :type file_mode: str """ - _validation = { - 'image_reference': {'required': True}, - 'node_agent_sku_id': {'required': True}, - } - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, + 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, + 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, + 'http_url': {'key': 'httpUrl', 'type': 'str'}, + 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration + def __init__(self, *, auto_storage_container_name: str=None, storage_container_url: str=None, http_url: str=None, blob_prefix: str=None, file_path: str=None, file_mode: str=None, **kwargs) -> None: + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = auto_storage_container_name + self.storage_container_url = storage_container_url + self.http_url = http_url + self.blob_prefix = blob_prefix + self.file_path = file_path + self.file_mode = file_mode -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. +class ScaleSettings(Model): + """Scale settings for the pool. - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool + Defines the desired size of the pool. This can either be 'fixedScale' where + the requested targetDedicatedNodes is specified, or 'autoScale' which + defines a formula which is periodically reevaluated. If this property is + not specified, the pool will have a fixed scale with 0 + targetDedicatedNodes. + + :param fixed_scale: Fixed scale settings for the pool. This property and + autoScale are mutually exclusive and one of the properties must be + specified. + :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings + :param auto_scale: AutoScale settings for the pool. This property and + fixedScale are mutually exclusive and one of the properties must be + specified. + :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings """ _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, + 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates + def __init__(self, *, fixed_scale=None, auto_scale=None, **kwargs) -> None: + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = fixed_scale + self.auto_scale = auto_scale -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. +class StartTask(Model): + """A task which is run when a compute node joins a pool in the Azure Batch + service, or when the compute node is rebooted or reimaged. - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + + :param command_line: The command line of the start task. The command line + does not run under a shell, and therefore cannot take advantage of shell + features such as environment variable expansion. If you want to take + advantage of such features, you should invoke the shell in the command + line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c + MyCommand" in Linux. Required if any other properties of the startTask are + specified. + :type command_line: str + :param resource_files: A list of files that the Batch service will + download to the compute node before running the command line. + :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] + :param environment_settings: A list of environment variable settings for + the start task. + :type environment_settings: + list[~azure.mgmt.batch.models.EnvironmentSetting] + :param user_identity: The user identity under which the start task runs. + If omitted, the task runs as a non-administrative user unique to the task. + :type user_identity: ~azure.mgmt.batch.models.UserIdentity + :param max_task_retry_count: The maximum number of times the task may be + retried. The Batch service retries a task if its exit code is nonzero. + Note that this value specifically controls the number of retries. The + Batch service will try the task once, and may then retry up to this limit. + For example, if the maximum retry count is 3, Batch tries the task up to 4 + times (one initial try and 3 retries). If the maximum retry count is 0, + the Batch service does not retry the task. If the maximum retry count is + -1, the Batch service retries the task without limit. + :type max_task_retry_count: int + :param wait_for_success: Whether the Batch service should wait for the + start task to complete successfully (that is, to exit with exit code 0) + before scheduling any tasks on the compute node. If true and the start + task fails on a compute node, the Batch service retries the start task up + to its maximum retry count (maxTaskRetryCount). If the task has still not + completed successfully after all retries, then the Batch service marks the + compute node unusable, and will not schedule tasks to it. This condition + can be detected via the node state and scheduling error detail. If false, + the Batch service will not wait for the start task to complete. In this + case, other tasks can start executing on the compute node while the start + task is still running; and even if the start task fails, new tasks will + continue to be scheduled on the node. The default is false. + :type wait_for_success: bool + :param container_settings: The settings for the container under which the + start task runs. When this is specified, all directories recursively below + the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the + node) are mapped into the container, all task environment variables are + mapped into the container, and the task command line is executed in the + container. + :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings """ _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, + 'command_line': {'key': 'commandLine', 'type': 'str'}, + 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, + 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, + 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, + 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, + 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, + 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode + def __init__(self, *, command_line: str=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count: int=None, wait_for_success: bool=None, container_settings=None, **kwargs) -> None: + super(StartTask, self).__init__(**kwargs) + self.command_line = command_line + self.resource_files = resource_files + self.environment_settings = environment_settings + self.user_identity = user_identity + self.max_task_retry_count = max_task_retry_count + self.wait_for_success = wait_for_success + self.container_settings = container_settings -class Application(ProxyResource): - """Contains information about an application in a Batch account. +class TaskContainerSettings(Model): + """The container settings for a task. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str + :param container_run_options: Additional options to the container create + command. These additional options are supplied as arguments to the "docker + create" command, in addition to those controlled by the Batch Service. + :type container_run_options: str + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. + :type image_name: str + :param registry: The private registry which contains the container image. + This setting can be omitted if was already provided at pool creation. + :type registry: ~azure.mgmt.batch.models.ContainerRegistry """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'image_name': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, } - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version + def __init__(self, *, image_name: str, container_run_options: str=None, registry=None, **kwargs) -> None: + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = container_run_options + self.image_name = image_name + self.registry = registry -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. +class TaskSchedulingPolicy(Model): + """Specifies how tasks should be distributed across compute nodes. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' + :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, + 'node_fill_type': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, *, node_fill_type, **kwargs) -> None: + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = node_fill_type -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class UserAccount(Model): + """Properties used to create a user on an Azure Batch node. + + All required parameters must be populated in order to send to Azure. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + :param name: Required. The name of the user account. + :type name: str + :param password: Required. The password for the user account. + :type password: str + :param elevation_level: The elevation level of the user account. nonAdmin + - The auto user is a standard user without elevated access. admin - The + auto user is a user with elevated access and operates with full + Administrator permissions. The default value is nonAdmin. Possible values + include: 'NonAdmin', 'Admin' + :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel + :param linux_user_configuration: The Linux-specific user configuration for + the user account. This property is ignored if specified on a Windows pool. + If not specified, the user is created with the default options. + :type linux_user_configuration: + ~azure.mgmt.batch.models.LinuxUserConfiguration + :param windows_user_configuration: The Windows-specific user configuration + for the user account. This property can only be specified if the user is + on a Windows pool. If not specified and on a Windows pool, the user is + created with the default options. + :type windows_user_configuration: + ~azure.mgmt.batch.models.WindowsUserConfiguration """ _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, + 'name': {'required': True}, + 'password': {'required': True}, } _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, + 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, + 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync + def __init__(self, *, name: str, password: str, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None, **kwargs) -> None: + super(UserAccount, self).__init__(**kwargs) + self.name = name + self.password = password + self.elevation_level = elevation_level + self.linux_user_configuration = linux_user_configuration + self.windows_user_configuration = windows_user_configuration -class BatchAccount(Resource): - """Contains information about an Azure Batch account. +class UserIdentity(Model): + """The definition of the user identity under which the task is run. - Variables are only populated by the server, and will be ignored when - sending a request. + Specify either the userName or autoUser property, but not both. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int + :param user_name: The name of the user identity under which the task is + run. The userName and autoUser properties are mutually exclusive; you must + specify one but not both. + :type user_name: str + :param auto_user: The auto user under which the task is run. The userName + and autoUser properties are mutually exclusive; you must specify one but + not both. + :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'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}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, } - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None + def __init__(self, *, user_name: str=None, auto_user=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.user_name = user_name + self.auto_user = auto_user -class Certificate(ProxyResource): - """Contains information about a certificate. +class VirtualMachineConfiguration(Model): + """The configuration for compute nodes in a pool based on the Azure Virtual + Machines infrastructure. - 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 ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. + :type image_reference: ~azure.mgmt.batch.models.ImageReference + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be + provisioned on compute nodes in the pool. The Batch node agent is a + program that runs on each node in the pool, and provides the + command-and-control interface between the node and the Batch service. + There are different implementations of the node agent, known as SKUs, for + different operating systems. You must specify a node agent SKU which + matches the selected image reference. To get the list of supported node + agent SKUs along with their list of verified image references, see the + 'List supported node agent SKUs' operation. + :type node_agent_sku_id: str + :param windows_configuration: Windows operating system settings on the + virtual machine. This property must not be specified if the imageReference + specifies a Linux OS image. + :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration + :param data_disks: The configuration for data disks attached to the + compute nodes in the pool. This property must be specified if the compute + nodes in the pool need to have empty data disks attached to them. + :type data_disks: list[~azure.mgmt.batch.models.DataDisk] + :param license_type: The type of on-premises license to be used when + deploying the operating system. This only applies to images that contain + the Windows operating system, and should only be used when you hold valid + on-premises licenses for the nodes which will be deployed. If omitted, no + on-premises licensing discount is applied. Values are: + Windows_Server - The on-premises license is for Windows Server. + Windows_Client - The on-premises license is for Windows Client. + :type license_type: str + :param container_configuration: The container configuration for the pool. + If specified, setup is performed on each node in the pool to allow tasks + to run in containers. All regular tasks and job manager tasks run on this + pool must specify the containerSettings property, and all other tasks may + specify it. + :type container_configuration: + ~azure.mgmt.batch.models.ContainerConfiguration """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, + 'image_reference': {'required': True}, + 'node_agent_sku_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None + def __init__(self, *, image_reference, node_agent_sku_id: str, windows_configuration=None, data_disks=None, license_type: str=None, container_configuration=None, **kwargs) -> None: + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = image_reference + self.node_agent_sku_id = node_agent_sku_id + self.windows_configuration = windows_configuration + self.data_disks = data_disks + self.license_type = license_type + self.container_configuration = container_configuration -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - + def __init__(self, **kwargs) -> None: + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class Pool(ProxyResource): - """Contains information about a pool. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, + _attribute_map = { + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } + def __init__(self, *, enable_automatic_updates: bool=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = enable_automatic_updates + + +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. + + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, *, login_mode=None, **kwargs) -> None: + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = login_mode diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py index 1eb94dd020cd..1865025a41f0 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py @@ -25,8 +25,6 @@ class BatchAccountPaged(Paged): def __init__(self, *args, **kwargs): super(BatchAccountPaged, self).__init__(*args, **kwargs) - - class ApplicationPackagePaged(Paged): """ A paging container for iterating over a list of :class:`ApplicationPackage ` object @@ -40,8 +38,6 @@ class ApplicationPackagePaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPackagePaged, self).__init__(*args, **kwargs) - - class ApplicationPaged(Paged): """ A paging container for iterating over a list of :class:`Application ` object @@ -55,8 +51,6 @@ class ApplicationPaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPaged, self).__init__(*args, **kwargs) - - class OperationPaged(Paged): """ A paging container for iterating over a list of :class:`Operation ` object @@ -70,8 +64,6 @@ class OperationPaged(Paged): def __init__(self, *args, **kwargs): super(OperationPaged, self).__init__(*args, **kwargs) - - class CertificatePaged(Paged): """ A paging container for iterating over a list of :class:`Certificate ` object @@ -85,8 +77,6 @@ class CertificatePaged(Paged): def __init__(self, *args, **kwargs): super(CertificatePaged, self).__init__(*args, **kwargs) - - class PoolPaged(Paged): """ A paging container for iterating over a list of :class:`Pool ` object diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py index 457cbd3470cd..818f748e2734 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py @@ -9,13 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_account_operations import BatchAccountOperations -from .application_package_operations import ApplicationPackageOperations -from .application_operations import ApplicationOperations -from .location_operations import LocationOperations -from .operations import Operations -from .certificate_operations import CertificateOperations -from .pool_operations import PoolOperations +from ._batch_account_operations import BatchAccountOperations +from ._application_package_operations import ApplicationPackageOperations +from ._application_operations import ApplicationOperations +from ._location_operations import LocationOperations +from ._operations import Operations +from ._certificate_operations import CertificateOperations +from ._pool_operations import PoolOperations __all__ = [ 'BatchAccountOperations', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py similarity index 92% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py index b447de1a57b8..2ceacf73cd3c 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py @@ -19,11 +19,13 @@ class ApplicationOperations(object): """ApplicationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -77,6 +79,7 @@ def create( # 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()) @@ -92,9 +95,8 @@ def create( body_content = None # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -102,7 +104,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -150,7 +151,6 @@ def delete( # 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: @@ -159,8 +159,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -210,7 +210,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -219,8 +219,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -228,7 +228,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -279,6 +278,7 @@ def update( # 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()) @@ -291,9 +291,8 @@ def update( body_content = self._serialize.body(parameters, 'Application') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -301,7 +300,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Application', response) @@ -334,8 +332,7 @@ def list( ~azure.mgmt.batch.models.ApplicationPaged[~azure.mgmt.batch.models.Application] :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'] @@ -358,7 +355,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -367,9 +364,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -379,12 +380,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py similarity index 92% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py index 0823f92e92f0..a3e792b0b3af 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py @@ -19,11 +19,13 @@ class ApplicationPackageOperations(object): """ApplicationPackageOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -82,6 +84,7 @@ def activate( # 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()) @@ -94,9 +97,8 @@ def activate( body_content = self._serialize.body(parameters, 'ActivateApplicationPackageParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -104,7 +106,6 @@ def activate( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -158,6 +159,7 @@ def create( # 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()) @@ -173,9 +175,8 @@ def create( body_content = None # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -183,7 +184,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -234,7 +234,6 @@ def delete( # 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: @@ -243,8 +242,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -297,7 +296,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -306,8 +305,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -315,7 +314,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicationPackage', response) @@ -351,8 +349,7 @@ def list( ~azure.mgmt.batch.models.ApplicationPackagePaged[~azure.mgmt.batch.models.ApplicationPackage] :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'] @@ -376,7 +373,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -385,9 +382,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -397,12 +398,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py similarity index 84% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py index 70fc40e1b618..635b97d5e875 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class BatchAccountOperations(object): """BatchAccountOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -57,6 +59,7 @@ def _create_initial( # 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()) @@ -69,9 +72,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'BatchAccountCreateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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, 202]: exp = CloudError(response) @@ -90,16 +92,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. @@ -118,13 +117,16 @@ def create( :type parameters: ~azure.mgmt.batch.models.BatchAccountCreateParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns BatchAccount - or ClientRawResponse if raw=true + :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 BatchAccount or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.BatchAccount] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.BatchAccount]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -135,30 +137,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'Location': 'str', 'Retry-After': 'int', @@ -172,12 +152,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} def update( @@ -221,6 +202,7 @@ def update( # 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()) @@ -233,9 +215,8 @@ def update( body_content = self._serialize.body(parameters, 'BatchAccountUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -243,7 +224,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccount', response) @@ -272,7 +252,6 @@ def _delete_initial( # 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: @@ -281,8 +260,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -299,7 +278,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified Batch account. :param resource_group_name: The name of the resource group that @@ -308,12 +287,14 @@ def delete( :param account_name: The name of the Batch account. :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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -323,30 +304,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -355,12 +314,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}'} def get( @@ -397,7 +357,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -406,8 +366,8 @@ def get( 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, stream=False, **operation_config) + 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) @@ -415,7 +375,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccount', response) @@ -441,8 +400,7 @@ def list( ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] :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'] @@ -461,7 +419,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -470,9 +428,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -482,12 +444,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts'} @@ -510,8 +470,7 @@ def list_by_resource_group( ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] :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'] @@ -531,7 +490,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -540,9 +499,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -552,12 +515,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts'} @@ -596,7 +557,6 @@ def synchronize_auto_storage_keys( # 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: @@ -605,8 +565,8 @@ def synchronize_auto_storage_keys( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -657,6 +617,7 @@ def regenerate_key( # 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()) @@ -669,9 +630,8 @@ def regenerate_key( body_content = self._serialize.body(parameters, 'BatchAccountRegenerateKeyParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -679,7 +639,6 @@ def regenerate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccountKeys', response) @@ -730,7 +689,7 @@ def get_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -739,8 +698,8 @@ def get_keys( 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, stream=False, **operation_config) + 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) @@ -748,7 +707,6 @@ def get_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchAccountKeys', response) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py similarity index 84% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py index 8db5cd991d95..eb726f288a3f 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class CertificateOperations(object): """CertificateOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -69,8 +71,7 @@ def list_by_batch_account( ~azure.mgmt.batch.models.CertificatePaged[~azure.mgmt.batch.models.Certificate] :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_batch_account.metadata['url'] @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -106,9 +107,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -118,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates'} @@ -147,6 +150,7 @@ def _create_initial( # 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()) @@ -163,9 +167,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -183,16 +186,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new certificate inside the specified account. :param resource_group_name: The name of the resource group that @@ -217,13 +217,16 @@ def create( will be ignored. :type if_none_match: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Certificate - or ClientRawResponse if raw=true + :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 Certificate or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Certificate] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Certificate]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -237,30 +240,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'ETag': 'str', } @@ -273,12 +254,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} def update( @@ -327,6 +309,7 @@ def update( # 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()) @@ -341,18 +324,16 @@ def update( body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { @@ -386,7 +367,6 @@ def _delete_initial( # 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: @@ -395,8 +375,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -413,7 +393,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified certificate. :param resource_group_name: The name of the resource group that @@ -426,12 +406,14 @@ def delete( match the certificate data in the request. For example SHA1-a3d1c5. :type certificate_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -442,30 +424,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -474,12 +434,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} def get( @@ -521,7 +482,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -530,17 +491,16 @@ def get( 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, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { @@ -603,7 +563,7 @@ def cancel_deletion( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -612,17 +572,16 @@ def cancel_deletion( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Certificate', response) header_dict = { diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py similarity index 91% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py index 84b9be79e2c0..686dc2b3097b 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py @@ -19,11 +19,13 @@ class LocationOperations(object): """LocationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -69,7 +71,7 @@ def get_quotas( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -78,8 +80,8 @@ def get_quotas( 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, stream=False, **operation_config) + 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) @@ -87,7 +89,6 @@ def get_quotas( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BatchLocationQuota', response) @@ -133,6 +134,7 @@ def check_name_availability( # 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()) @@ -145,9 +147,8 @@ def check_name_availability( body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: exp = CloudError(response) @@ -155,7 +156,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResult', response) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py similarity index 82% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py index 4774273e7176..799529b363cb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/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: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ 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-12-01" + self.api_version = "2019-04-01" self.config = config @@ -51,8 +53,7 @@ def list( ~azure.mgmt.batch.models.OperationPaged[~azure.mgmt.batch.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'] @@ -67,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -76,9 +77,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -88,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.Batch/operations'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py similarity index 85% rename from sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py rename to sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py index 02cab779f816..95715cda042a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,11 +21,13 @@ class PoolOperations(object): """PoolOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-12-01" + self.api_version = "2019-04-01" self.config = config @@ -79,8 +81,7 @@ def list_by_batch_account( ~azure.mgmt.batch.models.PoolPaged[~azure.mgmt.batch.models.Pool] :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_batch_account.metadata['url'] @@ -107,7 +108,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -116,9 +117,13 @@ def internal_paging(next_link=None, raw=False): 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, stream=False, **operation_config) + 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) @@ -128,12 +133,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools'} @@ -157,6 +160,7 @@ def _create_initial( # 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()) @@ -173,9 +177,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'Pool') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -193,16 +196,13 @@ def _create_initial( if raw: client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized def create( - self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new pool inside the specified account. :param resource_group_name: The name of the resource group that @@ -225,13 +225,16 @@ def create( ignored. :type if_none_match: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Pool or - ClientRawResponse if raw=true + :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 Pool or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Pool] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Pool]] :raises: :class:`CloudError` """ raw_result = self._create_initial( @@ -245,30 +248,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **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 - header_dict = { 'ETag': 'str', } @@ -281,12 +262,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} def update( @@ -335,6 +317,7 @@ def update( # 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()) @@ -349,18 +332,16 @@ def update( body_content = self._serialize.body(parameters, 'Pool') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -394,7 +375,6 @@ def _delete_initial( # 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: @@ -403,8 +383,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: exp = CloudError(response) @@ -421,7 +401,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified pool. :param resource_group_name: The name of the resource group that @@ -433,12 +413,14 @@ def delete( account. :type pool_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -449,30 +431,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 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) client_raw_response.add_headers({ @@ -481,12 +441,13 @@ def get_long_running_output(response): }) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = 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) + 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.Batch/batchAccounts/{accountName}/pools/{poolName}'} def get( @@ -527,7 +488,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -536,17 +497,16 @@ def get( 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, stream=False, **operation_config) + 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 header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -599,7 +559,7 @@ def disable_auto_scale( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -608,17 +568,16 @@ def disable_auto_scale( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { @@ -680,7 +639,7 @@ def stop_resize( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -689,17 +648,16 @@ def stop_resize( 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, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('Pool', response) header_dict = { From 788a67bc2d72454b6a3701b8723c291f70f4dd2d Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 19/37] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- .../azure-core/azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 9 +++------ sdk/core/azure-core/tests/test_tracing_decorator.py | 9 +++------ 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not 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__ child = parent_span.span(name=name) 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 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not 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__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 8b43ddf71a62..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -139,13 +139,10 @@ async def test_span_with_opencensus_complicated(value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 473060f6097a..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -171,13 +171,10 @@ def test_span_with_opencensus_complicated(self, value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 7c43c67dc97ba0045a5d8dc87d258aa7078d3c80 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 14:46:26 -0700 Subject: [PATCH 20/37] Import aiohttp only when necessary (#6496) --- sdk/core/azure-core/azure/core/pipeline_client_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/azure-core/azure/core/pipeline_client_async.py b/sdk/core/azure-core/azure/core/pipeline_client_async.py index 39b6c87c61fb..ad70f9ea7434 100644 --- a/sdk/core/azure-core/azure/core/pipeline_client_async.py +++ b/sdk/core/azure-core/azure/core/pipeline_client_async.py @@ -48,7 +48,6 @@ from .pipeline import AsyncPipeline from .pipeline.transport.base import PipelineClientBase from .pipeline.policies import ContentDecodePolicy -from .pipeline.transport import AioHttpTransport from .pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -121,6 +120,7 @@ def _build_pipeline(self, config, **kwargs): # pylint: disable=no-self-use ] if not transport: + from .pipeline.transport import AioHttpTransport transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies) From bdbaf9af979566aad5d0d9cb647f2ca34512ebd6 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 19:03:11 -0700 Subject: [PATCH 21/37] 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 7f51d2db900fe83e523bb999414ced7c41c74c0b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 29 Jul 2019 19:44:44 -0700 Subject: [PATCH 22/37] [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 9b0f055aad23a3caf7ab4cc5523ebe20facfa104 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 23/37] 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 5bfb9f408a0187801d0d3a707c0d43a19624beb5 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 24/37] 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 ea286bf783cb532c2790d4fe4af1af1f73a86c32 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Tue, 30 Jul 2019 16:27:05 -0700 Subject: [PATCH 25/37] 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 64c46b55b1c0f2812c5ed7b502244710c9c44599 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 26/37] 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 d85ccc8b75d9f73dfeeee927c2c5adba2c9e2c84 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Jul 2019 01:19:55 -0700 Subject: [PATCH 27/37] [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 9879350da2ca27443b1474cbc054f85e54da8764 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 28/37] 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 2241dcd709626ff43ef3e258d9636e4da6e5b9d7 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:33:30 -0700 Subject: [PATCH 29/37] 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 cb0c861994c9c5d23b32e16316338ee712258ced Mon Sep 17 00:00:00 2001 From: Bryan Van de Ven Date: Wed, 31 Jul 2019 11:28:59 -0700 Subject: [PATCH 30/37] 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 557b75da6ff536b15c924fbe4fcfead097aee874 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:17:51 -0700 Subject: [PATCH 31/37] 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 37286d00af7d27355274aa3fc17da5d1ed9de3f0 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 32/37] 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 7f45c0e47c2f1bf3519d2a63299f0f5cdf3a8b96 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 33/37] 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 4b8fb58f9794c074c2f9ffef82e6f66c85eaf4e3 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 18:04:30 -0700 Subject: [PATCH 34/37] 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 7808a8647f4e72bfbd9391bde3f23c4da11c920e 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 35/37] 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 369295fae8bfb7f0b1a69b220bd8727415caf39d Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Wed, 31 Jul 2019 19:44:58 -0700 Subject: [PATCH 36/37] 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 f545270b5069459351f8470386bd797f4bf386cd Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2019 05:32:22 +0000 Subject: [PATCH 37/37] Generated from 7f1426ef3538b7f45bf29f899122fb21713e3986 (#61) chore: jsonfmt batch Fix spelling issues added in #6629 from "example" values in spec --- .../mgmt/batch/_batch_management_client.py | 2 +- .../azure/mgmt/batch/models/__init__.py | 17 + .../models/_batch_management_client_enums.py | 8 +- .../azure/mgmt/batch/models/_models.py | 291 +++++++++++++++-- .../azure/mgmt/batch/models/_models_py3.py | 299 ++++++++++++++++-- .../operations/_application_operations.py | 4 +- .../_application_package_operations.py | 4 +- .../operations/_batch_account_operations.py | 4 +- .../operations/_certificate_operations.py | 4 +- .../batch/operations/_location_operations.py | 4 +- .../mgmt/batch/operations/_operations.py | 4 +- .../mgmt/batch/operations/_pool_operations.py | 4 +- 12 files changed, 585 insertions(+), 60 deletions(-) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py index 6cdcc5ca3eaf..93830a182c23 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py @@ -60,7 +60,7 @@ def __init__( super(BatchManagementClient, 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 = '2019-04-01' + self.api_version = '2019-08-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py index b17bdd9834c9..0e44daa97447 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py @@ -20,6 +20,8 @@ from ._models_py3 import AutoStorageBaseProperties from ._models_py3 import AutoStorageProperties from ._models_py3 import AutoUserSpecification + from ._models_py3 import AzureBlobFileSystemConfiguration + from ._models_py3 import AzureFileShareConfiguration from ._models_py3 import BatchAccount from ._models_py3 import BatchAccountCreateParameters from ._models_py3 import BatchAccountKeys @@ -32,6 +34,7 @@ from ._models_py3 import CertificateReference from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import CIFSMountConfiguration from ._models_py3 import CloudServiceConfiguration from ._models_py3 import ContainerConfiguration from ._models_py3 import ContainerRegistry @@ -45,8 +48,10 @@ from ._models_py3 import KeyVaultReference from ._models_py3 import LinuxUserConfiguration from ._models_py3 import MetadataItem + from ._models_py3 import MountConfiguration from ._models_py3 import NetworkConfiguration from ._models_py3 import NetworkSecurityGroupRule + from ._models_py3 import NFSMountConfiguration from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import Pool @@ -77,6 +82,8 @@ from ._models import AutoStorageBaseProperties from ._models import AutoStorageProperties from ._models import AutoUserSpecification + from ._models import AzureBlobFileSystemConfiguration + from ._models import AzureFileShareConfiguration from ._models import BatchAccount from ._models import BatchAccountCreateParameters from ._models import BatchAccountKeys @@ -89,6 +96,7 @@ from ._models import CertificateReference from ._models import CheckNameAvailabilityParameters from ._models import CheckNameAvailabilityResult + from ._models import CIFSMountConfiguration from ._models import CloudServiceConfiguration from ._models import ContainerConfiguration from ._models import ContainerRegistry @@ -102,8 +110,10 @@ from ._models import KeyVaultReference from ._models import LinuxUserConfiguration from ._models import MetadataItem + from ._models import MountConfiguration from ._models import NetworkConfiguration from ._models import NetworkSecurityGroupRule + from ._models import NFSMountConfiguration from ._models import Operation from ._models import OperationDisplay from ._models import Pool @@ -148,6 +158,7 @@ ElevationLevel, LoginMode, AutoUserScope, + ContainerWorkingDirectory, CertificateStoreLocation, CertificateVisibility, NameAvailabilityReason, @@ -164,6 +175,8 @@ 'AutoStorageBaseProperties', 'AutoStorageProperties', 'AutoUserSpecification', + 'AzureBlobFileSystemConfiguration', + 'AzureFileShareConfiguration', 'BatchAccount', 'BatchAccountCreateParameters', 'BatchAccountKeys', @@ -176,6 +189,7 @@ 'CertificateReference', 'CheckNameAvailabilityParameters', 'CheckNameAvailabilityResult', + 'CIFSMountConfiguration', 'CloudServiceConfiguration', 'ContainerConfiguration', 'ContainerRegistry', @@ -189,8 +203,10 @@ 'KeyVaultReference', 'LinuxUserConfiguration', 'MetadataItem', + 'MountConfiguration', 'NetworkConfiguration', 'NetworkSecurityGroupRule', + 'NFSMountConfiguration', 'Operation', 'OperationDisplay', 'Pool', @@ -234,6 +250,7 @@ 'ElevationLevel', 'LoginMode', 'AutoUserScope', + 'ContainerWorkingDirectory', 'CertificateStoreLocation', 'CertificateVisibility', 'NameAvailabilityReason', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py index 0bd6782557aa..126edf4d370a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py @@ -129,6 +129,12 @@ class AutoUserScope(str, Enum): pool = "Pool" #: Specifies that the task runs as the common auto user account which is created on every node in a pool. +class ContainerWorkingDirectory(str, Enum): + + task_working_directory = "TaskWorkingDirectory" #: Use the standard Batch service task working directory, which will contain the Task resource files populated by Batch. + container_image_default = "ContainerImageDefault" #: Using container image defined working directory. Beware that this directory will not contain the resource files downloaded by Batch. + + class CertificateStoreLocation(str, Enum): current_user = "CurrentUser" #: Certificates should be installed to the CurrentUser certificate store. @@ -137,7 +143,7 @@ class CertificateStoreLocation(str, Enum): class CertificateVisibility(str, Enum): - start_task = "StartTask" #: The certificate should be visible to the user account under which the start task is run. + start_task = "StartTask" #: The certificate should be visible to the user account under which the start task is run. Note that if AutoUser Scope is Pool for both the StartTask and a Task, this certificate will be visible to the Task as well. task = "Task" #: The certificate should be visible to the user accounts under which job tasks are run. remote_user = "RemoteUser" #: The certificate should be visible to the user accounts under which users remotely access the node. diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py index 4b01ce194f4f..dab9f9a63fbc 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py @@ -371,14 +371,16 @@ class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. - :param scope: The scope for the auto user. The default value is task. + :param scope: The scope for the auto user. The default value is Pool. If + the pool is running Windows a value of Task should be specified if + stricter isolation between tasks is required. For example, if the task + mutates the registry in a way which could impact other tasks, or if + certificates have been specified on the pool which should not be + accessible by normal tasks but should be accessible by start tasks. Possible values include: 'Task', 'Pool' :type scope: str or ~azure.mgmt.batch.models.AutoUserScope - :param elevation_level: The elevation level of the auto user. nonAdmin - - The auto user is a standard user without elevated access. admin - The auto - user is a user with elevated access and operates with full Administrator - permissions. The default value is nonAdmin. Possible values include: - 'NonAdmin', 'Admin' + :param elevation_level: The elevation level of the auto user. The default + value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel """ @@ -393,6 +395,101 @@ def __init__(self, **kwargs): self.elevation_level = kwargs.get('elevation_level', None) +class AzureBlobFileSystemConfiguration(Model): + """Blobfuse file system details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param container_name: Required. The Azure Blob Storage container name. + :type container_name: str + :param account_key: The Azure Storage account key. This property is + mutually exclusive with sasKey and one must be specified. + :type account_key: str + :param sas_key: The Azure Storage SAS token. This property is mutually + exclusive with accountKey and one must be specified. + :type sas_key: str + :param blobfuse_options: Additional command line options to pass to the + mount command. These are 'net use' options in Windows and 'mount' options + in Linux. + :type blobfuse_options: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + """ + + _validation = { + 'account_name': {'required': True}, + 'container_name': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'blobfuse_options': {'key': 'blobfuseOptions', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFileSystemConfiguration, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.container_name = kwargs.get('container_name', None) + self.account_key = kwargs.get('account_key', None) + self.sas_key = kwargs.get('sas_key', None) + self.blobfuse_options = kwargs.get('blobfuse_options', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + + +class AzureFileShareConfiguration(Model): + """Azure Files details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param azure_file_url: Required. The Azure Files URL. + :type azure_file_url: str + :param account_key: Required. The Azure Storage account key. + :type account_key: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'account_name': {'required': True}, + 'azure_file_url': {'required': True}, + 'account_key': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'azure_file_url': {'key': 'azureFileUrl', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareConfiguration, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.azure_file_url = kwargs.get('azure_file_url', None) + self.account_key = kwargs.get('account_key', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) + + class Resource(Model): """A definition of an Azure resource. @@ -1009,6 +1106,51 @@ def __init__(self, **kwargs): self.message = None +class CIFSMountConfiguration(Model): + """CIFS file system details. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. The user to use for authentication against the + CIFS file system. + :type username: str + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + :param password: Required. The password to authenticate with. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CIFSMountConfiguration, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.source = kwargs.get('source', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) + self.password = kwargs.get('password', None) + + class CloudError(Model): """An error response from the Batch service. @@ -1179,8 +1321,9 @@ def __init__(self, **kwargs): class DataDisk(Model): - """Data Disk settings which will be used by the data disks associated to - Compute Nodes in the pool. + """Settings which will be used by the data disks associated to Compute Nodes + in the Pool. When using attached data disks, you need to mount and format + the disks from within a VM to use them. All required parameters must be populated in order to send to Azure. @@ -1377,22 +1520,25 @@ class ImageReference(Model): image. For example, UbuntuServer or WindowsServer. :type offer: str :param sku: The SKU of the Azure Virtual Machines Marketplace image. For - example, 14.04.0-LTS or 2012-R2-Datacenter. + example, 18.04-LTS or 2019-Datacenter. :type sku: str :param version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :type version: str - :param id: The ARM resource identifier of the virtual machine image. - Computes nodes of the pool will be created using this custom image. This - is of the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - This property is mutually exclusive with other properties. The virtual - machine image must be in the same region and subscription as the Azure - Batch account. For information about the firewall settings for Batch node - agent to communicate with Batch service see - https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - . + :param id: The ARM resource identifier of the Virtual Machine Image or + Shared Image Gallery Image. Compute Nodes of the Pool will be created + using this Image Id. This is of either the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} + for Virtual Machine Image or + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId} + for SIG image. This property is mutually exclusive with other properties. + For Virtual Machine Image it must be in the same region and subscription + as the Azure Batch account. For SIG image it must have replicas in the + same region as the Azure Batch account. For information about the firewall + settings for the Batch node agent to communicate with the Batch service + see + https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. :type id: str """ @@ -1581,6 +1727,46 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) +class MountConfiguration(Model): + """The file system to mount on each node. + + Each property is mutually exclusive. + + :param azure_blob_file_system_configuration: The Azure Storage container + to mount using blob FUSE on each node. This property is mutually exclusive + with all other properties. + :type azure_blob_file_system_configuration: + ~azure.mgmt.batch.models.AzureBlobFileSystemConfiguration + :param nfs_mount_configuration: The NFS file system to mount on each node. + This property is mutually exclusive with all other properties. + :type nfs_mount_configuration: + ~azure.mgmt.batch.models.NFSMountConfiguration + :param cifs_mount_configuration: The CIFS/SMB file system to mount on each + node. This property is mutually exclusive with all other properties. + :type cifs_mount_configuration: + ~azure.mgmt.batch.models.CIFSMountConfiguration + :param azure_file_share_configuration: The Azure File Share to mount on + each node. This is CIFS based for linux and net use for for windows, and + this property is mutually exclusive with all other properties. + :type azure_file_share_configuration: + ~azure.mgmt.batch.models.AzureFileShareConfiguration + """ + + _attribute_map = { + 'azure_blob_file_system_configuration': {'key': 'azureBlobFileSystemConfiguration', 'type': 'AzureBlobFileSystemConfiguration'}, + 'nfs_mount_configuration': {'key': 'nfsMountConfiguration', 'type': 'NFSMountConfiguration'}, + 'cifs_mount_configuration': {'key': 'cifsMountConfiguration', 'type': 'CIFSMountConfiguration'}, + 'azure_file_share_configuration': {'key': 'azureFileShareConfiguration', 'type': 'AzureFileShareConfiguration'}, + } + + def __init__(self, **kwargs): + super(MountConfiguration, self).__init__(**kwargs) + self.azure_blob_file_system_configuration = kwargs.get('azure_blob_file_system_configuration', None) + self.nfs_mount_configuration = kwargs.get('nfs_mount_configuration', None) + self.cifs_mount_configuration = kwargs.get('cifs_mount_configuration', None) + self.azure_file_share_configuration = kwargs.get('azure_file_share_configuration', None) + + class NetworkConfiguration(Model): """The network configuration for a pool. @@ -1615,17 +1801,27 @@ class NetworkConfiguration(Model): pools with the virtualMachineConfiguration property. :type endpoint_configuration: ~azure.mgmt.batch.models.PoolEndpointConfiguration + :param public_ips: The list of public IPs which the Batch service will use + when provisioning Compute Nodes. The number of IPs specified here limits + the maximum size of the Pool - 50 dedicated nodes or 20 low-priority nodes + can be allocated for each public IP. For example, a pool needing 150 + dedicated VMs would need at least 3 public IPs specified. This is of the + form: + /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + :type public_ips: list[str] """ _attribute_map = { 'subnet_id': {'key': 'subnetId', 'type': 'str'}, 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, } def __init__(self, **kwargs): super(NetworkConfiguration, self).__init__(**kwargs) self.subnet_id = kwargs.get('subnet_id', None) self.endpoint_configuration = kwargs.get('endpoint_configuration', None) + self.public_ips = kwargs.get('public_ips', None) class NetworkSecurityGroupRule(Model): @@ -1651,6 +1847,12 @@ class NetworkSecurityGroupRule(Model): addresses). If any other values are provided the request fails with HTTP status code 400. :type source_address_prefix: str + :param source_port_ranges: The source port ranges to match for the rule. + Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port + ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the + port ranges or ports can't overlap. If any other values are provided the + request fails with HTTP status code 400. Default value will be *. + :type source_port_ranges: list[str] """ _validation = { @@ -1663,6 +1865,7 @@ class NetworkSecurityGroupRule(Model): 'priority': {'key': 'priority', 'type': 'int'}, 'access': {'key': 'access', 'type': 'NetworkSecurityGroupRuleAccess'}, 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -1670,6 +1873,41 @@ def __init__(self, **kwargs): self.priority = kwargs.get('priority', None) self.access = kwargs.get('access', None) self.source_address_prefix = kwargs.get('source_address_prefix', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + + +class NFSMountConfiguration(Model): + """NFS file system detail. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NFSMountConfiguration, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) class Operation(Model): @@ -1861,6 +2099,10 @@ class Pool(ProxyResource): completed resize operation. :vartype resize_operation_status: ~azure.mgmt.batch.models.ResizeOperationStatus + :param mount_configuration: A list of file systems to mount on each node + in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + :type mount_configuration: + list[~azure.mgmt.batch.models.MountConfiguration] """ _validation = { @@ -1909,6 +2151,7 @@ class Pool(ProxyResource): 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'mount_configuration': {'key': 'properties.mountConfiguration', 'type': '[MountConfiguration]'}, } def __init__(self, **kwargs): @@ -1937,6 +2180,7 @@ def __init__(self, **kwargs): self.application_packages = kwargs.get('application_packages', None) self.application_licenses = kwargs.get('application_licenses', None) self.resize_operation_status = None + self.mount_configuration = kwargs.get('mount_configuration', None) class PoolEndpointConfiguration(Model): @@ -2202,7 +2446,7 @@ class StartTask(Model): the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. + continue to be scheduled on the node. The default is true. :type wait_for_success: bool :param container_settings: The settings for the container under which the start task runs. When this is specified, all directories recursively below @@ -2251,6 +2495,11 @@ class TaskContainerSettings(Model): :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. :type registry: ~azure.mgmt.batch.models.ContainerRegistry + :param working_directory: A flag to indicate where the container task + working directory is. The default is 'taskWorkingDirectory'. Possible + values include: 'TaskWorkingDirectory', 'ContainerImageDefault' + :type working_directory: str or + ~azure.mgmt.batch.models.ContainerWorkingDirectory """ _validation = { @@ -2261,6 +2510,7 @@ class TaskContainerSettings(Model): 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, 'image_name': {'key': 'imageName', 'type': 'str'}, 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'working_directory': {'key': 'workingDirectory', 'type': 'ContainerWorkingDirectory'}, } def __init__(self, **kwargs): @@ -2268,6 +2518,7 @@ def __init__(self, **kwargs): self.container_run_options = kwargs.get('container_run_options', None) self.image_name = kwargs.get('image_name', None) self.registry = kwargs.get('registry', None) + self.working_directory = kwargs.get('working_directory', None) class TaskSchedulingPolicy(Model): diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py index edb71960c6fb..1a287b5e2e90 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py @@ -371,14 +371,16 @@ class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. - :param scope: The scope for the auto user. The default value is task. + :param scope: The scope for the auto user. The default value is Pool. If + the pool is running Windows a value of Task should be specified if + stricter isolation between tasks is required. For example, if the task + mutates the registry in a way which could impact other tasks, or if + certificates have been specified on the pool which should not be + accessible by normal tasks but should be accessible by start tasks. Possible values include: 'Task', 'Pool' :type scope: str or ~azure.mgmt.batch.models.AutoUserScope - :param elevation_level: The elevation level of the auto user. nonAdmin - - The auto user is a standard user without elevated access. admin - The auto - user is a user with elevated access and operates with full Administrator - permissions. The default value is nonAdmin. Possible values include: - 'NonAdmin', 'Admin' + :param elevation_level: The elevation level of the auto user. The default + value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel """ @@ -393,6 +395,101 @@ def __init__(self, *, scope=None, elevation_level=None, **kwargs) -> None: self.elevation_level = elevation_level +class AzureBlobFileSystemConfiguration(Model): + """Blobfuse file system details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param container_name: Required. The Azure Blob Storage container name. + :type container_name: str + :param account_key: The Azure Storage account key. This property is + mutually exclusive with sasKey and one must be specified. + :type account_key: str + :param sas_key: The Azure Storage SAS token. This property is mutually + exclusive with accountKey and one must be specified. + :type sas_key: str + :param blobfuse_options: Additional command line options to pass to the + mount command. These are 'net use' options in Windows and 'mount' options + in Linux. + :type blobfuse_options: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + """ + + _validation = { + 'account_name': {'required': True}, + 'container_name': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'blobfuse_options': {'key': 'blobfuseOptions', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, container_name: str, relative_mount_path: str, account_key: str=None, sas_key: str=None, blobfuse_options: str=None, **kwargs) -> None: + super(AzureBlobFileSystemConfiguration, self).__init__(**kwargs) + self.account_name = account_name + self.container_name = container_name + self.account_key = account_key + self.sas_key = sas_key + self.blobfuse_options = blobfuse_options + self.relative_mount_path = relative_mount_path + + +class AzureFileShareConfiguration(Model): + """Azure Files details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param azure_file_url: Required. The Azure Files URL. + :type azure_file_url: str + :param account_key: Required. The Azure Storage account key. + :type account_key: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'account_name': {'required': True}, + 'azure_file_url': {'required': True}, + 'account_key': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'azure_file_url': {'key': 'azureFileUrl', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, azure_file_url: str, account_key: str, relative_mount_path: str, mount_options: str=None, **kwargs) -> None: + super(AzureFileShareConfiguration, self).__init__(**kwargs) + self.account_name = account_name + self.azure_file_url = azure_file_url + self.account_key = account_key + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options + + class Resource(Model): """A definition of an Azure resource. @@ -1009,6 +1106,51 @@ def __init__(self, **kwargs) -> None: self.message = None +class CIFSMountConfiguration(Model): + """CIFS file system details. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. The user to use for authentication against the + CIFS file system. + :type username: str + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + :param password: Required. The password to authenticate with. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, username: str, source: str, relative_mount_path: str, password: str, mount_options: str=None, **kwargs) -> None: + super(CIFSMountConfiguration, self).__init__(**kwargs) + self.username = username + self.source = source + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options + self.password = password + + class CloudError(Model): """An error response from the Batch service. @@ -1179,8 +1321,9 @@ def __init__(self, *, user_name: str, password: str, registry_server: str=None, class DataDisk(Model): - """Data Disk settings which will be used by the data disks associated to - Compute Nodes in the pool. + """Settings which will be used by the data disks associated to Compute Nodes + in the Pool. When using attached data disks, you need to mount and format + the disks from within a VM to use them. All required parameters must be populated in order to send to Azure. @@ -1377,22 +1520,25 @@ class ImageReference(Model): image. For example, UbuntuServer or WindowsServer. :type offer: str :param sku: The SKU of the Azure Virtual Machines Marketplace image. For - example, 14.04.0-LTS or 2012-R2-Datacenter. + example, 18.04-LTS or 2019-Datacenter. :type sku: str :param version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :type version: str - :param id: The ARM resource identifier of the virtual machine image. - Computes nodes of the pool will be created using this custom image. This - is of the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - This property is mutually exclusive with other properties. The virtual - machine image must be in the same region and subscription as the Azure - Batch account. For information about the firewall settings for Batch node - agent to communicate with Batch service see - https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - . + :param id: The ARM resource identifier of the Virtual Machine Image or + Shared Image Gallery Image. Compute Nodes of the Pool will be created + using this Image Id. This is of either the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} + for Virtual Machine Image or + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId} + for SIG image. This property is mutually exclusive with other properties. + For Virtual Machine Image it must be in the same region and subscription + as the Azure Batch account. For SIG image it must have replicas in the + same region as the Azure Batch account. For information about the firewall + settings for the Batch node agent to communicate with the Batch service + see + https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. :type id: str """ @@ -1581,6 +1727,46 @@ def __init__(self, *, name: str, value: str, **kwargs) -> None: self.value = value +class MountConfiguration(Model): + """The file system to mount on each node. + + Each property is mutually exclusive. + + :param azure_blob_file_system_configuration: The Azure Storage container + to mount using blob FUSE on each node. This property is mutually exclusive + with all other properties. + :type azure_blob_file_system_configuration: + ~azure.mgmt.batch.models.AzureBlobFileSystemConfiguration + :param nfs_mount_configuration: The NFS file system to mount on each node. + This property is mutually exclusive with all other properties. + :type nfs_mount_configuration: + ~azure.mgmt.batch.models.NFSMountConfiguration + :param cifs_mount_configuration: The CIFS/SMB file system to mount on each + node. This property is mutually exclusive with all other properties. + :type cifs_mount_configuration: + ~azure.mgmt.batch.models.CIFSMountConfiguration + :param azure_file_share_configuration: The Azure File Share to mount on + each node. This is CIFS based for linux and net use for for windows, and + this property is mutually exclusive with all other properties. + :type azure_file_share_configuration: + ~azure.mgmt.batch.models.AzureFileShareConfiguration + """ + + _attribute_map = { + 'azure_blob_file_system_configuration': {'key': 'azureBlobFileSystemConfiguration', 'type': 'AzureBlobFileSystemConfiguration'}, + 'nfs_mount_configuration': {'key': 'nfsMountConfiguration', 'type': 'NFSMountConfiguration'}, + 'cifs_mount_configuration': {'key': 'cifsMountConfiguration', 'type': 'CIFSMountConfiguration'}, + 'azure_file_share_configuration': {'key': 'azureFileShareConfiguration', 'type': 'AzureFileShareConfiguration'}, + } + + def __init__(self, *, azure_blob_file_system_configuration=None, nfs_mount_configuration=None, cifs_mount_configuration=None, azure_file_share_configuration=None, **kwargs) -> None: + super(MountConfiguration, self).__init__(**kwargs) + self.azure_blob_file_system_configuration = azure_blob_file_system_configuration + self.nfs_mount_configuration = nfs_mount_configuration + self.cifs_mount_configuration = cifs_mount_configuration + self.azure_file_share_configuration = azure_file_share_configuration + + class NetworkConfiguration(Model): """The network configuration for a pool. @@ -1615,17 +1801,27 @@ class NetworkConfiguration(Model): pools with the virtualMachineConfiguration property. :type endpoint_configuration: ~azure.mgmt.batch.models.PoolEndpointConfiguration + :param public_ips: The list of public IPs which the Batch service will use + when provisioning Compute Nodes. The number of IPs specified here limits + the maximum size of the Pool - 50 dedicated nodes or 20 low-priority nodes + can be allocated for each public IP. For example, a pool needing 150 + dedicated VMs would need at least 3 public IPs specified. This is of the + form: + /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + :type public_ips: list[str] """ _attribute_map = { 'subnet_id': {'key': 'subnetId', 'type': 'str'}, 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, } - def __init__(self, *, subnet_id: str=None, endpoint_configuration=None, **kwargs) -> None: + def __init__(self, *, subnet_id: str=None, endpoint_configuration=None, public_ips=None, **kwargs) -> None: super(NetworkConfiguration, self).__init__(**kwargs) self.subnet_id = subnet_id self.endpoint_configuration = endpoint_configuration + self.public_ips = public_ips class NetworkSecurityGroupRule(Model): @@ -1651,6 +1847,12 @@ class NetworkSecurityGroupRule(Model): addresses). If any other values are provided the request fails with HTTP status code 400. :type source_address_prefix: str + :param source_port_ranges: The source port ranges to match for the rule. + Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port + ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the + port ranges or ports can't overlap. If any other values are provided the + request fails with HTTP status code 400. Default value will be *. + :type source_port_ranges: list[str] """ _validation = { @@ -1663,13 +1865,49 @@ class NetworkSecurityGroupRule(Model): 'priority': {'key': 'priority', 'type': 'int'}, 'access': {'key': 'access', 'type': 'NetworkSecurityGroupRuleAccess'}, 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, } - def __init__(self, *, priority: int, access, source_address_prefix: str, **kwargs) -> None: + def __init__(self, *, priority: int, access, source_address_prefix: str, source_port_ranges=None, **kwargs) -> None: super(NetworkSecurityGroupRule, self).__init__(**kwargs) self.priority = priority self.access = access self.source_address_prefix = source_address_prefix + self.source_port_ranges = source_port_ranges + + +class NFSMountConfiguration(Model): + """NFS file system detail. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, *, source: str, relative_mount_path: str, mount_options: str=None, **kwargs) -> None: + super(NFSMountConfiguration, self).__init__(**kwargs) + self.source = source + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options class Operation(Model): @@ -1861,6 +2099,10 @@ class Pool(ProxyResource): completed resize operation. :vartype resize_operation_status: ~azure.mgmt.batch.models.ResizeOperationStatus + :param mount_configuration: A list of file systems to mount on each node + in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + :type mount_configuration: + list[~azure.mgmt.batch.models.MountConfiguration] """ _validation = { @@ -1909,9 +2151,10 @@ class Pool(ProxyResource): 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'mount_configuration': {'key': 'properties.mountConfiguration', 'type': '[MountConfiguration]'}, } - def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, **kwargs) -> None: + def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, mount_configuration=None, **kwargs) -> None: super(Pool, self).__init__(**kwargs) self.display_name = display_name self.last_modified = None @@ -1937,6 +2180,7 @@ def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_conf self.application_packages = application_packages self.application_licenses = application_licenses self.resize_operation_status = None + self.mount_configuration = mount_configuration class PoolEndpointConfiguration(Model): @@ -2202,7 +2446,7 @@ class StartTask(Model): the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. + continue to be scheduled on the node. The default is true. :type wait_for_success: bool :param container_settings: The settings for the container under which the start task runs. When this is specified, all directories recursively below @@ -2251,6 +2495,11 @@ class TaskContainerSettings(Model): :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. :type registry: ~azure.mgmt.batch.models.ContainerRegistry + :param working_directory: A flag to indicate where the container task + working directory is. The default is 'taskWorkingDirectory'. Possible + values include: 'TaskWorkingDirectory', 'ContainerImageDefault' + :type working_directory: str or + ~azure.mgmt.batch.models.ContainerWorkingDirectory """ _validation = { @@ -2261,13 +2510,15 @@ class TaskContainerSettings(Model): 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, 'image_name': {'key': 'imageName', 'type': 'str'}, 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'working_directory': {'key': 'workingDirectory', 'type': 'ContainerWorkingDirectory'}, } - def __init__(self, *, image_name: str, container_run_options: str=None, registry=None, **kwargs) -> None: + def __init__(self, *, image_name: str, container_run_options: str=None, registry=None, working_directory=None, **kwargs) -> None: super(TaskContainerSettings, self).__init__(**kwargs) self.container_run_options = container_run_options self.image_name = image_name self.registry = registry + self.working_directory = working_directory class TaskSchedulingPolicy(Model): diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py index 2ceacf73cd3c..d78823852422 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py @@ -25,7 +25,7 @@ class ApplicationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py index a3e792b0b3af..6e125e1993cf 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py @@ -25,7 +25,7 @@ class ApplicationPackageOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py index 635b97d5e875..936fb33a68c9 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py @@ -27,7 +27,7 @@ class BatchAccountOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py index eb726f288a3f..faea89158f23 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py @@ -27,7 +27,7 @@ class CertificateOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py index 686dc2b3097b..c2ab551fb4eb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py @@ -25,7 +25,7 @@ class LocationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py index 799529b363cb..2c6a2e4e32d9 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py index 95715cda042a..22d5a28593c6 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py @@ -27,7 +27,7 @@ class PoolOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-04-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2019-08-01" self.config = config