diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/CHANGELOG.md b/sdk/connectedcache/azure-mgmt-connectedcache/CHANGELOG.md index 37753eb037f7..5a7415744f36 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/CHANGELOG.md +++ b/sdk/connectedcache/azure-mgmt-connectedcache/CHANGELOG.md @@ -1,5 +1,68 @@ # Release History +## 1.0.0b2 (2025-05-06) + +### Features Added + + - Model `AdditionalCacheNodeProperties` added property `issues_list` + - Model `AdditionalCacheNodeProperties` added property `issues_count` + - Model `AdditionalCacheNodeProperties` added property `current_tls_certificate` + - Model `AdditionalCacheNodeProperties` added property `last_auto_update_info` + - Model `AdditionalCacheNodeProperties` added property `creation_method` + - Model `AdditionalCacheNodeProperties` added property `tls_status` + - Model `CacheNodeInstallProperties` added property `tls_certificate_provisioning_key` + - Model `CacheNodeInstallProperties` added property `drive_configuration` + - Model `CacheNodeInstallProperties` added property `proxy_url_configuration` + - Added model `MccCacheNodeAutoUpdateHistory` + - Added model `MccCacheNodeAutoUpdateHistoryProperties` + - Added model `MccCacheNodeAutoUpdateInfo` + - Added model `MccCacheNodeIssueHistory` + - Added model `MccCacheNodeIssueHistoryProperties` + - Added model `MccCacheNodeTlsCertificate` + - Added model `MccCacheNodeTlsCertificateHistory` + - Added model `MccCacheNodeTlsCertificateProperties` + - Added model `MccIssue` + - Model `EnterpriseMccCacheNodesOperationsOperations` added method `get_cache_node_auto_update_history` + - Model `EnterpriseMccCacheNodesOperationsOperations` added method `get_cache_node_mcc_issue_details_history` + - Model `EnterpriseMccCacheNodesOperationsOperations` added method `get_cache_node_tls_certificate_history` + - Model `IspCacheNodesOperationsOperations` added method `get_cache_node_auto_update_history` + - Model `IspCacheNodesOperationsOperations` added method `get_cache_node_mcc_issue_details_history` + - Method `AdditionalCacheNodeProperties.__init__` has a new overload `def __init__(self: None, cache_node_properties_details_issues_list: Optional[List[str]], drive_configuration: Optional[List[_models.CacheNodeDriveConfiguration]], bgp_configuration: Optional[_models.BgpConfiguration], proxy_url_configuration: Optional[_models.ProxyUrlConfiguration], is_proxy_required: Optional[Union[str, _models.ProxyRequired]], os_type: Optional[Union[str, _models.OsType]], auto_update_version: Optional[str], update_info_details: Optional[str], update_requested_date_time: Optional[datetime], creation_method: Optional[int], optional_property1: Optional[str], optional_property2: Optional[str], optional_property3: Optional[str], optional_property4: Optional[str], optional_property5: Optional[str])` + - Method `CacheNodeInstallProperties.__init__` has a new overload `def __init__(self: None, customer_id: Optional[str], cache_node_id: Optional[str], drive_configuration: Optional[List[_models.CacheNodeDriveConfiguration]], proxy_url_configuration: Optional[_models.ProxyUrlConfiguration])` + - Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])` + - Method `MccCacheNodeAutoUpdateHistory.__init__` has a new overload `def __init__(self: None, location: str, tags: Optional[Dict[str, str]], properties: Optional[_models.MccCacheNodeAutoUpdateHistoryProperties])` + - Method `MccCacheNodeAutoUpdateHistory.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `MccCacheNodeAutoUpdateHistory.__init__` has a new overload `def __init__(self: None, location: str, tags: Optional[Dict[str, str]])` + - Method `MccCacheNodeAutoUpdateHistory.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `MccCacheNodeAutoUpdateHistoryProperties.__init__` has a new overload `def __init__(self: None, auto_update_history: Optional[List[_models.MccCacheNodeAutoUpdateInfo]])` + - Method `MccCacheNodeAutoUpdateHistoryProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `MccCacheNodeIssueHistory.__init__` has a new overload `def __init__(self: None, location: str, tags: Optional[Dict[str, str]], properties: Optional[_models.MccCacheNodeIssueHistoryProperties])` + - Method `MccCacheNodeIssueHistory.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `MccCacheNodeIssueHistory.__init__` has a new overload `def __init__(self: None, location: str, tags: Optional[Dict[str, str]])` + - Method `MccCacheNodeIssueHistory.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `MccCacheNodeIssueHistoryProperties.__init__` has a new overload `def __init__(self: None, mcc_issue_history: Optional[List[_models.MccIssue]])` + - Method `MccCacheNodeIssueHistoryProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `MccCacheNodeTlsCertificateHistory.__init__` has a new overload `def __init__(self: None, location: str, tags: Optional[Dict[str, str]], properties: Optional[_models.MccCacheNodeTlsCertificateProperties])` + - Method `MccCacheNodeTlsCertificateHistory.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `MccCacheNodeTlsCertificateHistory.__init__` has a new overload `def __init__(self: None, location: str, tags: Optional[Dict[str, str]])` + - Method `MccCacheNodeTlsCertificateHistory.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `MccCacheNodeTlsCertificateProperties.__init__` has a new overload `def __init__(self: None, tls_certificate_history: Optional[List[_models.MccCacheNodeTlsCertificate]])` + - Method `MccCacheNodeTlsCertificateProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + +### Breaking Changes + + - Deleted or renamed client operation group `ConnectedCacheMgmtClient.enterprise_customer_operations` + - Deleted or renamed client operation group `ConnectedCacheMgmtClient.cache_nodes_operations` + - Model `AdditionalCacheNodeProperties` deleted or renamed its instance variable `proxy_url` + - Model `AdditionalCacheNodeProperties` deleted or renamed its instance variable `update_cycle_type` + - Model `AdditionalCustomerProperties` deleted or renamed its instance variable `peering_db_last_update_time` + - Deleted or renamed model `CacheNodeOldResponse` + - Deleted or renamed model `CacheNodePreviewResource` + - Deleted or renamed model `CycleType` + - Deleted or renamed model `EnterprisePreviewResource` + - Deleted or renamed model `CacheNodesOperationsOperations` + - Deleted or renamed model `EnterpriseCustomerOperationsOperations` + ## 1.0.0b1 (2024-11-21) ### Other Changes diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/README.md b/sdk/connectedcache/azure-mgmt-connectedcache/README.md index 79307778f62a..f90866e50802 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/README.md +++ b/sdk/connectedcache/azure-mgmt-connectedcache/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Connectedcache Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json b/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json index b4a21ddfeacf..fe45167666fb 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json +++ b/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json @@ -1,6 +1,6 @@ { - "commit": "14f4f6b25fe74f90f4ee74fdac5cd7e05d419245", + "commit": "bd63bf3710616fd0dc1d883b0760899ca7f9babd", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/connectedcache/ConnectedCache.Management", - "@azure-tools/typespec-python": "0.36.4" + "@azure-tools/typespec-python": "0.44.1" } \ No newline at end of file diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/apiview-properties.json b/sdk/connectedcache/azure-mgmt-connectedcache/apiview-properties.json new file mode 100644 index 000000000000..98821d2d6a55 --- /dev/null +++ b/sdk/connectedcache/azure-mgmt-connectedcache/apiview-properties.json @@ -0,0 +1,112 @@ +{ + "CrossLanguagePackageId": "Microsoft.ConnectedCache", + "CrossLanguageDefinitionId": { + "azure.mgmt.connectedcache.models.AdditionalCacheNodeProperties": "Microsoft.ConnectedCache.AdditionalCacheNodeProperties", + "azure.mgmt.connectedcache.models.AdditionalCustomerProperties": "Microsoft.ConnectedCache.AdditionalCustomerProperties", + "azure.mgmt.connectedcache.models.BgpCidrsConfiguration": "Microsoft.ConnectedCache.BgpCidrsConfiguration", + "azure.mgmt.connectedcache.models.BgpConfiguration": "Microsoft.ConnectedCache.BgpConfiguration", + "azure.mgmt.connectedcache.models.CacheNodeDriveConfiguration": "Microsoft.ConnectedCache.CacheNodeDriveConfiguration", + "azure.mgmt.connectedcache.models.CacheNodeEntity": "Microsoft.ConnectedCache.CacheNodeEntity", + "azure.mgmt.connectedcache.models.CacheNodeInstallProperties": "Microsoft.ConnectedCache.CacheNodeInstallProperties", + "azure.mgmt.connectedcache.models.CacheNodeProperty": "Microsoft.ConnectedCache.CacheNodeProperty", + "azure.mgmt.connectedcache.models.ConnectedCachePatchResource": "Microsoft.ConnectedCache.ConnectedCachePatchResource", + "azure.mgmt.connectedcache.models.CustomerEntity": "Microsoft.ConnectedCache.CustomerEntity", + "azure.mgmt.connectedcache.models.CustomerProperty": "Microsoft.ConnectedCache.CustomerProperty", + "azure.mgmt.connectedcache.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.connectedcache.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.connectedcache.models.EnterpriseMccCacheNodeResource": "Microsoft.ConnectedCache.EnterpriseMccCacheNodeResource", + "azure.mgmt.connectedcache.models.EnterpriseMccCustomerResource": "Microsoft.ConnectedCache.EnterpriseMccCustomerResource", + "azure.mgmt.connectedcache.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.connectedcache.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.connectedcache.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.connectedcache.models.IspCacheNodeResource": "Microsoft.ConnectedCache.IspCacheNodeResource", + "azure.mgmt.connectedcache.models.IspCustomerResource": "Microsoft.ConnectedCache.IspCustomerResource", + "azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateHistory": "Microsoft.ConnectedCache.MccCacheNodeAutoUpdateHistory", + "azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateHistoryProperties": "Microsoft.ConnectedCache.MccCacheNodeAutoUpdateHistoryProperties", + "azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateInfo": "Microsoft.ConnectedCache.MccCacheNodeAutoUpdateInfo", + "azure.mgmt.connectedcache.models.MccCacheNodeBgpCidrDetails": "Microsoft.ConnectedCache.MccCacheNodeBgpCidrDetails", + "azure.mgmt.connectedcache.models.MccCacheNodeInstallDetails": "Microsoft.ConnectedCache.MccCacheNodeInstallDetails", + "azure.mgmt.connectedcache.models.MccCacheNodeIssueHistory": "Microsoft.ConnectedCache.MccCacheNodeIssueHistory", + "azure.mgmt.connectedcache.models.MccCacheNodeIssueHistoryProperties": "Microsoft.ConnectedCache.MccCacheNodeIssueHistoryProperties", + "azure.mgmt.connectedcache.models.MccCacheNodeTlsCertificate": "Microsoft.ConnectedCache.MccCacheNodeTlsCertificate", + "azure.mgmt.connectedcache.models.MccCacheNodeTlsCertificateHistory": "Microsoft.ConnectedCache.MccCacheNodeTlsCertificateHistory", + "azure.mgmt.connectedcache.models.MccCacheNodeTlsCertificateProperties": "Microsoft.ConnectedCache.MccCacheNodeTlsCertificateProperties", + "azure.mgmt.connectedcache.models.MccIssue": "Microsoft.ConnectedCache.MccIssue", + "azure.mgmt.connectedcache.models.Operation": "Azure.ResourceManager.CommonTypes.Operation", + "azure.mgmt.connectedcache.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "azure.mgmt.connectedcache.models.ProxyUrlConfiguration": "Microsoft.ConnectedCache.ProxyUrlConfiguration", + "azure.mgmt.connectedcache.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.connectedcache.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "azure.mgmt.connectedcache.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "azure.mgmt.connectedcache.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.connectedcache.models.ProvisioningState": "Microsoft.ConnectedCache.ProvisioningState", + "azure.mgmt.connectedcache.models.CustomerTransitState": "Microsoft.ConnectedCache.CustomerTransitState", + "azure.mgmt.connectedcache.models.BgpReviewStateEnum": "Microsoft.ConnectedCache.BgpReviewStateEnum", + "azure.mgmt.connectedcache.models.ConfigurationState": "Microsoft.ConnectedCache.ConfigurationState", + "azure.mgmt.connectedcache.models.AutoUpdateRingType": "Microsoft.ConnectedCache.autoUpdateRingType", + "azure.mgmt.connectedcache.models.ProxyRequired": "Microsoft.ConnectedCache.ProxyRequired", + "azure.mgmt.connectedcache.models.OsType": "Microsoft.ConnectedCache.OsType", + "azure.mgmt.connectedcache.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.connectedcache.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.get": "Microsoft.ConnectedCache.IspCustomers.get", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.get": "Microsoft.ConnectedCache.IspCustomers.get", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.begin_create_or_update": "Microsoft.ConnectedCache.IspCustomers.createOrUpdate", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.begin_create_or_update": "Microsoft.ConnectedCache.IspCustomers.createOrUpdate", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.update": "Microsoft.ConnectedCache.IspCustomers.update", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.update": "Microsoft.ConnectedCache.IspCustomers.update", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.begin_delete": "Microsoft.ConnectedCache.IspCustomers.delete", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.begin_delete": "Microsoft.ConnectedCache.IspCustomers.delete", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.list_by_resource_group": "Microsoft.ConnectedCache.IspCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.list_by_resource_group": "Microsoft.ConnectedCache.IspCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.list_by_subscription": "Microsoft.ConnectedCache.IspCustomers.listBySubscription", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.list_by_subscription": "Microsoft.ConnectedCache.IspCustomers.listBySubscription", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.IspCacheNodesOperations.get", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.IspCacheNodesOperations.get", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.IspCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.IspCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.IspCacheNodesOperations.update", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.IspCacheNodesOperations.update", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.begin_delete": "Microsoft.ConnectedCache.IspCacheNodesOperations.delete", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.begin_delete": "Microsoft.ConnectedCache.IspCacheNodesOperations.delete", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.list_by_isp_customer_resource": "Microsoft.ConnectedCache.IspCacheNodesOperations.listByIspCustomerResource", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.list_by_isp_customer_resource": "Microsoft.ConnectedCache.IspCacheNodesOperations.listByIspCustomerResource", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.get_bgp_cidrs": "Microsoft.ConnectedCache.IspCacheNodesOperations.getBgpCidrs", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.get_bgp_cidrs": "Microsoft.ConnectedCache.IspCacheNodesOperations.getBgpCidrs", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.get_cache_node_install_details": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeInstallDetails", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.get_cache_node_install_details": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeInstallDetails", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.get_cache_node_auto_update_history": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeAutoUpdateHistory", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.get_cache_node_auto_update_history": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeAutoUpdateHistory", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.get_cache_node_mcc_issue_details_history": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeMccIssueDetailsHistory", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.get_cache_node_mcc_issue_details_history": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeMccIssueDetailsHistory", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.get": "Microsoft.ConnectedCache.EnterpriseMccCustomers.get", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.get": "Microsoft.ConnectedCache.EnterpriseMccCustomers.get", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.createOrUpdate", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.createOrUpdate", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.update", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.update", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCustomers.delete", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCustomers.delete", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.list_by_resource_group": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.list_by_resource_group": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.list_by_subscription": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listBySubscription", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.list_by_subscription": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listBySubscription", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.get", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.get", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.update", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.update", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.delete", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.delete", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.list_by_enterprise_mcc_customer_resource": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.list_by_enterprise_mcc_customer_resource": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_install_details": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeInstallDetails", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_install_details": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeInstallDetails", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_auto_update_history": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeAutoUpdateHistory", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_auto_update_history": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeAutoUpdateHistory", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_mcc_issue_details_history": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeMccIssueDetailsHistory", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_mcc_issue_details_history": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeMccIssueDetailsHistory", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_tls_certificate_history": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeTlsCertificateHistory", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_tls_certificate_history": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeTlsCertificateHistory" + } +} \ No newline at end of file diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_client.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_client.py index 9b387fe4e557..21da80262112 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_client.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_client.py @@ -7,19 +7,19 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from ._configuration import ConnectedCacheMgmtClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( - CacheNodesOperationsOperations, - EnterpriseCustomerOperationsOperations, EnterpriseMccCacheNodesOperationsOperations, EnterpriseMccCustomersOperations, IspCacheNodesOperationsOperations, @@ -31,17 +31,11 @@ from azure.core.credentials import TokenCredential -class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes +class ConnectedCacheMgmtClient: """Microsoft Connected Cache Rest Api version 2023-05-01-preview. :ivar operations: Operations operations :vartype operations: azure.mgmt.connectedcache.operations.Operations - :ivar enterprise_customer_operations: EnterpriseCustomerOperationsOperations operations - :vartype enterprise_customer_operations: - azure.mgmt.connectedcache.operations.EnterpriseCustomerOperationsOperations - :ivar cache_nodes_operations: CacheNodesOperationsOperations operations - :vartype cache_nodes_operations: - azure.mgmt.connectedcache.operations.CacheNodesOperationsOperations :ivar isp_customers: IspCustomersOperations operations :vartype isp_customers: azure.mgmt.connectedcache.operations.IspCustomersOperations :ivar isp_cache_nodes_operations: IspCacheNodesOperationsOperations operations @@ -58,10 +52,10 @@ class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is - "2023-05-01-preview". Note that overriding this default value may result in unsupported + "2024-11-30-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -69,16 +63,22 @@ class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ConnectedCacheMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -97,18 +97,12 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.enterprise_customer_operations = EnterpriseCustomerOperationsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.cache_nodes_operations = CacheNodesOperationsOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.isp_customers = IspCustomersOperations(self._client, self._config, self._serialize, self._deserialize) self.isp_cache_nodes_operations = IspCacheNodesOperationsOperations( self._client, self._config, self._serialize, self._deserialize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_configuration.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_configuration.py index 82551954ec2e..ce450a61a1dc 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_configuration.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_configuration.py @@ -30,7 +30,7 @@ class ConnectedCacheMgmtClientConfiguration: # pylint: disable=too-many-instanc :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str :keyword api_version: The API version to use for this operation. Default value is - "2023-05-01-preview". Note that overriding this default value may result in unsupported + "2024-11-30-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2023-05-01-preview") + api_version: str = kwargs.pop("api_version", "2024-11-30-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/__init__.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/__init__.py new file mode 100644 index 000000000000..8026245c2abc --- /dev/null +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_model_base.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/model_base.py similarity index 92% rename from sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_model_base.py rename to sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/model_base.py index e6a2730f9276..49d5c7259389 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_model_base.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/model_base.py @@ -2,8 +2,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=protected-access, broad-except @@ -21,6 +22,7 @@ from datetime import datetime, date, time, timedelta, timezone from json import JSONEncoder import xml.etree.ElementTree as ET +from collections.abc import MutableMapping from typing_extensions import Self import isodate from azure.core.exceptions import DeserializationError @@ -28,11 +30,6 @@ from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping - _LOGGER = logging.getLogger(__name__) __all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] @@ -347,7 +344,7 @@ def _get_model(module_name: str, model_name: str): _UNSET = object() -class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object +class _MyMutableMapping(MutableMapping[str, typing.Any]): def __init__(self, data: typing.Dict[str, typing.Any]) -> None: self._data = data @@ -373,50 +370,97 @@ def __ne__(self, other: typing.Any) -> bool: return not self.__eq__(other) def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ return self._data.keys() def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ return self._data.values() def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ return self._data.items() def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ try: return self[key] except KeyError: return default @typing.overload - def pop(self, key: str) -> typing.Any: ... + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ @typing.overload - def pop(self, key: str, default: _T) -> _T: ... + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ if default is _UNSET: return self._data.pop(key) return self._data.pop(key, default) def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ return self._data.popitem() def clear(self) -> None: + """ + Remove all items from D. + """ self._data.clear() - def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ self._data.update(*args, **kwargs) @typing.overload def setdefault(self, key: str, default: None = None) -> None: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ if default is _UNSET: return self._data.setdefault(key) return self._data.setdefault(key, default) @@ -597,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - return super().__new__(cls) # pylint: disable=no-value-for-parameter + return super().__new__(cls) def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: for base in cls.__bases__: @@ -633,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: @@ -754,7 +798,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur except AttributeError: model_name = annotation if module is not None: - annotation = _get_model(module, model_name) + annotation = _get_model(module, model_name) # type: ignore try: if module and _is_model(annotation): @@ -894,6 +938,35 @@ def _deserialize( return _deserialize_with_callable(deserializer, value) +def _failsafe_deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, value, module, rf, format) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + class _RestField: def __init__( self, diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_serialization.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/serialization.py similarity index 93% rename from sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_serialization.py rename to sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/serialization.py index ce17d1798ce7..eb86ea23c965 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_serialization.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/serialization.py @@ -1,28 +1,10 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # 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. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false @@ -48,9 +30,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, ) @@ -61,13 +41,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -185,73 +165,7 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0. - - :param datetime.datetime dt: The datetime - :returns: The offset - :rtype: datetime.timedelta - """ - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation. - - :param datetime.datetime dt: The datetime - :returns: The timestamp representation - :rtype: str - """ - return "Z" - - def dst(self, dt): - """No daylight saving for UTC. - - :param datetime.datetime dt: The datetime - :returns: The daylight saving time - :rtype: datetime.timedelta - """ - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset) -> None: - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -479,8 +393,8 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -563,7 +477,7 @@ def _decode_attribute_map_key(key): return key.replace("\\.", ".") -class Serializer(object): # pylint: disable=too-many-public-methods +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -626,7 +540,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) @@ -736,8 +650,8 @@ def body(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized request body """ @@ -781,8 +695,8 @@ def url(self, name, data, data_type, **kwargs): :param str data_type: The type to be serialized from. :rtype: str :returns: The serialized URL path - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -805,8 +719,8 @@ def query(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized query parameter """ try: @@ -835,8 +749,8 @@ def header(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized header """ try: @@ -855,9 +769,9 @@ def serialize_data(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. :returns: The serialized data. :rtype: str, int, float, bool, dict, list """ @@ -1192,7 +1106,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. :return: serialized rfc """ try: @@ -1218,7 +1132,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. :return: serialized iso """ if isinstance(attr, str): @@ -1251,7 +1165,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid :return: serialied unix """ if isinstance(attr, int): @@ -1429,7 +1343,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) @@ -1441,7 +1355,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1488,7 +1402,7 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1502,7 +1416,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1683,17 +1597,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None): subtype = getattr(response, "_subtype_map", {}) try: readonly = [ - k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") ] const = [ - k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore @@ -1713,7 +1631,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return- :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1795,7 +1713,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return :param dict attr: Dictionary to be deserialized. :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1841,7 +1759,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1932,7 +1850,7 @@ def deserialize_bytearray(attr): :param str attr: response string to be deserialized. :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1945,7 +1863,7 @@ def deserialize_base64(attr): :param str attr: response string to be deserialized. :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1960,7 +1878,7 @@ def deserialize_decimal(attr): :param str attr: response string to be deserialized. :return: Deserialized decimal - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. :rtype: decimal """ if isinstance(attr, ET.Element): @@ -1978,7 +1896,7 @@ def deserialize_long(attr): :param str attr: response string to be deserialized. :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1991,7 +1909,7 @@ def deserialize_duration(attr): :param str attr: response string to be deserialized. :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2009,7 +1927,7 @@ def deserialize_date(attr): :param str attr: response string to be deserialized. :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2025,7 +1943,7 @@ def deserialize_time(attr): :param str attr: response string to be deserialized. :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2040,14 +1958,14 @@ def deserialize_rfc(attr): :param str attr: response string to be deserialized. :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -2063,7 +1981,7 @@ def deserialize_iso(attr): :param str attr: response string to be deserialized. :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2101,7 +2019,7 @@ def deserialize_unix(attr): :param int attr: Object to be serialized. :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_validation.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_validation.py new file mode 100644 index 000000000000..752b2822f9d3 --- /dev/null +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_validation.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools + + +def api_version_validation(**kwargs): + params_added_on = kwargs.pop("params_added_on", {}) + method_added_on = kwargs.pop("method_added_on", "") + + def decorator(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + try: + # this assumes the client has an _api_version attribute + client = args[0] + client_api_version = client._config.api_version # pylint: disable=protected-access + except AttributeError: + return func(*args, **kwargs) + + if method_added_on > client_api_version: + raise ValueError( + f"'{func.__name__}' is not available in API version " + f"{client_api_version}. Pass service API version {method_added_on} or newer to your client." + ) + + unsupported = { + parameter: api_version + for api_version, parameters in params_added_on.items() + for parameter in parameters + if parameter in kwargs and api_version > client_api_version + } + if unsupported: + raise ValueError( + "".join( + [ + f"'{param}' is not available in API version {client_api_version}. " + f"Use service API version {version} or newer.\n" + for param, version in unsupported.items() + ] + ) + ) + return func(*args, **kwargs) + + return wrapper + + return decorator diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_version.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_version.py index be71c81bd282..bbcd28b4aa67 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_version.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0b2" diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_client.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_client.py index 7d6cf5a14102..288080c8c55d 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_client.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_client.py @@ -7,19 +7,19 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import ConnectedCacheMgmtClientConfiguration from .operations import ( - CacheNodesOperationsOperations, - EnterpriseCustomerOperationsOperations, EnterpriseMccCacheNodesOperationsOperations, EnterpriseMccCustomersOperations, IspCacheNodesOperationsOperations, @@ -31,17 +31,11 @@ from azure.core.credentials_async import AsyncTokenCredential -class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes +class ConnectedCacheMgmtClient: """Microsoft Connected Cache Rest Api version 2023-05-01-preview. :ivar operations: Operations operations :vartype operations: azure.mgmt.connectedcache.aio.operations.Operations - :ivar enterprise_customer_operations: EnterpriseCustomerOperationsOperations operations - :vartype enterprise_customer_operations: - azure.mgmt.connectedcache.aio.operations.EnterpriseCustomerOperationsOperations - :ivar cache_nodes_operations: CacheNodesOperationsOperations operations - :vartype cache_nodes_operations: - azure.mgmt.connectedcache.aio.operations.CacheNodesOperationsOperations :ivar isp_customers: IspCustomersOperations operations :vartype isp_customers: azure.mgmt.connectedcache.aio.operations.IspCustomersOperations :ivar isp_cache_nodes_operations: IspCacheNodesOperationsOperations operations @@ -58,10 +52,10 @@ class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is - "2023-05-01-preview". Note that overriding this default value may result in unsupported + "2024-11-30-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -69,16 +63,22 @@ class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ConnectedCacheMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -97,18 +97,14 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, _endpoint), policies=_policies, **kwargs + ) self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.enterprise_customer_operations = EnterpriseCustomerOperationsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.cache_nodes_operations = CacheNodesOperationsOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.isp_customers = IspCustomersOperations(self._client, self._config, self._serialize, self._deserialize) self.isp_cache_nodes_operations = IspCacheNodesOperationsOperations( self._client, self._config, self._serialize, self._deserialize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_configuration.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_configuration.py index bc8e5de56b85..c295a7f86c2c 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_configuration.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_configuration.py @@ -30,7 +30,7 @@ class ConnectedCacheMgmtClientConfiguration: # pylint: disable=too-many-instanc :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str :keyword api_version: The API version to use for this operation. Default value is - "2023-05-01-preview". Note that overriding this default value may result in unsupported + "2024-11-30-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2023-05-01-preview") + api_version: str = kwargs.pop("api_version", "2024-11-30-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/__init__.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/__init__.py index f34ede4b37e1..ff07f8879332 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/__init__.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/__init__.py @@ -13,8 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import Operations # type: ignore -from ._operations import EnterpriseCustomerOperationsOperations # type: ignore -from ._operations import CacheNodesOperationsOperations # type: ignore from ._operations import IspCustomersOperations # type: ignore from ._operations import IspCacheNodesOperationsOperations # type: ignore from ._operations import EnterpriseMccCustomersOperations # type: ignore @@ -26,8 +24,6 @@ __all__ = [ "Operations", - "EnterpriseCustomerOperationsOperations", - "CacheNodesOperationsOperations", "IspCustomersOperations", "IspCacheNodesOperationsOperations", "EnterpriseMccCustomersOperations", diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_operations.py index 72e9eddb43eb..8535f6cda8e7 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_operations.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_operations.py @@ -6,12 +6,13 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,23 +34,16 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._model_base import SdkJSONEncoder, _deserialize +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._utils.serialization import Deserializer, Serializer +from ..._validation import api_version_validation from ...operations._operations import ( - build_cache_nodes_operations_createor_update_request, - build_cache_nodes_operations_delete_request, - build_cache_nodes_operations_get_request, - build_cache_nodes_operations_list_by_resource_group_request, - build_cache_nodes_operations_list_by_subscription_request, - build_cache_nodes_operations_update_request, - build_enterprise_customer_operations_create_or_update_request, - build_enterprise_customer_operations_delete_request, - build_enterprise_customer_operations_get_request, - build_enterprise_customer_operations_list_by_resource_group_request, - build_enterprise_customer_operations_list_by_subscription_request, - build_enterprise_customer_operations_update_request, build_enterprise_mcc_cache_nodes_operations_create_or_update_request, build_enterprise_mcc_cache_nodes_operations_delete_request, + build_enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history_request, build_enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_request, + build_enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history_request, + build_enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history_request, build_enterprise_mcc_cache_nodes_operations_get_request, build_enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_request, build_enterprise_mcc_cache_nodes_operations_update_request, @@ -62,7 +56,9 @@ build_isp_cache_nodes_operations_create_or_update_request, build_isp_cache_nodes_operations_delete_request, build_isp_cache_nodes_operations_get_bgp_cidrs_request, + build_isp_cache_nodes_operations_get_cache_node_auto_update_history_request, build_isp_cache_nodes_operations_get_cache_node_install_details_request, + build_isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history_request, build_isp_cache_nodes_operations_get_request, build_isp_cache_nodes_operations_list_by_isp_customer_resource_request, build_isp_cache_nodes_operations_update_request, @@ -74,14 +70,11 @@ build_isp_customers_update_request, build_operations_list_request, ) +from .._configuration import ConnectedCacheMgmtClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] class Operations: @@ -96,10 +89,10 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: @@ -161,7 +154,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -177,1456 +170,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class EnterpriseCustomerOperationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.connectedcache.aio.ConnectedCacheMgmtClient`'s - :attr:`enterprise_customer_operations` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, resource_group_name: str, customer_resource_name: str, **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """Retrieves the properties of a Enterprise customer. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.EnterprisePreviewResource] = kwargs.pop("cls", None) - - _request = build_enterprise_customer_operations_get_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models.EnterprisePreviewResource, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - customer_resource_name: str, - resource: Union[_models.EnterprisePreviewResource, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(resource, (IOBase, bytes)): - _content = resource - else: - _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_enterprise_customer_operations_create_or_update_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: _models.EnterprisePreviewResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.EnterprisePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns EnterprisePreviewResource. The - EnterprisePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.EnterprisePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns EnterprisePreviewResource. The - EnterprisePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.EnterprisePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns EnterprisePreviewResource. The - EnterprisePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: Union[_models.EnterprisePreviewResource, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.EnterprisePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Is one of the following types: - EnterprisePreviewResource, JSON, IO[bytes] Required. - :type resource: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource or JSON or - IO[bytes] - :return: An instance of AsyncLROPoller that returns EnterprisePreviewResource. The - EnterprisePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EnterprisePreviewResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - resource=resource, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.EnterprisePreviewResource, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.EnterprisePreviewResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.EnterprisePreviewResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - async def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: _models.ConnectedCachePatchResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """updates an existing enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: ~azure.mgmt.connectedcache.models.ConnectedCachePatchResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """updates an existing enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """updates an existing enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: Union[_models.ConnectedCachePatchResource, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """updates an existing enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Is one of the following types: - ConnectedCachePatchResource, JSON, IO[bytes] Required. - :type properties: ~azure.mgmt.connectedcache.models.ConnectedCachePatchResource or JSON or - IO[bytes] - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EnterprisePreviewResource] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(properties, (IOBase, bytes)): - _content = properties - else: - _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_enterprise_customer_operations_update_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models.EnterprisePreviewResource, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete(self, resource_group_name: str, customer_resource_name: str, **kwargs: Any) -> None: - """Deletes an existing customer Enterprise resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_enterprise_customer_operations_delete_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.EnterprisePreviewResource"]: - """Retrieves the properties of all ConnectedCache enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of EnterprisePreviewResource - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.EnterprisePreviewResource]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_enterprise_customer_operations_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.EnterprisePreviewResource"]: - """Retrieves the properties of all ConnectedCaches. - - :return: An iterator like instance of EnterprisePreviewResource - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.EnterprisePreviewResource]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_enterprise_customer_operations_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class CacheNodesOperationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.connectedcache.aio.ConnectedCacheMgmtClient`'s - :attr:`cache_nodes_operations` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, resource_group_name: str, customer_resource_name: str, **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """Retrieves the properties of a cacheNodes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CacheNodePreviewResource] = kwargs.pop("cls", None) - - _request = build_cache_nodes_operations_get_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models.CacheNodePreviewResource, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _createor_update_initial( - self, - resource_group_name: str, - customer_resource_name: str, - resource: Union[_models.CacheNodePreviewResource, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(resource, (IOBase, bytes)): - _content = resource - else: - _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_cache_nodes_operations_createor_update_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_createor_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: _models.CacheNodePreviewResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheNodePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CacheNodePreviewResource. The - CacheNodePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_createor_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheNodePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CacheNodePreviewResource. The - CacheNodePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_createor_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheNodePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CacheNodePreviewResource. The - CacheNodePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_createor_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: Union[_models.CacheNodePreviewResource, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheNodePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Is one of the following types: - CacheNodePreviewResource, JSON, IO[bytes] Required. - :type resource: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns CacheNodePreviewResource. The - CacheNodePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheNodePreviewResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._createor_update_initial( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - resource=resource, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.CacheNodePreviewResource, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CacheNodePreviewResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CacheNodePreviewResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete(self, resource_group_name: str, customer_resource_name: str, **kwargs: Any) -> None: - """Deletes an existing cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_cache_nodes_operations_delete_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: _models.ConnectedCachePatchResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """updates an existing Cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: ~azure.mgmt.connectedcache.models.ConnectedCachePatchResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """updates an existing Cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """updates an existing Cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: Union[_models.ConnectedCachePatchResource, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """updates an existing Cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Is one of the following types: - ConnectedCachePatchResource, JSON, IO[bytes] Required. - :type properties: ~azure.mgmt.connectedcache.models.ConnectedCachePatchResource or JSON or - IO[bytes] - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheNodePreviewResource] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(properties, (IOBase, bytes)): - _content = properties - else: - _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_cache_nodes_operations_update_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models.CacheNodePreviewResource, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.CacheNodePreviewResource"]: - """Retrieves the properties of all ConnectedCache. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of CacheNodePreviewResource - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.CacheNodePreviewResource]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_cache_nodes_operations_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.CacheNodePreviewResource"]: - """Retrieves the properties of all ConnectedCaches. - - :return: An iterator like instance of CacheNodePreviewResource - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.CacheNodePreviewResource]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_cache_nodes_operations_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1646,10 +190,10 @@ class IspCustomersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -1706,7 +250,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1775,7 +319,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2109,7 +653,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2164,7 +708,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2307,7 +851,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2323,7 +867,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2392,7 +936,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2408,7 +952,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2428,10 +972,10 @@ class IspCacheNodesOperationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -2491,7 +1035,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2562,7 +1106,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2922,7 +1466,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2978,7 +1522,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3123,38 +1667,195 @@ def prepare_request(next_link=None): } _request.url = self._client.format_url(_request.url, **path_format_arguments) - return _request + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.IspCacheNodeResource], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_bgp_cidrs( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeBgpCidrDetails: + """This api gets ispCacheNode resource information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeBgpCidrDetails. The MccCacheNodeBgpCidrDetails is compatible with + MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeBgpCidrDetails + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeBgpCidrDetails] = kwargs.pop("cls", None) + + _request = build_isp_cache_nodes_operations_get_bgp_cidrs_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeBgpCidrDetails, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_cache_node_install_details( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeInstallDetails: + """This api gets secrets of the ispCacheNode resource install details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeInstallDetails. The MccCacheNodeInstallDetails is compatible with + MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeInstallDetails + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeInstallDetails] = kwargs.pop("cls", None) + + _request = build_isp_cache_nodes_operations_get_cache_node_install_details_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCacheNodeResource], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - async def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeInstallDetails, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return AsyncItemPaged(get_next, extract_data) + return deserialized # type: ignore @distributed_trace_async - async def get_bgp_cidrs( + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + async def get_cache_node_auto_update_history( self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any - ) -> _models.MccCacheNodeBgpCidrDetails: - """This api gets ispCacheNode resource information. + ) -> _models.MccCacheNodeAutoUpdateHistory: + """This api gets ispCacheNode resource auto update histrory information. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -3163,9 +1864,9 @@ async def get_bgp_cidrs( :type customer_resource_name: str :param cache_node_resource_name: Name of the ConnectedCache resource. Required. :type cache_node_resource_name: str - :return: MccCacheNodeBgpCidrDetails. The MccCacheNodeBgpCidrDetails is compatible with + :return: MccCacheNodeAutoUpdateHistory. The MccCacheNodeAutoUpdateHistory is compatible with MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeBgpCidrDetails + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateHistory :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -3179,9 +1880,9 @@ async def get_bgp_cidrs( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MccCacheNodeBgpCidrDetails] = kwargs.pop("cls", None) + cls: ClsType[_models.MccCacheNodeAutoUpdateHistory] = kwargs.pop("cls", None) - _request = build_isp_cache_nodes_operations_get_bgp_cidrs_request( + _request = build_isp_cache_nodes_operations_get_cache_node_auto_update_history_request( resource_group_name=resource_group_name, customer_resource_name=customer_resource_name, cache_node_resource_name=cache_node_resource_name, @@ -3209,13 +1910,13 @@ async def get_bgp_cidrs( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: deserialized = response.iter_bytes() else: - deserialized = _deserialize(_models.MccCacheNodeBgpCidrDetails, response.json()) + deserialized = _deserialize(_models.MccCacheNodeAutoUpdateHistory, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -3223,10 +1924,23 @@ async def get_bgp_cidrs( return deserialized # type: ignore @distributed_trace_async - async def get_cache_node_install_details( + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + async def get_cache_node_mcc_issue_details_history( self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any - ) -> _models.MccCacheNodeInstallDetails: - """This api gets secrets of the ispCacheNode resource install details. + ) -> _models.MccCacheNodeIssueHistory: + """This api gets ispCacheNode resource issues details histrory information. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -3235,9 +1949,9 @@ async def get_cache_node_install_details( :type customer_resource_name: str :param cache_node_resource_name: Name of the ConnectedCache resource. Required. :type cache_node_resource_name: str - :return: MccCacheNodeInstallDetails. The MccCacheNodeInstallDetails is compatible with + :return: MccCacheNodeIssueHistory. The MccCacheNodeIssueHistory is compatible with MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeInstallDetails + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeIssueHistory :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -3251,9 +1965,9 @@ async def get_cache_node_install_details( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MccCacheNodeInstallDetails] = kwargs.pop("cls", None) + cls: ClsType[_models.MccCacheNodeIssueHistory] = kwargs.pop("cls", None) - _request = build_isp_cache_nodes_operations_get_cache_node_install_details_request( + _request = build_isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history_request( resource_group_name=resource_group_name, customer_resource_name=customer_resource_name, cache_node_resource_name=cache_node_resource_name, @@ -3281,13 +1995,13 @@ async def get_cache_node_install_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: deserialized = response.iter_bytes() else: - deserialized = _deserialize(_models.MccCacheNodeInstallDetails, response.json()) + deserialized = _deserialize(_models.MccCacheNodeIssueHistory, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -3307,10 +2021,10 @@ class EnterpriseMccCustomersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -3368,7 +2082,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3437,7 +2151,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3776,7 +2490,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3831,7 +2545,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3974,7 +2688,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -3990,7 +2704,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4060,7 +2774,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -4076,7 +2790,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4096,10 +2810,10 @@ class EnterpriseMccCacheNodesOperationsOperations: # pylint: disable=name-too-l def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -4160,7 +2874,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4231,7 +2945,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4596,7 +3310,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4652,7 +3366,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4801,7 +3515,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCacheNodeResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCacheNodeResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -4817,7 +3531,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4883,7 +3597,7 @@ async def get_cache_node_install_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4895,3 +3609,258 @@ async def get_cache_node_install_details( return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + async def get_cache_node_auto_update_history( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeAutoUpdateHistory: + """This api gets ispCacheNode resource auto update histrory information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeAutoUpdateHistory. The MccCacheNodeAutoUpdateHistory is compatible with + MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateHistory + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeAutoUpdateHistory] = kwargs.pop("cls", None) + + _request = build_enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeAutoUpdateHistory, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + async def get_cache_node_mcc_issue_details_history( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeIssueHistory: + """This api gets ispCacheNode resource issues details histrory information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeIssueHistory. The MccCacheNodeIssueHistory is compatible with + MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeIssueHistory + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeIssueHistory] = kwargs.pop("cls", None) + + _request = build_enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeIssueHistory, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + async def get_cache_node_tls_certificate_history( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeTlsCertificateHistory: + """This api gets ispCacheNode resource tls certificate histrory information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeTlsCertificateHistory. The MccCacheNodeTlsCertificateHistory is compatible + with MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeTlsCertificateHistory + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeTlsCertificateHistory] = kwargs.pop("cls", None) + + _request = build_enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeTlsCertificateHistory, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/__init__.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/__init__.py index cad334387e9e..95a0f1d9840b 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/__init__.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/__init__.py @@ -21,22 +21,28 @@ CacheNodeDriveConfiguration, CacheNodeEntity, CacheNodeInstallProperties, - CacheNodeOldResponse, - CacheNodePreviewResource, CacheNodeProperty, ConnectedCachePatchResource, CustomerEntity, CustomerProperty, EnterpriseMccCacheNodeResource, EnterpriseMccCustomerResource, - EnterprisePreviewResource, ErrorAdditionalInfo, ErrorDetail, ErrorResponse, IspCacheNodeResource, IspCustomerResource, + MccCacheNodeAutoUpdateHistory, + MccCacheNodeAutoUpdateHistoryProperties, + MccCacheNodeAutoUpdateInfo, MccCacheNodeBgpCidrDetails, MccCacheNodeInstallDetails, + MccCacheNodeIssueHistory, + MccCacheNodeIssueHistoryProperties, + MccCacheNodeTlsCertificate, + MccCacheNodeTlsCertificateHistory, + MccCacheNodeTlsCertificateProperties, + MccIssue, Operation, OperationDisplay, ProxyUrlConfiguration, @@ -52,7 +58,6 @@ ConfigurationState, CreatedByType, CustomerTransitState, - CycleType, Origin, OsType, ProvisioningState, @@ -70,22 +75,28 @@ "CacheNodeDriveConfiguration", "CacheNodeEntity", "CacheNodeInstallProperties", - "CacheNodeOldResponse", - "CacheNodePreviewResource", "CacheNodeProperty", "ConnectedCachePatchResource", "CustomerEntity", "CustomerProperty", "EnterpriseMccCacheNodeResource", "EnterpriseMccCustomerResource", - "EnterprisePreviewResource", "ErrorAdditionalInfo", "ErrorDetail", "ErrorResponse", "IspCacheNodeResource", "IspCustomerResource", + "MccCacheNodeAutoUpdateHistory", + "MccCacheNodeAutoUpdateHistoryProperties", + "MccCacheNodeAutoUpdateInfo", "MccCacheNodeBgpCidrDetails", "MccCacheNodeInstallDetails", + "MccCacheNodeIssueHistory", + "MccCacheNodeIssueHistoryProperties", + "MccCacheNodeTlsCertificate", + "MccCacheNodeTlsCertificateHistory", + "MccCacheNodeTlsCertificateProperties", + "MccIssue", "Operation", "OperationDisplay", "ProxyUrlConfiguration", @@ -98,7 +109,6 @@ "ConfigurationState", "CreatedByType", "CustomerTransitState", - "CycleType", "Origin", "OsType", "ProvisioningState", diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_enums.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_enums.py index 08610ac96609..b2d7b7fe7db1 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_enums.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_enums.py @@ -76,17 +76,6 @@ class CustomerTransitState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """pure transit provider or network service provider""" -class CycleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Update Cycle type.""" - - PREVIEW = "Preview" - """customer selection of preview update install mcc on their physical vm""" - SLOW = "Slow" - """customer selection of slow update to install mcc on their physical vm""" - FAST = "Fast" - """customer selection of fast / auto update to install mcc on their physical vm""" - - class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system". diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_models.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_models.py index 580a2ab7dd89..9e339912ce43 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_models.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_models.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -11,21 +11,26 @@ import datetime from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload -from .. import _model_base -from .._model_base import rest_field +from .._utils.model_base import Model as _Model, rest_field if TYPE_CHECKING: from .. import models as _models -class AdditionalCacheNodeProperties(_model_base.Model): +class AdditionalCacheNodeProperties(_Model): """Model representing cache node for connected cache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar cache_node_properties_details_issues_list: issues list to return the issues as part of the additional cache node properties. :vartype cache_node_properties_details_issues_list: list[str] + :ivar issues_list: current cache node issue list. + :vartype issues_list: list[str] + :ivar issues_count: Number of cache node issues. + :vartype issues_count: int + :ivar current_tls_certificate: cache node current tls certificate. + :vartype current_tls_certificate: ~azure.mgmt.connectedcache.models.MccCacheNodeTlsCertificate + :ivar last_auto_update_info: cache node last auto update information. + :vartype last_auto_update_info: ~azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateInfo :ivar aggregated_status_details: Cache node resource aggregated status details. :vartype aggregated_status_details: str :ivar aggregated_status_text: Cache node resource aggregated status text. @@ -50,16 +55,12 @@ class AdditionalCacheNodeProperties(_model_base.Model): :vartype bgp_configuration: ~azure.mgmt.connectedcache.models.BgpConfiguration :ivar proxy_url_configuration: proxyUrl configuration of the cache node. :vartype proxy_url_configuration: ~azure.mgmt.connectedcache.models.ProxyUrlConfiguration - :ivar proxy_url: Cache node resource Mcc proxy Url. - :vartype proxy_url: str :ivar is_proxy_required: Cache node resource requires a proxy. Known values are: "None" and "Required". :vartype is_proxy_required: str or ~azure.mgmt.connectedcache.models.ProxyRequired :ivar os_type: Operating system of the cache node. Known values are: "Windows", "Linux", and "Eflow". :vartype os_type: str or ~azure.mgmt.connectedcache.models.OsType - :ivar update_cycle_type: Update Cycle Type. Known values are: "Preview", "Slow", and "Fast". - :vartype update_cycle_type: str or ~azure.mgmt.connectedcache.models.CycleType :ivar auto_update_version: Auto update or fast update version. :vartype auto_update_version: str :ivar update_info_details: Update related information details. @@ -85,6 +86,10 @@ class AdditionalCacheNodeProperties(_model_base.Model): :ivar auto_update_last_triggered_date_time: Auto update last triggered date time of mcc install. :vartype auto_update_last_triggered_date_time: ~datetime.datetime + :ivar creation_method: Resource creation method of mcc cache node resource, cli or portal. + :vartype creation_method: int + :ivar tls_status: Cache node tls certificate status. + :vartype tls_status: str :ivar optional_property1: Optional property #1 of Mcc response object. :vartype optional_property1: str :ivar optional_property2: Optional property #2 of Mcc response object. @@ -98,9 +103,21 @@ class AdditionalCacheNodeProperties(_model_base.Model): """ cache_node_properties_details_issues_list: Optional[List[str]] = rest_field( - name="cacheNodePropertiesDetailsIssuesList" + name="cacheNodePropertiesDetailsIssuesList", visibility=["read", "create", "update", "delete", "query"] ) """issues list to return the issues as part of the additional cache node properties.""" + issues_list: Optional[List[str]] = rest_field(name="issuesList", visibility=["read"]) + """current cache node issue list.""" + issues_count: Optional[int] = rest_field(name="issuesCount", visibility=["read"]) + """Number of cache node issues.""" + current_tls_certificate: Optional["_models.MccCacheNodeTlsCertificate"] = rest_field( + name="currentTlsCertificate", visibility=["read"] + ) + """cache node current tls certificate.""" + last_auto_update_info: Optional["_models.MccCacheNodeAutoUpdateInfo"] = rest_field( + name="lastAutoUpdateInfo", visibility=["read"] + ) + """cache node last auto update information.""" aggregated_status_details: Optional[str] = rest_field(name="aggregatedStatusDetails", visibility=["read"]) """Cache node resource aggregated status details.""" aggregated_status_text: Optional[str] = rest_field(name="aggregatedStatusText", visibility=["read"]) @@ -118,26 +135,36 @@ class AdditionalCacheNodeProperties(_model_base.Model): """Cache node resource short state text.""" cache_node_state: Optional[int] = rest_field(name="cacheNodeState", visibility=["read"]) """Cache node resource state as integer.""" - drive_configuration: Optional[List["_models.CacheNodeDriveConfiguration"]] = rest_field(name="driveConfiguration") + drive_configuration: Optional[List["_models.CacheNodeDriveConfiguration"]] = rest_field( + name="driveConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource drive configurations.""" - bgp_configuration: Optional["_models.BgpConfiguration"] = rest_field(name="bgpConfiguration") + bgp_configuration: Optional["_models.BgpConfiguration"] = rest_field( + name="bgpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource Bgp configuration.""" - proxy_url_configuration: Optional["_models.ProxyUrlConfiguration"] = rest_field(name="proxyUrlConfiguration") + proxy_url_configuration: Optional["_models.ProxyUrlConfiguration"] = rest_field( + name="proxyUrlConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) """proxyUrl configuration of the cache node.""" - proxy_url: Optional[str] = rest_field(name="proxyUrl") - """Cache node resource Mcc proxy Url.""" - is_proxy_required: Optional[Union[str, "_models.ProxyRequired"]] = rest_field(name="isProxyRequired") + is_proxy_required: Optional[Union[str, "_models.ProxyRequired"]] = rest_field( + name="isProxyRequired", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource requires a proxy. Known values are: \"None\" and \"Required\".""" - os_type: Optional[Union[str, "_models.OsType"]] = rest_field(name="osType") + os_type: Optional[Union[str, "_models.OsType"]] = rest_field( + name="osType", visibility=["read", "create", "update", "delete", "query"] + ) """Operating system of the cache node. Known values are: \"Windows\", \"Linux\", and \"Eflow\".""" - update_cycle_type: Optional[Union[str, "_models.CycleType"]] = rest_field(name="updateCycleType") - """Update Cycle Type. Known values are: \"Preview\", \"Slow\", and \"Fast\".""" - auto_update_version: Optional[str] = rest_field(name="autoUpdateVersion") + auto_update_version: Optional[str] = rest_field( + name="autoUpdateVersion", visibility=["read", "create", "update", "delete", "query"] + ) """Auto update or fast update version.""" - update_info_details: Optional[str] = rest_field(name="updateInfoDetails") + update_info_details: Optional[str] = rest_field( + name="updateInfoDetails", visibility=["read", "create", "update", "delete", "query"] + ) """Update related information details.""" update_requested_date_time: Optional[datetime.datetime] = rest_field( - name="updateRequestedDateTime", format="rfc3339" + name="updateRequestedDateTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" ) """customer requested date time for mcc install of update cycle.""" auto_update_next_available_version: Optional[str] = rest_field( @@ -164,15 +191,31 @@ class AdditionalCacheNodeProperties(_model_base.Model): name="autoUpdateLastTriggeredDateTime", visibility=["read"], format="rfc3339" ) """Auto update last triggered date time of mcc install.""" - optional_property1: Optional[str] = rest_field(name="optionalProperty1") + creation_method: Optional[int] = rest_field( + name="creationMethod", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource creation method of mcc cache node resource, cli or portal.""" + tls_status: Optional[str] = rest_field(name="tlsStatus", visibility=["read"]) + """Cache node tls certificate status.""" + optional_property1: Optional[str] = rest_field( + name="optionalProperty1", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #1 of Mcc response object.""" - optional_property2: Optional[str] = rest_field(name="optionalProperty2") + optional_property2: Optional[str] = rest_field( + name="optionalProperty2", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #2 of Mcc response object.""" - optional_property3: Optional[str] = rest_field(name="optionalProperty3") + optional_property3: Optional[str] = rest_field( + name="optionalProperty3", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #3 of Mcc response object.""" - optional_property4: Optional[str] = rest_field(name="optionalProperty4") + optional_property4: Optional[str] = rest_field( + name="optionalProperty4", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #4 of Mcc response object.""" - optional_property5: Optional[str] = rest_field(name="optionalProperty5") + optional_property5: Optional[str] = rest_field( + name="optionalProperty5", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #5 of Mcc response object.""" @overload @@ -183,13 +226,12 @@ def __init__( # pylint: disable=too-many-locals drive_configuration: Optional[List["_models.CacheNodeDriveConfiguration"]] = None, bgp_configuration: Optional["_models.BgpConfiguration"] = None, proxy_url_configuration: Optional["_models.ProxyUrlConfiguration"] = None, - proxy_url: Optional[str] = None, is_proxy_required: Optional[Union[str, "_models.ProxyRequired"]] = None, os_type: Optional[Union[str, "_models.OsType"]] = None, - update_cycle_type: Optional[Union[str, "_models.CycleType"]] = None, auto_update_version: Optional[str] = None, update_info_details: Optional[str] = None, update_requested_date_time: Optional[datetime.datetime] = None, + creation_method: Optional[int] = None, optional_property1: Optional[str] = None, optional_property2: Optional[str] = None, optional_property3: Optional[str] = None, @@ -208,13 +250,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class AdditionalCustomerProperties(_model_base.Model): +class AdditionalCustomerProperties(_Model): """Model representing customer for connected cache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar peering_db_last_update_time: Customer resource last PeeringDB update timestamp. - :vartype peering_db_last_update_time: ~datetime.datetime :ivar customer_properties_overview_cache_efficiency: Customer resource cache efficiency. :vartype customer_properties_overview_cache_efficiency: float :ivar customer_properties_overview_average_egress_mbps: Customer resource average egress in @@ -286,10 +324,6 @@ class AdditionalCustomerProperties(_model_base.Model): :vartype optional_property5: str """ - peering_db_last_update_time: Optional[datetime.datetime] = rest_field( - name="peeringDbLastUpdateTime", visibility=["read"], format="rfc3339" - ) - """Customer resource last PeeringDB update timestamp.""" customer_properties_overview_cache_efficiency: Optional[float] = rest_field( name="customerPropertiesOverviewCacheEfficiency", visibility=["read"] ) @@ -342,40 +376,64 @@ class AdditionalCustomerProperties(_model_base.Model): """Customer resource last PeeringDB update timestamp.""" customer_org_name: Optional[str] = rest_field(name="customerOrgName", visibility=["read"]) """Customer resource owner organization name.""" - customer_email: Optional[str] = rest_field(name="customerEmail") + customer_email: Optional[str] = rest_field( + name="customerEmail", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource contact email.""" - customer_transit_asn: Optional[str] = rest_field(name="customerTransitAsn") + customer_transit_asn: Optional[str] = rest_field( + name="customerTransitAsn", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource transit Asn (autonomous system number).""" customer_transit_state: Optional[Union[str, "_models.CustomerTransitState"]] = rest_field( - name="customerTransitState" + name="customerTransitState", visibility=["read", "create", "update", "delete", "query"] ) """Customer resource transit state. Known values are: \"NoTransit\", \"CombinedTransit\", and \"TransitOnly\".""" - customer_asn: Optional[str] = rest_field(name="customerAsn") + customer_asn: Optional[str] = rest_field( + name="customerAsn", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource Asn (autonomous system number).""" customer_asn_estimated_egress_peek_gbps: Optional[float] = rest_field( name="customerAsnEstimatedEgressPeekGbps", visibility=["read"] ) """Customer resource estimated Asn peering peak in Gbps.""" - customer_entitlement_sku_id: Optional[str] = rest_field(name="customerEntitlementSkuId") + customer_entitlement_sku_id: Optional[str] = rest_field( + name="customerEntitlementSkuId", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource entitlement Sku Id.""" - customer_entitlement_sku_guid: Optional[str] = rest_field(name="customerEntitlementSkuGuid") + customer_entitlement_sku_guid: Optional[str] = rest_field( + name="customerEntitlementSkuGuid", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource entitlement Sku Guid.""" - customer_entitlement_sku_name: Optional[str] = rest_field(name="customerEntitlementSkuName") + customer_entitlement_sku_name: Optional[str] = rest_field( + name="customerEntitlementSkuName", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource entitlement Sku name.""" customer_entitlement_expiration: Optional[datetime.datetime] = rest_field( - name="customerEntitlementExpiration", format="rfc3339" + name="customerEntitlementExpiration", + visibility=["read", "create", "update", "delete", "query"], + format="rfc3339", ) """Customer resource entitlement expiration date string.""" - optional_property1: Optional[str] = rest_field(name="optionalProperty1") + optional_property1: Optional[str] = rest_field( + name="optionalProperty1", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #1 of Mcc response object.""" - optional_property2: Optional[str] = rest_field(name="optionalProperty2") + optional_property2: Optional[str] = rest_field( + name="optionalProperty2", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #2 of Mcc response object.""" - optional_property3: Optional[str] = rest_field(name="optionalProperty3") + optional_property3: Optional[str] = rest_field( + name="optionalProperty3", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #3 of Mcc response object.""" - optional_property4: Optional[str] = rest_field(name="optionalProperty4") + optional_property4: Optional[str] = rest_field( + name="optionalProperty4", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #4 of Mcc response object.""" - optional_property5: Optional[str] = rest_field(name="optionalProperty5") + optional_property5: Optional[str] = rest_field( + name="optionalProperty5", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #5 of Mcc response object.""" @overload @@ -408,11 +466,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BgpCidrsConfiguration(_model_base.Model): +class BgpCidrsConfiguration(_Model): """Mcc cache node Bgp Cidr details. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar bgp_cidrs: Mcc cache node Bgp Cidr details. :vartype bgp_cidrs: list[str] """ @@ -421,14 +477,16 @@ class BgpCidrsConfiguration(_model_base.Model): """Mcc cache node Bgp Cidr details.""" -class BgpConfiguration(_model_base.Model): +class BgpConfiguration(_Model): """Bgp configuration of cache node. :ivar asn_to_ip_address_mapping: Asn to ip address mapping. :vartype asn_to_ip_address_mapping: str """ - asn_to_ip_address_mapping: Optional[str] = rest_field(name="asnToIpAddressMapping") + asn_to_ip_address_mapping: Optional[str] = rest_field( + name="asnToIpAddressMapping", visibility=["read", "create", "update", "delete", "query"] + ) """Asn to ip address mapping.""" @overload @@ -449,7 +507,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CacheNodeDriveConfiguration(_model_base.Model): +class CacheNodeDriveConfiguration(_Model): """Drive configuration for cache node. :ivar physical_path: physical path location of the folder used for caching content. @@ -462,13 +520,19 @@ class CacheNodeDriveConfiguration(_model_base.Model): :vartype nginx_mapping: str """ - physical_path: Optional[str] = rest_field(name="physicalPath") + physical_path: Optional[str] = rest_field( + name="physicalPath", visibility=["read", "create", "update", "delete", "query"] + ) """physical path location of the folder used for caching content.""" - size_in_gb: Optional[int] = rest_field(name="sizeInGb") + size_in_gb: Optional[int] = rest_field(name="sizeInGb", visibility=["read", "create", "update", "delete", "query"]) """physical size of the drive used for caching content.""" - cache_number: Optional[int] = rest_field(name="cacheNumber") + cache_number: Optional[int] = rest_field( + name="cacheNumber", visibility=["read", "create", "update", "delete", "query"] + ) """corresponding nginx cache number. Valid cache numbers are 1 - 20.""" - nginx_mapping: Optional[str] = rest_field(name="nginxMapping") + nginx_mapping: Optional[str] = rest_field( + name="nginxMapping", visibility=["read", "create", "update", "delete", "query"] + ) """full binding for corresponding nginx cache drive.""" @overload @@ -492,11 +556,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CacheNodeEntity(_model_base.Model): +class CacheNodeEntity(_Model): """Model representing Cache Node for ConnectedCache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar fully_qualified_resource_id: Cache node resource Azure fully qualified resource Id. :vartype fully_qualified_resource_id: str :ivar customer_id: Cache node resource customer resource GUID Id. @@ -615,31 +677,49 @@ class CacheNodeEntity(_model_base.Model): :vartype auto_update_requested_time: str """ - fully_qualified_resource_id: Optional[str] = rest_field(name="fullyQualifiedResourceId") + fully_qualified_resource_id: Optional[str] = rest_field( + name="fullyQualifiedResourceId", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource Azure fully qualified resource Id.""" customer_id: Optional[str] = rest_field(name="customerId", visibility=["read"]) """Cache node resource customer resource GUID Id.""" - customer_name: Optional[str] = rest_field(name="customerName") + customer_name: Optional[str] = rest_field( + name="customerName", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource customer resource name.""" - ip_address: Optional[str] = rest_field(name="ipAddress") + ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read", "create", "update", "delete", "query"]) """Cache node resource Ip address.""" - customer_index: Optional[str] = rest_field(name="customerIndex") + customer_index: Optional[str] = rest_field( + name="customerIndex", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource customer index as string.""" - cache_node_id: Optional[str] = rest_field(name="cacheNodeId") + cache_node_id: Optional[str] = rest_field( + name="cacheNodeId", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource identifier of the cache node.""" - cache_node_name: Optional[str] = rest_field(name="cacheNodeName") + cache_node_name: Optional[str] = rest_field( + name="cacheNodeName", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource name.""" - customer_asn: Optional[int] = rest_field(name="customerAsn") + customer_asn: Optional[int] = rest_field( + name="customerAsn", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource customer resource Asn (autonomous system number).""" - is_enabled: Optional[bool] = rest_field(name="isEnabled") + is_enabled: Optional[bool] = rest_field( + name="isEnabled", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource flag for indicating if cache node is enabled.""" - max_allowable_egress_in_mbps: Optional[int] = rest_field(name="maxAllowableEgressInMbps") + max_allowable_egress_in_mbps: Optional[int] = rest_field( + name="maxAllowableEgressInMbps", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource maximum allowed egress in Mbps.""" max_allowable_probability: Optional[float] = rest_field(name="maxAllowableProbability", visibility=["read"]) """Cache node resource maximum allowed probability of egress.""" x_cid: Optional[str] = rest_field(name="xCid", visibility=["read"]) """Cache node resource Azure XCid.""" - is_enterprise_managed: Optional[bool] = rest_field(name="isEnterpriseManaged") + is_enterprise_managed: Optional[bool] = rest_field( + name="isEnterpriseManaged", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource flag for determining if managed by enterprise as boolean.""" create_async_operation_id: Optional[str] = rest_field(name="createAsyncOperationId", visibility=["read"]) """Cache node resource create async operation Id.""" @@ -663,7 +743,9 @@ class CacheNodeEntity(_model_base.Model): """Cache node resource attempts to sync with Azure.""" container_configurations: Optional[str] = rest_field(name="containerConfigurations", visibility=["read"]) """Cache node resource container configuration details.""" - cidr_csv: Optional[List[str]] = rest_field(name="cidrCsv") + cidr_csv: Optional[List[str]] = rest_field( + name="cidrCsv", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource comma separated values of Cidrs.""" cidr_csv_last_update_time: Optional[datetime.datetime] = rest_field( name="cidrCsvLastUpdateTime", visibility=["read"], format="rfc3339" @@ -694,11 +776,15 @@ class CacheNodeEntity(_model_base.Model): """Cache node resource Bgp block count.""" bgp_address_space: Optional[int] = rest_field(name="bgpAddressSpace", visibility=["read"]) """Cache node resource total addressable space defined by Bgp and Cidr Csv blocks.""" - should_migrate: Optional[bool] = rest_field(name="shouldMigrate") + should_migrate: Optional[bool] = rest_field( + name="shouldMigrate", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource flag for determining if customer will be migrated.""" bgp_file_bytes_truncated: Optional[int] = rest_field(name="bgpFileBytesTruncated", visibility=["read"]) """Cache node resource bytes truncated from Bgp output file.""" - cidr_selection_type: Optional[int] = rest_field(name="cidrSelectionType") + cidr_selection_type: Optional[int] = rest_field( + name="cidrSelectionType", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource current Cidr range precedence selection type.""" is_frozen: Optional[bool] = rest_field(name="isFrozen", visibility=["read"]) """Cache node resource flag for indicating the cache node resource is frozen (not selectable, not @@ -728,16 +814,26 @@ class CacheNodeEntity(_model_base.Model): """Cache node resource Mcc container configuration details re-sync trigger.""" image_uri: Optional[str] = rest_field(name="imageUri", visibility=["read"]) """Cache node resource Mcc Container Id Uri.""" - fully_qualified_domain_name: Optional[str] = rest_field(name="fullyQualifiedDomainName") + fully_qualified_domain_name: Optional[str] = rest_field( + name="fullyQualifiedDomainName", visibility=["read", "create", "update", "delete", "query"] + ) """FQDN(fully qualified domain name) value of the mcc cache node.""" - auto_update_ring_type: Optional[Union[str, "_models.AutoUpdateRingType"]] = rest_field(name="autoUpdateRingType") + auto_update_ring_type: Optional[Union[str, "_models.AutoUpdateRingType"]] = rest_field( + name="autoUpdateRingType", visibility=["read", "create", "update", "delete", "query"] + ) """Auto Update Ring Type which is slow or fast etc. Known values are: \"Preview\", \"Slow\", and \"Fast\".""" - auto_update_requested_week: Optional[int] = rest_field(name="autoUpdateRequestedWeek") + auto_update_requested_week: Optional[int] = rest_field( + name="autoUpdateRequestedWeek", visibility=["read", "create", "update", "delete", "query"] + ) """Customer requested week of month for mcc install of auto update cycle.""" - auto_update_requested_day: Optional[int] = rest_field(name="autoUpdateRequestedDay") + auto_update_requested_day: Optional[int] = rest_field( + name="autoUpdateRequestedDay", visibility=["read", "create", "update", "delete", "query"] + ) """Customer requested day of week for mcc install of auto update cycle.""" - auto_update_requested_time: Optional[str] = rest_field(name="autoUpdateRequestedTime") + auto_update_requested_time: Optional[str] = rest_field( + name="autoUpdateRequestedTime", visibility=["read", "create", "update", "delete", "query"] + ) """Customer requested time of the day for mcc install of auto update cycle, should be hh:mm.""" @overload @@ -775,11 +871,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CacheNodeInstallProperties(_model_base.Model): +class CacheNodeInstallProperties(_Model): """Mcc cache node resource install script properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar customer_id: Mcc customer resource Id. :vartype customer_id: str :ivar cache_node_id: Mcc cache node resource Id. @@ -790,11 +884,22 @@ class CacheNodeInstallProperties(_model_base.Model): :vartype secondary_account_key: str :ivar registration_key: Mcc Iot Central temporary device registration key, used once. :vartype registration_key: str + :ivar tls_certificate_provisioning_key: Mcc Tls certificate provisioning key. + :vartype tls_certificate_provisioning_key: str + :ivar drive_configuration: Cache node resource drive configurations. + :vartype drive_configuration: + list[~azure.mgmt.connectedcache.models.CacheNodeDriveConfiguration] + :ivar proxy_url_configuration: proxyUrl configuration of the cache node. + :vartype proxy_url_configuration: ~azure.mgmt.connectedcache.models.ProxyUrlConfiguration """ - customer_id: Optional[str] = rest_field(name="customerId") + customer_id: Optional[str] = rest_field( + name="customerId", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc customer resource Id.""" - cache_node_id: Optional[str] = rest_field(name="cacheNodeId") + cache_node_id: Optional[str] = rest_field( + name="cacheNodeId", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc cache node resource Id.""" primary_account_key: Optional[str] = rest_field(name="primaryAccountKey", visibility=["read"]) """Mcc primary account key. Internal to Mcc.""" @@ -802,6 +907,18 @@ class CacheNodeInstallProperties(_model_base.Model): """Mcc secondary account key. Internal to Mcc.""" registration_key: Optional[str] = rest_field(name="registrationKey", visibility=["read"]) """Mcc Iot Central temporary device registration key, used once.""" + tls_certificate_provisioning_key: Optional[str] = rest_field( + name="tlsCertificateProvisioningKey", visibility=["read"] + ) + """Mcc Tls certificate provisioning key.""" + drive_configuration: Optional[List["_models.CacheNodeDriveConfiguration"]] = rest_field( + name="driveConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Cache node resource drive configurations.""" + proxy_url_configuration: Optional["_models.ProxyUrlConfiguration"] = rest_field( + name="proxyUrlConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """proxyUrl configuration of the cache node.""" @overload def __init__( @@ -809,6 +926,8 @@ def __init__( *, customer_id: Optional[str] = None, cache_node_id: Optional[str] = None, + drive_configuration: Optional[List["_models.CacheNodeDriveConfiguration"]] = None, + proxy_url_configuration: Optional["_models.ProxyUrlConfiguration"] = None, ) -> None: ... @overload @@ -822,196 +941,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CacheNodeOldResponse(_model_base.Model): - """Model representing Cache Node for ConnectedCache resource. - - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Succeeded", - "Failed", "Canceled", "Unknown", "Accepted", "Upgrading", and "Deleting". - :vartype provisioning_state: str or ~azure.mgmt.connectedcache.models.ProvisioningState - :ivar status_code: statusCode used to get code details of Mcc response object. - :vartype status_code: str - :ivar status_text: statusText used to get status details in string format of Mcc response - object. - :vartype status_text: str - :ivar status_details: statusDetails used to get inner details of Mcc response object. - :vartype status_details: str - :ivar status: status of the HTTP error code. - :vartype status: str - :ivar error: The error details. - :vartype error: ~azure.mgmt.connectedcache.models.ErrorDetail - """ - - provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """The provisioned state of the resource. Known values are: \"Succeeded\", \"Failed\", - \"Canceled\", \"Unknown\", \"Accepted\", \"Upgrading\", and \"Deleting\".""" - status_code: Optional[str] = rest_field(name="statusCode") - """statusCode used to get code details of Mcc response object.""" - status_text: Optional[str] = rest_field(name="statusText") - """statusText used to get status details in string format of Mcc response object.""" - status_details: Optional[str] = rest_field(name="statusDetails") - """statusDetails used to get inner details of Mcc response object.""" - status: Optional[str] = rest_field(visibility=["read"]) - """status of the HTTP error code.""" - error: Optional["_models.ErrorDetail"] = rest_field() - """The error details.""" - - @overload - def __init__( - self, - *, - status_code: Optional[str] = None, - status_text: Optional[str] = None, - status_details: Optional[str] = None, - error: Optional["_models.ErrorDetail"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class Resource(_model_base.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.connectedcache.models.SystemData - """ - - id: Optional[str] = rest_field(visibility=["read"]) - """Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long""" - name: Optional[str] = rest_field(visibility=["read"]) - """The name of the resource.""" - type: Optional[str] = rest_field(visibility=["read"]) - """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or - \"Microsoft.Storage/storageAccounts\".""" - system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) - """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which - has 'tags' and a 'location'. - - Readonly variables are only populated by the server, and will be ignored when sending a request. - - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.connectedcache.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - """ - - tags: Optional[Dict[str, str]] = rest_field() - """Resource tags.""" - location: str = rest_field(visibility=["read", "create"]) - """The geo-location where the resource lives. Required.""" - - @overload - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CacheNodePreviewResource(TrackedResource): - """Concrete tracked resource types can be created by aliasing this type using a specific property - type. - - Readonly variables are only populated by the server, and will be ignored when sending a request. - - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.connectedcache.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.connectedcache.models.CacheNodeOldResponse - """ - - properties: Optional["_models.CacheNodeOldResponse"] = rest_field(visibility=["read", "create", "update"]) - """The resource-specific properties for this resource.""" - - @overload - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - properties: Optional["_models.CacheNodeOldResponse"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CacheNodeProperty(_model_base.Model): +class CacheNodeProperty(_Model): """Model representing an Mcc cache node connectedCache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Unknown", "Accepted", "Upgrading", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.connectedcache.models.ProvisioningState @@ -1037,21 +969,29 @@ class CacheNodeProperty(_model_base.Model): ) """The provisioned state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", \"Unknown\", \"Accepted\", \"Upgrading\", and \"Deleting\".""" - cache_node: Optional["_models.CacheNodeEntity"] = rest_field(name="cacheNode") + cache_node: Optional["_models.CacheNodeEntity"] = rest_field( + name="cacheNode", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc cache node resource (cache node entity).""" additional_cache_node_properties: Optional["_models.AdditionalCacheNodeProperties"] = rest_field( - name="additionalCacheNodeProperties" + name="additionalCacheNodeProperties", visibility=["read", "create", "update", "delete", "query"] ) """Mcc cache node resource additional properties.""" - status_code: Optional[str] = rest_field(name="statusCode") + status_code: Optional[str] = rest_field( + name="statusCode", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc response status code.""" - status_text: Optional[str] = rest_field(name="statusText") + status_text: Optional[str] = rest_field( + name="statusText", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc response status text as string for retrieving status details.""" - status_details: Optional[str] = rest_field(name="statusDetails") + status_details: Optional[str] = rest_field( + name="statusDetails", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc response status details for retrieving response inner details.""" status: Optional[str] = rest_field(visibility=["read"]) """HTTP error status code.""" - error: Optional["_models.ErrorDetail"] = rest_field() + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Mcc response error details.""" @overload @@ -1077,7 +1017,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ConnectedCachePatchResource(_model_base.Model): +class ConnectedCachePatchResource(_Model): """Mcc PATCH operation properties. :ivar tags: Resource tags. @@ -1105,11 +1045,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CustomerEntity(_model_base.Model): +class CustomerEntity(_Model): """Model representing Customer resource for ConnectedCache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar fully_qualified_resource_id: Customer resource Azure fully qualified resource Id. :vartype fully_qualified_resource_id: str :ivar customer_id: Customer resource Guid Id. @@ -1149,27 +1087,43 @@ class CustomerEntity(_model_base.Model): :vartype verify_signup_phrase: str """ - fully_qualified_resource_id: Optional[str] = rest_field(name="fullyQualifiedResourceId") + fully_qualified_resource_id: Optional[str] = rest_field( + name="fullyQualifiedResourceId", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource Azure fully qualified resource Id.""" customer_id: Optional[str] = rest_field(name="customerId", visibility=["read"]) """Customer resource Guid Id.""" - customer_name: Optional[str] = rest_field(name="customerName") + customer_name: Optional[str] = rest_field( + name="customerName", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource name.""" - contact_email: Optional[str] = rest_field(name="contactEmail") + contact_email: Optional[str] = rest_field( + name="contactEmail", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource contact email.""" - contact_phone: Optional[str] = rest_field(name="contactPhone") + contact_phone: Optional[str] = rest_field( + name="contactPhone", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource contact phone.""" - contact_name: Optional[str] = rest_field(name="contactName") + contact_name: Optional[str] = rest_field( + name="contactName", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource contact full name.""" - is_entitled: Optional[bool] = rest_field(name="isEntitled") + is_entitled: Optional[bool] = rest_field( + name="isEntitled", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource entitlement flag as boolean.""" - release_version: Optional[int] = rest_field(name="releaseVersion") + release_version: Optional[int] = rest_field( + name="releaseVersion", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource Mcc release version.""" create_async_operation_id: Optional[str] = rest_field(name="createAsyncOperationId", visibility=["read"]) """Customer resource create async operation Id.""" delete_async_operation_id: Optional[str] = rest_field(name="deleteAsyncOperationId", visibility=["read"]) """Customer resource deletion async operation Id.""" - client_tenant_id: Optional[str] = rest_field(name="clientTenantId") + client_tenant_id: Optional[str] = rest_field( + name="clientTenantId", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource client tenant Id of subscription.""" synch_with_azure_attempts_count: Optional[int] = rest_field(name="synchWithAzureAttemptsCount", visibility=["read"]) """Customer resource sync attempts.""" @@ -1177,13 +1131,21 @@ class CustomerEntity(_model_base.Model): name="lastSyncWithAzureTimestamp", visibility=["read"], format="rfc3339" ) """Customer resource last Azure sync timestamp.""" - is_enterprise_managed: Optional[bool] = rest_field(name="isEnterpriseManaged") + is_enterprise_managed: Optional[bool] = rest_field( + name="isEnterpriseManaged", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource flag for enterprise management as boolean.""" - should_migrate: Optional[bool] = rest_field(name="shouldMigrate") + should_migrate: Optional[bool] = rest_field( + name="shouldMigrate", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource flag for migration.""" - resend_signup_code: Optional[bool] = rest_field(name="resendSignupCode") + resend_signup_code: Optional[bool] = rest_field( + name="resendSignupCode", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource flag for resending signup code as boolean.""" - verify_signup_code: Optional[bool] = rest_field(name="verifySignupCode") + verify_signup_code: Optional[bool] = rest_field( + name="verifySignupCode", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource flag for requiring verification of signup code as boolean.""" verify_signup_phrase: Optional[str] = rest_field(name="verifySignupPhrase", visibility=["create", "update"]) """Customer resource phrase for verifying signup.""" @@ -1218,11 +1180,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CustomerProperty(_model_base.Model): +class CustomerProperty(_Model): """Model representing customer for connectedCache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Unknown", "Accepted", "Upgrading", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.connectedcache.models.ProvisioningState @@ -1248,10 +1208,12 @@ class CustomerProperty(_model_base.Model): ) """The provisioned state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", \"Unknown\", \"Accepted\", \"Upgrading\", and \"Deleting\".""" - customer: Optional["_models.CustomerEntity"] = rest_field() + customer: Optional["_models.CustomerEntity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Mcc customer resource (customer entity).""" additional_customer_properties: Optional["_models.AdditionalCustomerProperties"] = rest_field( - name="additionalCustomerProperties" + name="additionalCustomerProperties", visibility=["read", "create", "update", "delete", "query"] ) """Mcc customer resource additional properties.""" status_code: Optional[str] = rest_field(name="statusCode", visibility=["read"]) @@ -1284,14 +1246,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EnterpriseMccCacheNodeResource(TrackedResource): - """Represents the high level Nodes needed to provision cache node resources. - - Readonly variables are only populated by the server, and will be ignored when sending a request. - +class Resource(_Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1301,16 +1260,45 @@ class EnterpriseMccCacheNodeResource(TrackedResource): :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. :vartype system_data: ~azure.mgmt.connectedcache.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.connectedcache.models.CacheNodeProperty """ - properties: Optional["_models.CacheNodeProperty"] = rest_field(visibility=["read", "create", "update"]) - """The resource-specific properties for this resource.""" + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the resource.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.connectedcache.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + location: str = rest_field(visibility=["read", "create"]) + """The geo-location where the resource lives. Required.""" @overload def __init__( @@ -1318,7 +1306,6 @@ def __init__( *, location: str, tags: Optional[Dict[str, str]] = None, - properties: Optional["_models.CacheNodeProperty"] = None, ) -> None: ... @overload @@ -1332,14 +1319,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EnterpriseMccCustomerResource(TrackedResource): - """Represents the high level Nodes needed to provision customer resources. - - Readonly variables are only populated by the server, and will be ignored when sending a request. - +class EnterpriseMccCacheNodeResource(TrackedResource): + """Represents the high level Nodes needed to provision cache node resources. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1354,10 +1338,10 @@ class EnterpriseMccCustomerResource(TrackedResource): :ivar location: The geo-location where the resource lives. Required. :vartype location: str :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.connectedcache.models.CustomerProperty + :vartype properties: ~azure.mgmt.connectedcache.models.CacheNodeProperty """ - properties: Optional["_models.CustomerProperty"] = rest_field(visibility=["read", "create", "update"]) + properties: Optional["_models.CacheNodeProperty"] = rest_field(visibility=["read", "create", "update"]) """The resource-specific properties for this resource.""" @overload @@ -1366,7 +1350,7 @@ def __init__( *, location: str, tags: Optional[Dict[str, str]] = None, - properties: Optional["_models.CustomerProperty"] = None, + properties: Optional["_models.CacheNodeProperty"] = None, ) -> None: ... @overload @@ -1380,15 +1364,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EnterprisePreviewResource(TrackedResource): - """ConnectedCache Resource. Represents the high level Nodes needed to provision CacheNode and - customer resources used in private preview. - - Readonly variables are only populated by the server, and will be ignored when sending a request. - +class EnterpriseMccCustomerResource(TrackedResource): + """Represents the high level Nodes needed to provision customer resources. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1403,10 +1383,10 @@ class EnterprisePreviewResource(TrackedResource): :ivar location: The geo-location where the resource lives. Required. :vartype location: str :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.connectedcache.models.CacheNodeOldResponse + :vartype properties: ~azure.mgmt.connectedcache.models.CustomerProperty """ - properties: Optional["_models.CacheNodeOldResponse"] = rest_field(visibility=["read", "create", "update"]) + properties: Optional["_models.CustomerProperty"] = rest_field(visibility=["read", "create", "update"]) """The resource-specific properties for this resource.""" @overload @@ -1415,7 +1395,7 @@ def __init__( *, location: str, tags: Optional[Dict[str, str]] = None, - properties: Optional["_models.CacheNodeOldResponse"] = None, + properties: Optional["_models.CustomerProperty"] = None, ) -> None: ... @overload @@ -1429,11 +1409,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ErrorAdditionalInfo(_model_base.Model): +class ErrorAdditionalInfo(_Model): """The resource management error additional info. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. @@ -1446,11 +1424,9 @@ class ErrorAdditionalInfo(_model_base.Model): """The additional info.""" -class ErrorDetail(_model_base.Model): +class ErrorDetail(_Model): """The error detail. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar code: The error code. :vartype code: str :ivar message: The error message. @@ -1477,7 +1453,7 @@ class ErrorDetail(_model_base.Model): """The error additional info.""" -class ErrorResponse(_model_base.Model): +class ErrorResponse(_Model): """Common error response for all Azure Resource Manager APIs to return error details for failed operations. @@ -1485,7 +1461,7 @@ class ErrorResponse(_model_base.Model): :vartype error: ~azure.mgmt.connectedcache.models.ErrorDetail """ - error: Optional["_models.ErrorDetail"] = rest_field() + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error object.""" @overload @@ -1509,11 +1485,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class IspCacheNodeResource(TrackedResource): """Represents the high level Nodes needed to provision cache node resources. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1557,11 +1530,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class IspCustomerResource(TrackedResource): """Represents the high level Nodes needed to provision isp customer resources. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1602,14 +1572,183 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class MccCacheNodeBgpCidrDetails(TrackedResource): - """Represents all Cidr details of the Bgp request for a specific cache node resource. +class MccCacheNodeAutoUpdateHistory(TrackedResource): + """Mcc cache node resource auto update history. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.connectedcache.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Mcc cache node resource auto update history properties. + :vartype properties: ~azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateHistoryProperties + """ + + properties: Optional["_models.MccCacheNodeAutoUpdateHistoryProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Mcc cache node resource auto update history properties.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + properties: Optional["_models.MccCacheNodeAutoUpdateHistoryProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MccCacheNodeAutoUpdateHistoryProperties(_Model): + """Mcc cache node resource auto update history properties. + + :ivar customer_id: Mcc customer resource Id. + :vartype customer_id: str + :ivar cache_node_id: Mcc cache node resource Id. + :vartype cache_node_id: str + :ivar auto_update_history: Cache node resource auto update history information. + :vartype auto_update_history: + list[~azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateInfo] + """ + + customer_id: Optional[str] = rest_field(name="customerId", visibility=["read"]) + """Mcc customer resource Id.""" + cache_node_id: Optional[str] = rest_field(name="cacheNodeId", visibility=["read"]) + """Mcc cache node resource Id.""" + auto_update_history: Optional[List["_models.MccCacheNodeAutoUpdateInfo"]] = rest_field( + name="autoUpdateHistory", visibility=["read", "create", "update", "delete", "query"] + ) + """Cache node resource auto update history information.""" - Readonly variables are only populated by the server, and will be ignored when sending a request. + @overload + def __init__( + self, + *, + auto_update_history: Optional[List["_models.MccCacheNodeAutoUpdateInfo"]] = None, + ) -> None: ... + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MccCacheNodeAutoUpdateInfo(_Model): + """Mcc cache node resource auto update properties. + + :ivar image_uri_before_update: Auto update image uri before update. + :vartype image_uri_before_update: str + :ivar image_uri_targeted: Auto update image uri targetted to update. + :vartype image_uri_targeted: str + :ivar image_uri_terminal: Auto update image uri at Terminal. + :vartype image_uri_terminal: str + :ivar auto_update_ring_type: Auto update Ring Type. + :vartype auto_update_ring_type: int + :ivar moved_to_terminal_state_date_time: Auto update image uri after update. + :vartype moved_to_terminal_state_date_time: ~datetime.datetime + :ivar rule_requested_week: Auto update image uri before update. + :vartype rule_requested_week: int + :ivar rule_requested_day: Auto update image uri after update. + :vartype rule_requested_day: int + :ivar created_date_time_utc: Auto update entity created datetime. + :vartype created_date_time_utc: ~datetime.datetime + :ivar updated_registry_date_time_utc: Auto update entity last updated datetime. + :vartype updated_registry_date_time_utc: ~datetime.datetime + :ivar plan_change_log_text: This text describing the purpose of the plan of auto update. + :vartype plan_change_log_text: str + :ivar auto_update_last_applied_status: Auto update last applied status. + :vartype auto_update_last_applied_status: int + :ivar auto_update_last_applied_status_text: Auto update last applied status text. + :vartype auto_update_last_applied_status_text: str + :ivar auto_update_last_applied_status_detailed_text: Auto update last applied detailed status + text. + :vartype auto_update_last_applied_status_detailed_text: str + :ivar plan_id: Auto update planId. + :vartype plan_id: int + :ivar time_to_go_live_date_time: Auto update time to go live date time. + :vartype time_to_go_live_date_time: str + :ivar rule_requested_minute: Auto update rule requested minute. + :vartype rule_requested_minute: str + :ivar rule_requested_hour: Auto update rule requested hour. + :vartype rule_requested_hour: str + """ + + image_uri_before_update: Optional[str] = rest_field(name="imageUriBeforeUpdate", visibility=["read"]) + """Auto update image uri before update.""" + image_uri_targeted: Optional[str] = rest_field(name="imageUriTargeted", visibility=["read"]) + """Auto update image uri targetted to update.""" + image_uri_terminal: Optional[str] = rest_field(name="imageUriTerminal", visibility=["read"]) + """Auto update image uri at Terminal.""" + auto_update_ring_type: Optional[int] = rest_field(name="autoUpdateRingType", visibility=["read"]) + """Auto update Ring Type.""" + moved_to_terminal_state_date_time: Optional[datetime.datetime] = rest_field( + name="movedToTerminalStateDateTime", visibility=["read"], format="rfc3339" + ) + """Auto update image uri after update.""" + rule_requested_week: Optional[int] = rest_field(name="ruleRequestedWeek", visibility=["read"]) + """Auto update image uri before update.""" + rule_requested_day: Optional[int] = rest_field(name="ruleRequestedDay", visibility=["read"]) + """Auto update image uri after update.""" + created_date_time_utc: Optional[datetime.datetime] = rest_field( + name="createdDateTimeUtc", visibility=["read"], format="rfc3339" + ) + """Auto update entity created datetime.""" + updated_registry_date_time_utc: Optional[datetime.datetime] = rest_field( + name="updatedRegistryDateTimeUtc", visibility=["read"], format="rfc3339" + ) + """Auto update entity last updated datetime.""" + plan_change_log_text: Optional[str] = rest_field(name="planChangeLogText", visibility=["read"]) + """This text describing the purpose of the plan of auto update.""" + auto_update_last_applied_status: Optional[int] = rest_field(name="autoUpdateLastAppliedStatus", visibility=["read"]) + """Auto update last applied status.""" + auto_update_last_applied_status_text: Optional[str] = rest_field( + name="autoUpdateLastAppliedStatusText", visibility=["read"] + ) + """Auto update last applied status text.""" + auto_update_last_applied_status_detailed_text: Optional[str] = rest_field( + name="autoUpdateLastAppliedStatusDetailedText", visibility=["read"] + ) + """Auto update last applied detailed status text.""" + plan_id: Optional[int] = rest_field(name="planId", visibility=["read"]) + """Auto update planId.""" + time_to_go_live_date_time: Optional[str] = rest_field(name="timeToGoLiveDateTime", visibility=["read"]) + """Auto update time to go live date time.""" + rule_requested_minute: Optional[str] = rest_field(name="ruleRequestedMinute", visibility=["read"]) + """Auto update rule requested minute.""" + rule_requested_hour: Optional[str] = rest_field(name="ruleRequestedHour", visibility=["read"]) + """Auto update rule requested hour.""" + + +class MccCacheNodeBgpCidrDetails(TrackedResource): + """Represents all Cidr details of the Bgp request for a specific cache node resource. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1627,7 +1766,9 @@ class MccCacheNodeBgpCidrDetails(TrackedResource): :vartype properties: ~azure.mgmt.connectedcache.models.BgpCidrsConfiguration """ - properties: Optional["_models.BgpCidrsConfiguration"] = rest_field() + properties: Optional["_models.BgpCidrsConfiguration"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Mcc cache node resource Bgp Cidr properties.""" @overload @@ -1653,11 +1794,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class MccCacheNodeInstallDetails(TrackedResource): """Mcc cache node resource all install details. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1675,7 +1813,9 @@ class MccCacheNodeInstallDetails(TrackedResource): :vartype properties: ~azure.mgmt.connectedcache.models.CacheNodeInstallProperties """ - properties: Optional["_models.CacheNodeInstallProperties"] = rest_field() + properties: Optional["_models.CacheNodeInstallProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Mcc cache node resource install script details.""" @overload @@ -1698,10 +1838,249 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Operation(_model_base.Model): - """Details of a REST API operation, returned from the Resource Provider Operations API. +class MccCacheNodeIssueHistory(TrackedResource): + """Mcc cache node resource issue history. - Readonly variables are only populated by the server, and will be ignored when sending a request. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.connectedcache.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Mcc cache node resource issue history properties. + :vartype properties: ~azure.mgmt.connectedcache.models.MccCacheNodeIssueHistoryProperties + """ + + properties: Optional["_models.MccCacheNodeIssueHistoryProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Mcc cache node resource issue history properties.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + properties: Optional["_models.MccCacheNodeIssueHistoryProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MccCacheNodeIssueHistoryProperties(_Model): + """Mcc cache node resource issue history properties. + + :ivar customer_id: Mcc customer resource Id. + :vartype customer_id: str + :ivar cache_node_id: Mcc cache node resource Id. + :vartype cache_node_id: str + :ivar mcc_issue_history: Cache node resource issue details history. + :vartype mcc_issue_history: list[~azure.mgmt.connectedcache.models.MccIssue] + """ + + customer_id: Optional[str] = rest_field(name="customerId", visibility=["read"]) + """Mcc customer resource Id.""" + cache_node_id: Optional[str] = rest_field(name="cacheNodeId", visibility=["read"]) + """Mcc cache node resource Id.""" + mcc_issue_history: Optional[List["_models.MccIssue"]] = rest_field( + name="mccIssueHistory", visibility=["read", "create", "update", "delete", "query"] + ) + """Cache node resource issue details history.""" + + @overload + def __init__( + self, + *, + mcc_issue_history: Optional[List["_models.MccIssue"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MccCacheNodeTlsCertificate(_Model): + """Mcc cache node resource Tls certificate details. + + :ivar action_required: Mcc cache node Tls certificate status. + :vartype action_required: str + :ivar certificate_file_name: Mcc cache node Tls certificate file name. + :vartype certificate_file_name: str + :ivar thumbprint: Mcc cache node Tls certificate thumbprint. + :vartype thumbprint: str + :ivar expiry_date: Mcc cache node Tls certificate expiry date. + :vartype expiry_date: ~datetime.datetime + :ivar not_before_date: Mcc cache node Tls certificate not before date. + :vartype not_before_date: ~datetime.datetime + :ivar subject: Mcc cache node Tls certificate subject name. + :vartype subject: str + :ivar subject_alt_name: Mcc cache node Tls certificate subject alternate name. + :vartype subject_alt_name: str + """ + + action_required: Optional[str] = rest_field(name="actionRequired", visibility=["read"]) + """Mcc cache node Tls certificate status.""" + certificate_file_name: Optional[str] = rest_field(name="certificateFileName", visibility=["read"]) + """Mcc cache node Tls certificate file name.""" + thumbprint: Optional[str] = rest_field(visibility=["read"]) + """Mcc cache node Tls certificate thumbprint.""" + expiry_date: Optional[datetime.datetime] = rest_field(name="expiryDate", visibility=["read"], format="rfc3339") + """Mcc cache node Tls certificate expiry date.""" + not_before_date: Optional[datetime.datetime] = rest_field( + name="notBeforeDate", visibility=["read"], format="rfc3339" + ) + """Mcc cache node Tls certificate not before date.""" + subject: Optional[str] = rest_field(visibility=["read"]) + """Mcc cache node Tls certificate subject name.""" + subject_alt_name: Optional[str] = rest_field(name="subjectAltName", visibility=["read"]) + """Mcc cache node Tls certificate subject alternate name.""" + + +class MccCacheNodeTlsCertificateHistory(TrackedResource): + """Mcc cache node resource Tls certificate history details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.connectedcache.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Mcc cache node resource Tls certificate details. + :vartype properties: ~azure.mgmt.connectedcache.models.MccCacheNodeTlsCertificateProperties + """ + + properties: Optional["_models.MccCacheNodeTlsCertificateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Mcc cache node resource Tls certificate details.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + properties: Optional["_models.MccCacheNodeTlsCertificateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MccCacheNodeTlsCertificateProperties(_Model): + """Mcc cache node resource auto update properties. + + :ivar customer_id: Mcc customer resource Id. + :vartype customer_id: str + :ivar cache_node_id: Mcc cache node resource Id. + :vartype cache_node_id: str + :ivar tls_certificate_history: Cache node resource tls certificate history details. + :vartype tls_certificate_history: + list[~azure.mgmt.connectedcache.models.MccCacheNodeTlsCertificate] + """ + + customer_id: Optional[str] = rest_field(name="customerId", visibility=["read"]) + """Mcc customer resource Id.""" + cache_node_id: Optional[str] = rest_field(name="cacheNodeId", visibility=["read"]) + """Mcc cache node resource Id.""" + tls_certificate_history: Optional[List["_models.MccCacheNodeTlsCertificate"]] = rest_field( + name="tlsCertificateHistory", visibility=["read", "create", "update", "delete", "query"] + ) + """Cache node resource tls certificate history details.""" + + @overload + def __init__( + self, + *, + tls_certificate_history: Optional[List["_models.MccCacheNodeTlsCertificate"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MccIssue(_Model): + """Mcc cache node resource issue properties. + + :ivar mcc_issue_type: Mcc cache node issue type. + :vartype mcc_issue_type: str + :ivar toast_string: Mcc cache node issues toastString. + :vartype toast_string: str + :ivar detail_string: Mcc cache node issue detail string. + :vartype detail_string: str + :ivar help_link: Mcc cache node issue related help link. + :vartype help_link: str + :ivar issue_start_date: Mcc cache node issue start date. + :vartype issue_start_date: ~datetime.datetime + :ivar issue_end_date: Mcc cache node issue end date. + :vartype issue_end_date: ~datetime.datetime + """ + + mcc_issue_type: Optional[str] = rest_field(name="mccIssueType", visibility=["read"]) + """Mcc cache node issue type.""" + toast_string: Optional[str] = rest_field(name="toastString", visibility=["read"]) + """Mcc cache node issues toastString.""" + detail_string: Optional[str] = rest_field(name="detailString", visibility=["read"]) + """Mcc cache node issue detail string.""" + help_link: Optional[str] = rest_field(name="helpLink", visibility=["read"]) + """Mcc cache node issue related help link.""" + issue_start_date: Optional[datetime.datetime] = rest_field( + name="issueStartDate", visibility=["read"], format="rfc3339" + ) + """Mcc cache node issue start date.""" + issue_end_date: Optional[datetime.datetime] = rest_field(name="issueEndDate", visibility=["read"], format="rfc3339") + """Mcc cache node issue end date.""" + + +class Operation(_Model): + """Details of a REST API operation, returned from the Resource Provider Operations API. :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". @@ -1727,13 +2106,15 @@ class Operation(_model_base.Model): is_data_action: Optional[bool] = rest_field(name="isDataAction", visibility=["read"]) """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.""" - display: Optional["_models.OperationDisplay"] = rest_field(visibility=["read"]) + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Localized display information for this particular operation.""" origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\". Known values are: \"user\", \"system\", and \"user,system\".""" - action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType") + action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType", visibility=["read"]) """Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \"Internal\"""" @@ -1741,7 +2122,7 @@ class Operation(_model_base.Model): def __init__( self, *, - action_type: Optional[Union[str, "_models.ActionType"]] = None, + display: Optional["_models.OperationDisplay"] = None, ) -> None: ... @overload @@ -1755,11 +2136,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OperationDisplay(_model_base.Model): +class OperationDisplay(_Model): """Localized display information for and operation. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". :vartype provider: str @@ -1788,17 +2167,18 @@ class OperationDisplay(_model_base.Model): views.""" -class ProxyUrlConfiguration(_model_base.Model): +class ProxyUrlConfiguration(_Model): """ProxyUrl configuration of cache node. :ivar proxy_url: Host Proxy Address configuration along with port number. This can be a proxy - or ip address. ex: xx.xx.xx.xxxx:80 or host name http://exampleproxy.com:80. + or ip address. ex: xx.xx.xx.xxxx:80 or host name `http://exampleproxy.com:80 + `_. :vartype proxy_url: str """ - proxy_url: Optional[str] = rest_field(name="proxyUrl") + proxy_url: Optional[str] = rest_field(name="proxyUrl", visibility=["read", "create", "update", "delete", "query"]) """Host Proxy Address configuration along with port number. This can be a proxy or ip address. ex: - xx.xx.xx.xxxx:80 or host name http://exampleproxy.com:80.""" + xx.xx.xx.xxxx:80 or host name `http://exampleproxy.com:80 `_.""" @overload def __init__( @@ -1818,7 +2198,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SystemData(_model_base.Model): +class SystemData(_Model): """Metadata pertaining to creation and last modification of the resource. :ivar created_by: The identity that created the resource. @@ -1837,19 +2217,29 @@ class SystemData(_model_base.Model): :vartype last_modified_at: ~datetime.datetime """ - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The identity that created the resource.""" - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(name="createdByType") + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) """The type of identity that created the resource. Known values are: \"User\", \"Application\", \"ManagedIdentity\", and \"Key\".""" - created_at: Optional[datetime.datetime] = rest_field(name="createdAt", format="rfc3339") + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of resource creation (UTC).""" - last_modified_by: Optional[str] = rest_field(name="lastModifiedBy") + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) """The identity that last modified the resource.""" - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(name="lastModifiedByType") + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) """The type of identity that last modified the resource. Known values are: \"User\", \"Application\", \"ManagedIdentity\", and \"Key\".""" - last_modified_at: Optional[datetime.datetime] = rest_field(name="lastModifiedAt", format="rfc3339") + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of resource last modification (UTC).""" @overload diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/__init__.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/__init__.py index f34ede4b37e1..ff07f8879332 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/__init__.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/__init__.py @@ -13,8 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import Operations # type: ignore -from ._operations import EnterpriseCustomerOperationsOperations # type: ignore -from ._operations import CacheNodesOperationsOperations # type: ignore from ._operations import IspCustomersOperations # type: ignore from ._operations import IspCacheNodesOperationsOperations # type: ignore from ._operations import EnterpriseMccCustomersOperations # type: ignore @@ -26,8 +24,6 @@ __all__ = [ "Operations", - "EnterpriseCustomerOperationsOperations", - "CacheNodesOperationsOperations", "IspCustomersOperations", "IspCacheNodesOperationsOperations", "EnterpriseMccCustomersOperations", diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_operations.py index bcf520f14919..feb0fe3df7eb 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_operations.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,12 +6,13 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -32,16 +33,14 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._model_base import SdkJSONEncoder, _deserialize -from .._serialization import Serializer +from .._configuration import ConnectedCacheMgmtClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._utils.serialization import Deserializer, Serializer +from .._validation import api_version_validation -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -51,7 +50,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -66,17 +65,17 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_customer_operations_get_request( # pylint: disable=name-too-long +def build_isp_customers_get_request( resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -94,18 +93,18 @@ def build_enterprise_customer_operations_get_request( # pylint: disable=name-to return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_customer_operations_create_or_update_request( # pylint: disable=name-too-long +def build_isp_customers_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -125,18 +124,18 @@ def build_enterprise_customer_operations_create_or_update_request( # pylint: di return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_customer_operations_update_request( # pylint: disable=name-too-long +def build_isp_customers_update_request( resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -156,17 +155,17 @@ def build_enterprise_customer_operations_update_request( # pylint: disable=name return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_customer_operations_delete_request( # pylint: disable=name-too-long +def build_isp_customers_delete_request( resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -184,17 +183,17 @@ def build_enterprise_customer_operations_delete_request( # pylint: disable=name return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_customer_operations_list_by_resource_group_request( # pylint: disable=name-too-long +def build_isp_customers_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -211,17 +210,17 @@ def build_enterprise_customer_operations_list_by_resource_group_request( # pyli return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_customer_operations_list_by_subscription_request( # pylint: disable=name-too-long +def build_isp_customers_list_by_subscription_request( # pylint: disable=name-too-long subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/enterpriseCustomers" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/ispCustomers" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -237,21 +236,26 @@ def build_enterprise_customer_operations_list_by_subscription_request( # pylint return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_cache_nodes_operations_get_request( - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_isp_cache_nodes_operations_get_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -265,22 +269,27 @@ def build_cache_nodes_operations_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_cache_nodes_operations_createor_update_request( # pylint: disable=name-too-long - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_isp_cache_nodes_operations_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -296,21 +305,27 @@ def build_cache_nodes_operations_createor_update_request( # pylint: disable=nam return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_cache_nodes_operations_delete_request( # pylint: disable=name-too-long - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_isp_cache_nodes_operations_update_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -319,27 +334,33 @@ def build_cache_nodes_operations_delete_request( # pylint: disable=name-too-lon _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_cache_nodes_operations_update_request( # pylint: disable=name-too-long - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_isp_cache_nodes_operations_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -348,27 +369,26 @@ def build_cache_nodes_operations_update_request( # pylint: disable=name-too-lon _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_cache_nodes_operations_list_by_resource_group_request( # pylint: disable=name-too-long - resource_group_name: str, subscription_id: str, **kwargs: Any +def build_isp_cache_nodes_operations_list_by_isp_customer_resource_request( # pylint: disable=name-too-long + resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -382,19 +402,26 @@ def build_cache_nodes_operations_list_by_resource_group_request( # pylint: disa return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_cache_nodes_operations_list_by_subscription_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any +def build_isp_cache_nodes_operations_get_bgp_cidrs_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/cacheNodes" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getBgpCidrs" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -405,24 +432,29 @@ def build_cache_nodes_operations_list_by_subscription_request( # pylint: disabl # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_customers_get_request( - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_isp_cache_nodes_operations_get_cache_node_install_details_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -433,25 +465,29 @@ def build_isp_customers_get_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_customers_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_isp_cache_nodes_operations_get_cache_node_auto_update_history_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeAutoUpdateHistory" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -460,29 +496,31 @@ def build_isp_customers_create_or_update_request( # pylint: disable=name-too-lo _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_customers_update_request( - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeMccIssueDetailsHistory" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -491,24 +529,22 @@ def build_isp_customers_update_request( _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_customers_delete_request( +def build_enterprise_mcc_customers_get_request( # pylint: disable=name-too-long resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -523,23 +559,25 @@ def build_isp_customers_delete_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_customers_list_by_resource_group_request( # pylint: disable=name-too-long - resource_group_name: str, subscription_id: str, **kwargs: Any +def build_enterprise_mcc_customers_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -548,24 +586,29 @@ def build_isp_customers_list_by_resource_group_request( # pylint: disable=name- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_customers_list_by_subscription_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any +def build_enterprise_mcc_customers_update_request( # pylint: disable=name-too-long + resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/ispCustomers" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -574,31 +617,28 @@ def build_isp_customers_list_by_subscription_request( # pylint: disable=name-to _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_cache_nodes_operations_get_request( # pylint: disable=name-too-long - resource_group_name: str, - customer_resource_name: str, - cache_node_resource_name: str, - subscription_id: str, - **kwargs: Any +def build_enterprise_mcc_customers_delete_request( # pylint: disable=name-too-long + resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -609,30 +649,23 @@ def build_isp_cache_nodes_operations_get_request( # pylint: disable=name-too-lo # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_cache_nodes_operations_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, - customer_resource_name: str, - cache_node_resource_name: str, - subscription_id: str, - **kwargs: Any +def build_enterprise_mcc_customers_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -641,34 +674,24 @@ def build_isp_cache_nodes_operations_create_or_update_request( # pylint: disabl _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_cache_nodes_operations_update_request( # pylint: disable=name-too-long - resource_group_name: str, - customer_resource_name: str, - cache_node_resource_name: str, - subscription_id: str, - **kwargs: Any +def build_enterprise_mcc_customers_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -677,14 +700,12 @@ def build_isp_cache_nodes_operations_update_request( # pylint: disable=name-too _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_cache_nodes_operations_delete_request( # pylint: disable=name-too-long +def build_enterprise_mcc_cache_nodes_operations_get_request( # pylint: disable=name-too-long resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, @@ -694,11 +715,11 @@ def build_isp_cache_nodes_operations_delete_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -714,24 +735,30 @@ def build_isp_cache_nodes_operations_delete_request( # pylint: disable=name-too # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_cache_nodes_operations_list_by_isp_customer_resource_request( # pylint: disable=name-too-long - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_enterprise_mcc_cache_nodes_operations_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -740,12 +767,14 @@ def build_isp_cache_nodes_operations_list_by_isp_customer_resource_request( # p _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_cache_nodes_operations_get_bgp_cidrs_request( # pylint: disable=name-too-long +def build_enterprise_mcc_cache_nodes_operations_update_request( # pylint: disable=name-too-long resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, @@ -755,11 +784,12 @@ def build_isp_cache_nodes_operations_get_bgp_cidrs_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getBgpCidrs" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -773,12 +803,14 @@ def build_isp_cache_nodes_operations_get_bgp_cidrs_request( # pylint: disable=n _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_isp_cache_nodes_operations_get_cache_node_install_details_request( # pylint: disable=name-too-long +def build_enterprise_mcc_cache_nodes_operations_delete_request( # pylint: disable=name-too-long resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, @@ -788,11 +820,11 @@ def build_isp_cache_nodes_operations_get_cache_node_install_details_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -808,20 +840,20 @@ def build_isp_cache_nodes_operations_get_cache_node_install_details_request( # # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_mcc_customers_get_request( # pylint: disable=name-too-long +def build_enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_request( # pylint: disable=name-too-long resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -839,22 +871,26 @@ def build_enterprise_mcc_customers_get_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_mcc_customers_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -863,29 +899,31 @@ def build_enterprise_mcc_customers_create_or_update_request( # pylint: disable= _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_mcc_customers_update_request( # pylint: disable=name-too-long - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeAutoUpdateHistory" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -894,1774 +932,106 @@ def build_enterprise_mcc_customers_update_request( # pylint: disable=name-too-l _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_enterprise_mcc_customers_delete_request( # pylint: disable=name-too-long - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any +def build_enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_enterprise_mcc_customers_list_by_resource_group_request( # pylint: disable=name-too-long - resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers" # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_enterprise_mcc_customers_list_by_subscription_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_enterprise_mcc_cache_nodes_operations_get_request( # pylint: disable=name-too-long - resource_group_name: str, - customer_resource_name: str, - cache_node_resource_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_enterprise_mcc_cache_nodes_operations_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, - customer_resource_name: str, - cache_node_resource_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_enterprise_mcc_cache_nodes_operations_update_request( # pylint: disable=name-too-long - resource_group_name: str, - customer_resource_name: str, - cache_node_resource_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_enterprise_mcc_cache_nodes_operations_delete_request( # pylint: disable=name-too-long - resource_group_name: str, - customer_resource_name: str, - cache_node_resource_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_request( # pylint: disable=name-too-long - resource_group_name: str, customer_resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes" # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_request( # pylint: disable=name-too-long - resource_group_name: str, - customer_resource_name: str, - cache_node_resource_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails" # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), - "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class Operations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.connectedcache.ConnectedCacheMgmtClient`'s - :attr:`operations` attribute. - """ - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: - """List the operations for the provider. - - :return: An iterator like instance of Operation - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedcache.models.Operation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_operations_list_request( - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class EnterpriseCustomerOperationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.connectedcache.ConnectedCacheMgmtClient`'s - :attr:`enterprise_customer_operations` attribute. - """ - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, customer_resource_name: str, **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """Retrieves the properties of a Enterprise customer. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.EnterprisePreviewResource] = kwargs.pop("cls", None) - - _request = build_enterprise_customer_operations_get_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models.EnterprisePreviewResource, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - customer_resource_name: str, - resource: Union[_models.EnterprisePreviewResource, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(resource, (IOBase, bytes)): - _content = resource - else: - _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_enterprise_customer_operations_create_or_update_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: _models.EnterprisePreviewResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.EnterprisePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns EnterprisePreviewResource. The - EnterprisePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.EnterprisePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns EnterprisePreviewResource. The - EnterprisePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.EnterprisePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns EnterprisePreviewResource. The - EnterprisePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: Union[_models.EnterprisePreviewResource, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.EnterprisePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Is one of the following types: - EnterprisePreviewResource, JSON, IO[bytes] Required. - :type resource: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource or JSON or - IO[bytes] - :return: An instance of LROPoller that returns EnterprisePreviewResource. The - EnterprisePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EnterprisePreviewResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - resource=resource, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.EnterprisePreviewResource, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.EnterprisePreviewResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.EnterprisePreviewResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: _models.ConnectedCachePatchResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """updates an existing enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: ~azure.mgmt.connectedcache.models.ConnectedCachePatchResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """updates an existing enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """updates an existing enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: Union[_models.ConnectedCachePatchResource, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.EnterprisePreviewResource: - """updates an existing enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Is one of the following types: - ConnectedCachePatchResource, JSON, IO[bytes] Required. - :type properties: ~azure.mgmt.connectedcache.models.ConnectedCachePatchResource or JSON or - IO[bytes] - :return: EnterprisePreviewResource. The EnterprisePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.EnterprisePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EnterprisePreviewResource] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(properties, (IOBase, bytes)): - _content = properties - else: - _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_enterprise_customer_operations_update_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models.EnterprisePreviewResource, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, customer_resource_name: str, **kwargs: Any - ) -> None: - """Deletes an existing customer Enterprise resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_enterprise_customer_operations_delete_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> Iterable["_models.EnterprisePreviewResource"]: - """Retrieves the properties of all ConnectedCache enterpriseCustomers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of EnterprisePreviewResource - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.EnterprisePreviewResource]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_enterprise_customer_operations_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.EnterprisePreviewResource"]: - """Retrieves the properties of all ConnectedCaches. - - :return: An iterator like instance of EnterprisePreviewResource - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.connectedcache.models.EnterprisePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.EnterprisePreviewResource]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_enterprise_customer_operations_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class CacheNodesOperationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.connectedcache.ConnectedCacheMgmtClient`'s - :attr:`cache_nodes_operations` attribute. - """ - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, customer_resource_name: str, **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """Retrieves the properties of a cacheNodes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CacheNodePreviewResource] = kwargs.pop("cls", None) - - _request = build_cache_nodes_operations_get_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models.CacheNodePreviewResource, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _createor_update_initial( - self, - resource_group_name: str, - customer_resource_name: str, - resource: Union[_models.CacheNodePreviewResource, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(resource, (IOBase, bytes)): - _content = resource - else: - _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_cache_nodes_operations_createor_update_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_createor_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: _models.CacheNodePreviewResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CacheNodePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CacheNodePreviewResource. The - CacheNodePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_createor_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CacheNodePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CacheNodePreviewResource. The - CacheNodePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_createor_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CacheNodePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Required. - :type resource: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CacheNodePreviewResource. The - CacheNodePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_createor_update( - self, - resource_group_name: str, - customer_resource_name: str, - resource: Union[_models.CacheNodePreviewResource, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CacheNodePreviewResource]: - """Creates a cacheNodes with the specified create parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param resource: Resource create parameters. Is one of the following types: - CacheNodePreviewResource, JSON, IO[bytes] Required. - :type resource: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource or JSON or IO[bytes] - :return: An instance of LROPoller that returns CacheNodePreviewResource. The - CacheNodePreviewResource is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheNodePreviewResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._createor_update_initial( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - resource=resource, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.CacheNodePreviewResource, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CacheNodePreviewResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CacheNodePreviewResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, customer_resource_name: str, **kwargs: Any - ) -> None: - """Deletes an existing cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_cache_nodes_operations_delete_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: _models.ConnectedCachePatchResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """updates an existing Cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: ~azure.mgmt.connectedcache.models.ConnectedCachePatchResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """updates an existing Cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """updates an existing Cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Required. - :type properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - customer_resource_name: str, - properties: Union[_models.ConnectedCachePatchResource, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.CacheNodePreviewResource: - """updates an existing Cache Node. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param customer_resource_name: Name of the Customer resource. Required. - :type customer_resource_name: str - :param properties: The resource properties to be updated. Is one of the following types: - ConnectedCachePatchResource, JSON, IO[bytes] Required. - :type properties: ~azure.mgmt.connectedcache.models.ConnectedCachePatchResource or JSON or - IO[bytes] - :return: CacheNodePreviewResource. The CacheNodePreviewResource is compatible with - MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.CacheNodePreviewResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheNodePreviewResource] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(properties, (IOBase, bytes)): - _content = properties - else: - _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_cache_nodes_operations_update_request( - resource_group_name=resource_group_name, - customer_resource_name=customer_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models.CacheNodePreviewResource, response.json()) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) + accept = _headers.pop("Accept", "application/json") - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeMccIssueDetailsHistory" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), + } - return deserialized # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> Iterable["_models.CacheNodePreviewResource"]: - """Retrieves the properties of all ConnectedCache. + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of CacheNodePreviewResource - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - cls: ClsType[List[_models.CacheNodePreviewResource]] = kwargs.pop("cls", None) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: +def build_enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history_request( # pylint: disable=name-too-long + resource_group_name: str, + customer_resource_name: str, + cache_node_resource_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _request = build_cache_nodes_operations_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-30-preview")) + accept = _headers.pop("Accept", "application/json") - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeTlsCertificateHistory" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "customerResourceName": _SERIALIZER.url("customer_resource_name", customer_resource_name, "str"), + "cacheNodeResourceName": _SERIALIZER.url("cache_node_resource_name", cache_node_resource_name, "str"), + } - return _request + _url: str = _url.format(**path_format_arguments) # type: ignore - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - def get_next(next_link=None): - _request = prepare_request(next_link) + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return pipeline_response +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - return ItemPaged(get_next, extract_data) + Instead, you should access the following operations through + :class:`~azure.mgmt.connectedcache.ConnectedCacheMgmtClient`'s + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.CacheNodePreviewResource"]: - """Retrieves the properties of all ConnectedCaches. + def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: + """List the operations for the provider. - :return: An iterator like instance of CacheNodePreviewResource - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.connectedcache.models.CacheNodePreviewResource] + :return: An iterator like instance of Operation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedcache.models.Operation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.CacheNodePreviewResource]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -2674,8 +1044,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.CacheNodePrev def prepare_request(next_link=None): if not next_link: - _request = build_cache_nodes_operations_list_by_subscription_request( - subscription_id=self._config.subscription_id, + _request = build_operations_list_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -2711,7 +1080,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -2727,7 +1096,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2747,10 +1116,10 @@ class IspCustomersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, resource_group_name: str, customer_resource_name: str, **kwargs: Any) -> _models.IspCustomerResource: @@ -2805,7 +1174,7 @@ def get(self, resource_group_name: str, customer_resource_name: str, **kwargs: A except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2874,7 +1243,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3204,7 +1573,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3257,7 +1626,7 @@ def _delete_initial(self, resource_group_name: str, customer_resource_name: str, except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3397,7 +1766,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -3413,7 +1782,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3481,7 +1850,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -3497,7 +1866,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3517,10 +1886,10 @@ class IspCacheNodesOperationsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -3580,7 +1949,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3651,7 +2020,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4007,7 +2376,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4063,7 +2432,7 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4207,38 +2576,195 @@ def prepare_request(next_link=None): } _request.url = self._client.format_url(_request.url, **path_format_arguments) - return _request + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.IspCacheNodeResource], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_bgp_cidrs( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeBgpCidrDetails: + """This api gets ispCacheNode resource information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeBgpCidrDetails. The MccCacheNodeBgpCidrDetails is compatible with + MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeBgpCidrDetails + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeBgpCidrDetails] = kwargs.pop("cls", None) + + _request = build_isp_cache_nodes_operations_get_bgp_cidrs_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeBgpCidrDetails, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_cache_node_install_details( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeInstallDetails: + """This api gets secrets of the ispCacheNode resource install details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeInstallDetails. The MccCacheNodeInstallDetails is compatible with + MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeInstallDetails + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeInstallDetails] = kwargs.pop("cls", None) + + _request = build_isp_cache_nodes_operations_get_cache_node_install_details_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCacheNodeResource], deserialized["value"]) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeInstallDetails, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return ItemPaged(get_next, extract_data) + return deserialized # type: ignore @distributed_trace - def get_bgp_cidrs( + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + def get_cache_node_auto_update_history( self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any - ) -> _models.MccCacheNodeBgpCidrDetails: - """This api gets ispCacheNode resource information. + ) -> _models.MccCacheNodeAutoUpdateHistory: + """This api gets ispCacheNode resource auto update histrory information. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -4247,9 +2773,9 @@ def get_bgp_cidrs( :type customer_resource_name: str :param cache_node_resource_name: Name of the ConnectedCache resource. Required. :type cache_node_resource_name: str - :return: MccCacheNodeBgpCidrDetails. The MccCacheNodeBgpCidrDetails is compatible with + :return: MccCacheNodeAutoUpdateHistory. The MccCacheNodeAutoUpdateHistory is compatible with MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeBgpCidrDetails + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateHistory :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4263,9 +2789,9 @@ def get_bgp_cidrs( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MccCacheNodeBgpCidrDetails] = kwargs.pop("cls", None) + cls: ClsType[_models.MccCacheNodeAutoUpdateHistory] = kwargs.pop("cls", None) - _request = build_isp_cache_nodes_operations_get_bgp_cidrs_request( + _request = build_isp_cache_nodes_operations_get_cache_node_auto_update_history_request( resource_group_name=resource_group_name, customer_resource_name=customer_resource_name, cache_node_resource_name=cache_node_resource_name, @@ -4293,13 +2819,13 @@ def get_bgp_cidrs( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: deserialized = response.iter_bytes() else: - deserialized = _deserialize(_models.MccCacheNodeBgpCidrDetails, response.json()) + deserialized = _deserialize(_models.MccCacheNodeAutoUpdateHistory, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -4307,10 +2833,23 @@ def get_bgp_cidrs( return deserialized # type: ignore @distributed_trace - def get_cache_node_install_details( + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + def get_cache_node_mcc_issue_details_history( self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any - ) -> _models.MccCacheNodeInstallDetails: - """This api gets secrets of the ispCacheNode resource install details. + ) -> _models.MccCacheNodeIssueHistory: + """This api gets ispCacheNode resource issues details histrory information. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -4319,9 +2858,9 @@ def get_cache_node_install_details( :type customer_resource_name: str :param cache_node_resource_name: Name of the ConnectedCache resource. Required. :type cache_node_resource_name: str - :return: MccCacheNodeInstallDetails. The MccCacheNodeInstallDetails is compatible with + :return: MccCacheNodeIssueHistory. The MccCacheNodeIssueHistory is compatible with MutableMapping - :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeInstallDetails + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeIssueHistory :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4335,9 +2874,9 @@ def get_cache_node_install_details( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MccCacheNodeInstallDetails] = kwargs.pop("cls", None) + cls: ClsType[_models.MccCacheNodeIssueHistory] = kwargs.pop("cls", None) - _request = build_isp_cache_nodes_operations_get_cache_node_install_details_request( + _request = build_isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history_request( resource_group_name=resource_group_name, customer_resource_name=customer_resource_name, cache_node_resource_name=cache_node_resource_name, @@ -4365,13 +2904,13 @@ def get_cache_node_install_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: deserialized = response.iter_bytes() else: - deserialized = _deserialize(_models.MccCacheNodeInstallDetails, response.json()) + deserialized = _deserialize(_models.MccCacheNodeIssueHistory, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -4391,10 +2930,10 @@ class EnterpriseMccCustomersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -4452,7 +2991,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4521,7 +3060,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4860,7 +3399,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4913,7 +3452,7 @@ def _delete_initial(self, resource_group_name: str, customer_resource_name: str, except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -5054,7 +3593,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -5070,7 +3609,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -5140,7 +3679,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -5156,7 +3695,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -5176,10 +3715,10 @@ class EnterpriseMccCacheNodesOperationsOperations: # pylint: disable=name-too-l def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -5240,7 +3779,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -5311,7 +3850,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -5676,7 +4215,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -5732,7 +4271,7 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -5881,7 +4420,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCacheNodeResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCacheNodeResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -5897,7 +4436,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -5963,7 +4502,7 @@ def get_cache_node_install_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -5975,3 +4514,258 @@ def get_cache_node_install_details( return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + def get_cache_node_auto_update_history( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeAutoUpdateHistory: + """This api gets ispCacheNode resource auto update histrory information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeAutoUpdateHistory. The MccCacheNodeAutoUpdateHistory is compatible with + MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeAutoUpdateHistory + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeAutoUpdateHistory] = kwargs.pop("cls", None) + + _request = build_enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeAutoUpdateHistory, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + def get_cache_node_mcc_issue_details_history( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeIssueHistory: + """This api gets ispCacheNode resource issues details histrory information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeIssueHistory. The MccCacheNodeIssueHistory is compatible with + MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeIssueHistory + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeIssueHistory] = kwargs.pop("cls", None) + + _request = build_enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeIssueHistory, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2024-11-30-preview", + params_added_on={ + "2024-11-30-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "customer_resource_name", + "cache_node_resource_name", + "accept", + ] + }, + ) + def get_cache_node_tls_certificate_history( + self, resource_group_name: str, customer_resource_name: str, cache_node_resource_name: str, **kwargs: Any + ) -> _models.MccCacheNodeTlsCertificateHistory: + """This api gets ispCacheNode resource tls certificate histrory information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param customer_resource_name: Name of the Customer resource. Required. + :type customer_resource_name: str + :param cache_node_resource_name: Name of the ConnectedCache resource. Required. + :type cache_node_resource_name: str + :return: MccCacheNodeTlsCertificateHistory. The MccCacheNodeTlsCertificateHistory is compatible + with MutableMapping + :rtype: ~azure.mgmt.connectedcache.models.MccCacheNodeTlsCertificateHistory + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MccCacheNodeTlsCertificateHistory] = kwargs.pop("cls", None) + + _request = build_enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history_request( + resource_group_name=resource_group_name, + customer_resource_name=customer_resource_name, + cache_node_resource_name=cache_node_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MccCacheNodeTlsCertificateHistory, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_createor_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_createor_update_maximum_set_gen.py deleted file mode 100644 index ad8a69e5878f..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_createor_update_maximum_set_gen.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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-connectedcache -# USAGE - python cache_nodes_operations_createor_update_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ConnectedCacheMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.cache_nodes_operations.begin_createor_update( - resource_group_name="rgConnectedCache", - customer_resource_name="lwrsyhvfpcfrwrim", - resource={ - "location": "westus", - "properties": { - "error": {}, - "statusCode": "movtzupooyhdqk", - "statusDetails": "quuziibkwtgf", - "statusText": "bjnsrpzaofjntleoesjwammgbi", - }, - "tags": {"key8256": "oreqiywrjkmate"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_CreateorUpdate_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_delete_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_delete_maximum_set_gen.py deleted file mode 100644 index af378ba9a96c..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_delete_maximum_set_gen.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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-connectedcache -# USAGE - python cache_nodes_operations_delete_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ConnectedCacheMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.cache_nodes_operations.delete( - resource_group_name="rgConnectedCache", - customer_resource_name="otvtvhmovthjwzjzbsqkbnmpcmmeianpqxmmaspvdczmrenquxigrtuarmlcmvsnaclhcbw", - ) - - -# x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Delete_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_list_by_resource_group_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_list_by_resource_group_maximum_set_gen.py deleted file mode 100644 index d967f74578a6..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_list_by_resource_group_maximum_set_gen.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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-connectedcache -# USAGE - python cache_nodes_operations_list_by_resource_group_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ConnectedCacheMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.cache_nodes_operations.list_by_resource_group( - resource_group_name="rgConnectedCache", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListByResourceGroup_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_list_by_subscription_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_list_by_subscription_maximum_set_gen.py deleted file mode 100644 index 684f0a803b31..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_list_by_subscription_maximum_set_gen.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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-connectedcache -# USAGE - python cache_nodes_operations_list_by_subscription_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ConnectedCacheMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.cache_nodes_operations.list_by_subscription() - for item in response: - print(item) - - -# x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListBySubscription_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_create_or_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_create_or_update_maximum_set_gen.py deleted file mode 100644 index 17194e22d465..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_create_or_update_maximum_set_gen.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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-connectedcache -# USAGE - python enterprise_customer_operations_create_or_update_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ConnectedCacheMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.enterprise_customer_operations.begin_create_or_update( - resource_group_name="rgConnectedCache", - customer_resource_name="l", - resource={ - "location": "zdzhhkjyogrqxwihkifnmeyhwpujbr", - "properties": { - "error": {}, - "statusCode": "oldkroffqtkryqffpsi", - "statusDetails": "lhwvcz", - "statusText": "bs", - }, - "tags": {"key4215": "zjbszvlzf"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_CreateOrUpdate_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_delete_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_delete_maximum_set_gen.py deleted file mode 100644 index 991c0586a925..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_delete_maximum_set_gen.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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-connectedcache -# USAGE - python enterprise_customer_operations_delete_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ConnectedCacheMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.enterprise_customer_operations.delete( - resource_group_name="rgConnectedCache", - customer_resource_name="jeubxmhiaihcusgnahblvvckbdcetacvqgwbohlrqucodtlwuyefpejskvamgrdnwgucziodcfpjhqy", - ) - - -# x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Delete_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_list_by_resource_group_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_list_by_resource_group_maximum_set_gen.py deleted file mode 100644 index bf42aa1ac59c..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_list_by_resource_group_maximum_set_gen.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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-connectedcache -# USAGE - python enterprise_customer_operations_list_by_resource_group_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ConnectedCacheMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.enterprise_customer_operations.list_by_resource_group( - resource_group_name="rgConnectedCache", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListByResourceGroup_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_list_by_subscription_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_list_by_subscription_maximum_set_gen.py deleted file mode 100644 index 387f04941852..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_list_by_subscription_maximum_set_gen.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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-connectedcache -# USAGE - python enterprise_customer_operations_list_by_subscription_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ConnectedCacheMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.enterprise_customer_operations.list_by_subscription() - for item in response: - print(item) - - -# x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListBySubscription_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_create_or_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_create_or_update_maximum_set_gen.py index 394dc09d0306..a39bc5c6f53e 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_create_or_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_create_or_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -53,7 +54,6 @@ def main(): "optionalProperty3": "fpnycrbagptsujiotnjfuhlm", "optionalProperty4": "gesqugrxvhxlxxyvatgrautxwlmxsf", "optionalProperty5": "zknjgzpaqtvdqjydd", - "proxyUrl": "ihkzxlzvpcywtzrogupqozkdud", "proxyUrlConfiguration": {"proxyUrl": "hplstyg"}, }, "cacheNode": { @@ -82,6 +82,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_delete_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_delete_maximum_set_gen.py index bb6e0fb686f2..2454d2c25d74 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_delete_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_delete_maximum_set_gen.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history_maximum_set_gen.py similarity index 73% rename from sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_update_maximum_set_gen.py rename to sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history_maximum_set_gen.py index a394f6a6cb4d..e2e5ceaa1d8f 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -15,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-connectedcache # USAGE - python cache_nodes_operations_update_maximum_set_gen.py + python enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history_maximum_set_gen.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -30,14 +31,14 @@ def main(): subscription_id="SUBSCRIPTION_ID", ) - response = client.cache_nodes_operations.update( + response = client.enterprise_mcc_cache_nodes_operations.get_cache_node_auto_update_history( resource_group_name="rgConnectedCache", - customer_resource_name="wlrwpdbcv", - properties={"tags": {"key5032": "esiuyjbpcwkpqriqiqztxuocv"}}, + customer_resource_name="MccRPTest1", + cache_node_resource_name="MCCCachenode1", ) print(response) -# x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Update_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py index b04514f97249..14e1e4b2f34a 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history_maximum_set_gen.py new file mode 100644 index 000000000000..573f080ee833 --- /dev/null +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history_maximum_set_gen.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.connectedcache import ConnectedCacheMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-connectedcache +# USAGE + python enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history_maximum_set_gen.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ConnectedCacheMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.enterprise_mcc_cache_nodes_operations.get_cache_node_mcc_issue_details_history( + resource_group_name="rgConnectedCache", + customer_resource_name="MccRPTest1", + cache_node_resource_name="MCCCachenode1", + ) + print(response) + + +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history_maximum_set_gen.py similarity index 73% rename from sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_update_maximum_set_gen.py rename to sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history_maximum_set_gen.py index 7ecb4e9e814d..b1b1d5ea3a5f 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -15,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-connectedcache # USAGE - python enterprise_customer_operations_update_maximum_set_gen.py + python enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history_maximum_set_gen.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -30,14 +31,14 @@ def main(): subscription_id="SUBSCRIPTION_ID", ) - response = client.enterprise_customer_operations.update( + response = client.enterprise_mcc_cache_nodes_operations.get_cache_node_tls_certificate_history( resource_group_name="rgConnectedCache", - customer_resource_name="MCCTPTest2", - properties={"tags": {"key1653": "nzjczrhclhkndesgy"}}, + customer_resource_name="MccRPTest1", + cache_node_resource_name="MCCCachenode1", ) print(response) -# x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Update_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeTlsCertificateHistory_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_maximum_set_gen.py index d3ac6034492d..ed58b95629d5 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_maximum_set_gen.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_maximum_set_gen.py index 09ed1d907f3d..d6b732cf8976 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_update_maximum_set_gen.py index 2d9da2da2c5a..9ec8c88d9790 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_update_maximum_set_gen.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_create_or_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_create_or_update_maximum_set_gen.py index 7d7310c8fbec..df54d1135653 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_create_or_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_create_or_update_maximum_set_gen.py @@ -74,6 +74,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_delete_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_delete_maximum_set_gen.py index 6594e1100dd5..49ecb223ad8e 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_delete_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_delete_maximum_set_gen.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_get_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_get_maximum_set_gen.py index 6f8ea37e637f..c12c1190c21b 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_get_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_get_maximum_set_gen.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_list_by_resource_group_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_list_by_resource_group_maximum_set_gen.py index 4a65329eb4b1..593917b8ce4f 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_list_by_resource_group_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_list_by_resource_group_maximum_set_gen.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_list_by_subscription_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_list_by_subscription_maximum_set_gen.py index 38dd3071d93f..9eb0748830e6 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_list_by_subscription_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_list_by_subscription_maximum_set_gen.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_update_maximum_set_gen.py index 22cd230361d2..4ee5e835ca41 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_customers_update_maximum_set_gen.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_create_or_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_create_or_update_maximum_set_gen.py index 3b2e8a4ae419..de35f53810e1 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_create_or_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_create_or_update_maximum_set_gen.py @@ -48,7 +48,6 @@ def main(): "optionalProperty3": "bxkoxq", "optionalProperty4": "pqlkcekupusoc", "optionalProperty5": "nyvvmrjigqdufzjdvazdca", - "proxyUrl": "qhux", "proxyUrlConfiguration": {"proxyUrl": "hplstyg"}, }, "cacheNode": { @@ -77,6 +76,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_delete_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_delete_maximum_set_gen.py index 0daa25a795f7..d6822d634ab7 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_delete_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_delete_maximum_set_gen.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_bgp_cidrs_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_bgp_cidrs_maximum_set_gen.py index 0af1ed06eba1..37587b0066d8 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_bgp_cidrs_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_bgp_cidrs_maximum_set_gen.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_get_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_auto_update_history_maximum_set_gen.py similarity index 77% rename from sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_get_maximum_set_gen.py rename to sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_auto_update_history_maximum_set_gen.py index 46332f007190..184e98a71182 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/cache_nodes_operations_get_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_auto_update_history_maximum_set_gen.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-connectedcache # USAGE - python cache_nodes_operations_get_maximum_set_gen.py + python isp_cache_nodes_operations_get_cache_node_auto_update_history_maximum_set_gen.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -30,13 +30,14 @@ def main(): subscription_id="SUBSCRIPTION_ID", ) - response = client.cache_nodes_operations.get( + response = client.isp_cache_nodes_operations.get_cache_node_auto_update_history( resource_group_name="rgConnectedCache", - customer_resource_name="nqoxkgorhuzbhjwcegymzqbeydzjupemekt", + customer_resource_name="MccRPTest1", + cache_node_resource_name="MCCCachenode1", ) print(response) -# x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Get_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py index 2febbb1f03d8..67a3483be6ef 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_get_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history_maximum_set_gen.py similarity index 76% rename from sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_get_maximum_set_gen.py rename to sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history_maximum_set_gen.py index 457e23e0e97a..e7517d93ec3e 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_customer_operations_get_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history_maximum_set_gen.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-connectedcache # USAGE - python enterprise_customer_operations_get_maximum_set_gen.py + python isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history_maximum_set_gen.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -30,13 +30,14 @@ def main(): subscription_id="SUBSCRIPTION_ID", ) - response = client.enterprise_customer_operations.get( + response = client.isp_cache_nodes_operations.get_cache_node_mcc_issue_details_history( resource_group_name="rgConnectedCache", - customer_resource_name="MCCTPTest2", + customer_resource_name="MccRPTest1", + cache_node_resource_name="MCCCachenode1", ) print(response) -# x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Get_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_maximum_set_gen.py index 609344f3d234..b90d51bae540 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_get_maximum_set_gen.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_list_by_isp_customer_resource_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_list_by_isp_customer_resource_maximum_set_gen.py index c40449e3520d..29cc10dce920 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_list_by_isp_customer_resource_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_list_by_isp_customer_resource_maximum_set_gen.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_update_maximum_set_gen.py index f500bb35ee3d..e76d8442ff27 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_cache_nodes_operations_update_maximum_set_gen.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_create_or_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_create_or_update_maximum_set_gen.py index dabd00da496a..09a90edaf509 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_create_or_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_create_or_update_maximum_set_gen.py @@ -74,6 +74,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_delete_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_delete_maximum_set_gen.py index 7e4eeee02508..1152c8491bc6 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_delete_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_delete_maximum_set_gen.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2023-05-01-preview/IspCustomers_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCustomers_Delete_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_get_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_get_maximum_set_gen.py index e0ba1a6bab60..bb1f4bf25fc1 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_get_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_get_maximum_set_gen.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/IspCustomers_Get_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCustomers_Get_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_list_by_resource_group_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_list_by_resource_group_maximum_set_gen.py index 8fc639e62160..9d2c26c7ec26 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_list_by_resource_group_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_list_by_resource_group_maximum_set_gen.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2023-05-01-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_list_by_subscription_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_list_by_subscription_maximum_set_gen.py index 0eb47cd8a845..72eb5afc174e 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_list_by_subscription_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_list_by_subscription_maximum_set_gen.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2023-05-01-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_update_maximum_set_gen.py index ba5cda75c10c..72f4af0e6199 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/isp_customers_update_maximum_set_gen.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2023-05-01-preview/IspCustomers_Update_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/IspCustomers_Update_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/operations_list_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/operations_list_maximum_set_gen.py index 3f4fa2c8f486..83b663143f54 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/operations_list_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/operations_list_maximum_set_gen.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2023-05-01-preview/Operations_List_MaximumSet_Gen.json +# x-ms-original-file: 2024-11-30-preview/Operations_List_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_cache_nodes_operations_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_cache_nodes_operations_operations.py deleted file mode 100644 index 1ec5b5b06089..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_cache_nodes_operations_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestConnectedCacheMgmtCacheNodesOperationsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ConnectedCacheMgmtClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cache_nodes_operations_get(self, resource_group): - response = self.client.cache_nodes_operations.get( - resource_group_name=resource_group.name, - customer_resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cache_nodes_operations_begin_createor_update(self, resource_group): - response = self.client.cache_nodes_operations.begin_createor_update( - resource_group_name=resource_group.name, - customer_resource_name="str", - resource={ - "location": "str", - "id": "str", - "name": "str", - "properties": { - "error": { - "additionalInfo": [{"info": {}, "type": "str"}], - "code": "str", - "details": [...], - "message": "str", - "target": "str", - }, - "provisioningState": "str", - "status": "str", - "statusCode": "str", - "statusDetails": "str", - "statusText": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cache_nodes_operations_delete(self, resource_group): - response = self.client.cache_nodes_operations.delete( - resource_group_name=resource_group.name, - customer_resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cache_nodes_operations_update(self, resource_group): - response = self.client.cache_nodes_operations.update( - resource_group_name=resource_group.name, - customer_resource_name="str", - properties={"tags": {"str": "str"}}, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cache_nodes_operations_list_by_resource_group(self, resource_group): - response = self.client.cache_nodes_operations.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cache_nodes_operations_list_by_subscription(self, resource_group): - response = self.client.cache_nodes_operations.list_by_subscription() - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_cache_nodes_operations_operations_async.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_cache_nodes_operations_operations_async.py deleted file mode 100644 index 4a97d82c2ed1..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_cache_nodes_operations_operations_async.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.connectedcache.aio import ConnectedCacheMgmtClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestConnectedCacheMgmtCacheNodesOperationsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ConnectedCacheMgmtClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cache_nodes_operations_get(self, resource_group): - response = await self.client.cache_nodes_operations.get( - resource_group_name=resource_group.name, - customer_resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cache_nodes_operations_begin_createor_update(self, resource_group): - response = await ( - await self.client.cache_nodes_operations.begin_createor_update( - resource_group_name=resource_group.name, - customer_resource_name="str", - resource={ - "location": "str", - "id": "str", - "name": "str", - "properties": { - "error": { - "additionalInfo": [{"info": {}, "type": "str"}], - "code": "str", - "details": [...], - "message": "str", - "target": "str", - }, - "provisioningState": "str", - "status": "str", - "statusCode": "str", - "statusDetails": "str", - "statusText": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cache_nodes_operations_delete(self, resource_group): - response = await self.client.cache_nodes_operations.delete( - resource_group_name=resource_group.name, - customer_resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cache_nodes_operations_update(self, resource_group): - response = await self.client.cache_nodes_operations.update( - resource_group_name=resource_group.name, - customer_resource_name="str", - properties={"tags": {"str": "str"}}, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cache_nodes_operations_list_by_resource_group(self, resource_group): - response = self.client.cache_nodes_operations.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cache_nodes_operations_list_by_subscription(self, resource_group): - response = self.client.cache_nodes_operations.list_by_subscription() - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_customer_operations_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_customer_operations_operations.py deleted file mode 100644 index 49b9124adc67..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_customer_operations_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.connectedcache import ConnectedCacheMgmtClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestConnectedCacheMgmtEnterpriseCustomerOperationsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ConnectedCacheMgmtClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_enterprise_customer_operations_get(self, resource_group): - response = self.client.enterprise_customer_operations.get( - resource_group_name=resource_group.name, - customer_resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_enterprise_customer_operations_begin_create_or_update(self, resource_group): - response = self.client.enterprise_customer_operations.begin_create_or_update( - resource_group_name=resource_group.name, - customer_resource_name="str", - resource={ - "location": "str", - "id": "str", - "name": "str", - "properties": { - "error": { - "additionalInfo": [{"info": {}, "type": "str"}], - "code": "str", - "details": [...], - "message": "str", - "target": "str", - }, - "provisioningState": "str", - "status": "str", - "statusCode": "str", - "statusDetails": "str", - "statusText": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_enterprise_customer_operations_update(self, resource_group): - response = self.client.enterprise_customer_operations.update( - resource_group_name=resource_group.name, - customer_resource_name="str", - properties={"tags": {"str": "str"}}, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_enterprise_customer_operations_delete(self, resource_group): - response = self.client.enterprise_customer_operations.delete( - resource_group_name=resource_group.name, - customer_resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_enterprise_customer_operations_list_by_resource_group(self, resource_group): - response = self.client.enterprise_customer_operations.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_enterprise_customer_operations_list_by_subscription(self, resource_group): - response = self.client.enterprise_customer_operations.list_by_subscription() - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_customer_operations_operations_async.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_customer_operations_operations_async.py deleted file mode 100644 index a3b04affda09..000000000000 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_customer_operations_operations_async.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.connectedcache.aio import ConnectedCacheMgmtClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestConnectedCacheMgmtEnterpriseCustomerOperationsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ConnectedCacheMgmtClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_enterprise_customer_operations_get(self, resource_group): - response = await self.client.enterprise_customer_operations.get( - resource_group_name=resource_group.name, - customer_resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_enterprise_customer_operations_begin_create_or_update(self, resource_group): - response = await ( - await self.client.enterprise_customer_operations.begin_create_or_update( - resource_group_name=resource_group.name, - customer_resource_name="str", - resource={ - "location": "str", - "id": "str", - "name": "str", - "properties": { - "error": { - "additionalInfo": [{"info": {}, "type": "str"}], - "code": "str", - "details": [...], - "message": "str", - "target": "str", - }, - "provisioningState": "str", - "status": "str", - "statusCode": "str", - "statusDetails": "str", - "statusText": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_enterprise_customer_operations_update(self, resource_group): - response = await self.client.enterprise_customer_operations.update( - resource_group_name=resource_group.name, - customer_resource_name="str", - properties={"tags": {"str": "str"}}, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_enterprise_customer_operations_delete(self, resource_group): - response = await self.client.enterprise_customer_operations.delete( - resource_group_name=resource_group.name, - customer_resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_enterprise_customer_operations_list_by_resource_group(self, resource_group): - response = self.client.enterprise_customer_operations.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_enterprise_customer_operations_list_by_subscription(self, resource_group): - response = self.client.enterprise_customer_operations.list_by_subscription() - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_cache_nodes_operations_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_cache_nodes_operations_operations.py index 464cf4083c8a..037cd7f7c059 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_cache_nodes_operations_operations.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_cache_nodes_operations_operations.py @@ -59,11 +59,42 @@ def test_enterprise_mcc_cache_nodes_operations_begin_create_or_update(self, reso "cacheNodeState": 0, "cacheNodeStateDetailedText": "str", "cacheNodeStateShortText": "str", + "creationMethod": 0, + "currentTlsCertificate": { + "actionRequired": "str", + "certificateFileName": "str", + "expiryDate": "2020-02-20 00:00:00", + "notBeforeDate": "2020-02-20 00:00:00", + "subject": "str", + "subjectAltName": "str", + "thumbprint": "str", + }, "driveConfiguration": [ {"cacheNumber": 0, "nginxMapping": "str", "physicalPath": "str", "sizeInGb": 0} ], "isProvisioned": bool, "isProxyRequired": "str", + "issuesCount": 0, + "issuesList": ["str"], + "lastAutoUpdateInfo": { + "autoUpdateLastAppliedStatus": 0, + "autoUpdateLastAppliedStatusDetailedText": "str", + "autoUpdateLastAppliedStatusText": "str", + "autoUpdateRingType": 0, + "createdDateTimeUtc": "2020-02-20 00:00:00", + "imageUriBeforeUpdate": "str", + "imageUriTargeted": "str", + "imageUriTerminal": "str", + "movedToTerminalStateDateTime": "2020-02-20 00:00:00", + "planChangeLogText": "str", + "planId": 0, + "ruleRequestedDay": 0, + "ruleRequestedHour": "str", + "ruleRequestedMinute": "str", + "ruleRequestedWeek": 0, + "timeToGoLiveDateTime": "str", + "updatedRegistryDateTimeUtc": "2020-02-20 00:00:00", + }, "optionalProperty1": "str", "optionalProperty2": "str", "optionalProperty3": "str", @@ -71,9 +102,8 @@ def test_enterprise_mcc_cache_nodes_operations_begin_create_or_update(self, reso "optionalProperty5": "str", "osType": "str", "productVersion": "str", - "proxyUrl": "str", "proxyUrlConfiguration": {"proxyUrl": "str"}, - "updateCycleType": "str", + "tlsStatus": "str", "updateInfoDetails": "str", "updateRequestedDateTime": "2020-02-20 00:00:00", }, @@ -207,3 +237,39 @@ def test_enterprise_mcc_cache_nodes_operations_get_cache_node_install_details(se # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history(self, resource_group): + response = self.client.enterprise_mcc_cache_nodes_operations.get_cache_node_auto_update_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history(self, resource_group): + response = self.client.enterprise_mcc_cache_nodes_operations.get_cache_node_mcc_issue_details_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history(self, resource_group): + response = self.client.enterprise_mcc_cache_nodes_operations.get_cache_node_tls_certificate_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_cache_nodes_operations_operations_async.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_cache_nodes_operations_operations_async.py index 4539c55ff563..9c9e03acaf5b 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_cache_nodes_operations_operations_async.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_cache_nodes_operations_operations_async.py @@ -61,11 +61,42 @@ async def test_enterprise_mcc_cache_nodes_operations_begin_create_or_update(self "cacheNodeState": 0, "cacheNodeStateDetailedText": "str", "cacheNodeStateShortText": "str", + "creationMethod": 0, + "currentTlsCertificate": { + "actionRequired": "str", + "certificateFileName": "str", + "expiryDate": "2020-02-20 00:00:00", + "notBeforeDate": "2020-02-20 00:00:00", + "subject": "str", + "subjectAltName": "str", + "thumbprint": "str", + }, "driveConfiguration": [ {"cacheNumber": 0, "nginxMapping": "str", "physicalPath": "str", "sizeInGb": 0} ], "isProvisioned": bool, "isProxyRequired": "str", + "issuesCount": 0, + "issuesList": ["str"], + "lastAutoUpdateInfo": { + "autoUpdateLastAppliedStatus": 0, + "autoUpdateLastAppliedStatusDetailedText": "str", + "autoUpdateLastAppliedStatusText": "str", + "autoUpdateRingType": 0, + "createdDateTimeUtc": "2020-02-20 00:00:00", + "imageUriBeforeUpdate": "str", + "imageUriTargeted": "str", + "imageUriTerminal": "str", + "movedToTerminalStateDateTime": "2020-02-20 00:00:00", + "planChangeLogText": "str", + "planId": 0, + "ruleRequestedDay": 0, + "ruleRequestedHour": "str", + "ruleRequestedMinute": "str", + "ruleRequestedWeek": 0, + "timeToGoLiveDateTime": "str", + "updatedRegistryDateTimeUtc": "2020-02-20 00:00:00", + }, "optionalProperty1": "str", "optionalProperty2": "str", "optionalProperty3": "str", @@ -73,9 +104,8 @@ async def test_enterprise_mcc_cache_nodes_operations_begin_create_or_update(self "optionalProperty5": "str", "osType": "str", "productVersion": "str", - "proxyUrl": "str", "proxyUrlConfiguration": {"proxyUrl": "str"}, - "updateCycleType": "str", + "tlsStatus": "str", "updateInfoDetails": "str", "updateRequestedDateTime": "2020-02-20 00:00:00", }, @@ -212,3 +242,39 @@ async def test_enterprise_mcc_cache_nodes_operations_get_cache_node_install_deta # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_enterprise_mcc_cache_nodes_operations_get_cache_node_auto_update_history(self, resource_group): + response = await self.client.enterprise_mcc_cache_nodes_operations.get_cache_node_auto_update_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_enterprise_mcc_cache_nodes_operations_get_cache_node_mcc_issue_details_history(self, resource_group): + response = await self.client.enterprise_mcc_cache_nodes_operations.get_cache_node_mcc_issue_details_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_enterprise_mcc_cache_nodes_operations_get_cache_node_tls_certificate_history(self, resource_group): + response = await self.client.enterprise_mcc_cache_nodes_operations.get_cache_node_tls_certificate_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_customers_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_customers_operations.py index 6b809cf9f2cd..a37b2ad55c8a 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_customers_operations.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_customers_operations.py @@ -66,7 +66,6 @@ def test_enterprise_mcc_customers_begin_create_or_update(self, resource_group): "optionalProperty4": "str", "optionalProperty5": "str", "peeringDbLastUpdateDate": "2020-02-20 00:00:00", - "peeringDbLastUpdateTime": "2020-02-20 00:00:00", "signupPhaseStatusCode": 0, "signupPhaseStatusText": "str", "signupStatus": bool, diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_customers_operations_async.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_customers_operations_async.py index 5b6929a4461d..d179eeaa6602 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_customers_operations_async.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_enterprise_mcc_customers_operations_async.py @@ -68,7 +68,6 @@ async def test_enterprise_mcc_customers_begin_create_or_update(self, resource_gr "optionalProperty4": "str", "optionalProperty5": "str", "peeringDbLastUpdateDate": "2020-02-20 00:00:00", - "peeringDbLastUpdateTime": "2020-02-20 00:00:00", "signupPhaseStatusCode": 0, "signupPhaseStatusText": "str", "signupStatus": bool, diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_cache_nodes_operations_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_cache_nodes_operations_operations.py index a3a862cf67de..1a4599621200 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_cache_nodes_operations_operations.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_cache_nodes_operations_operations.py @@ -59,11 +59,42 @@ def test_isp_cache_nodes_operations_begin_create_or_update(self, resource_group) "cacheNodeState": 0, "cacheNodeStateDetailedText": "str", "cacheNodeStateShortText": "str", + "creationMethod": 0, + "currentTlsCertificate": { + "actionRequired": "str", + "certificateFileName": "str", + "expiryDate": "2020-02-20 00:00:00", + "notBeforeDate": "2020-02-20 00:00:00", + "subject": "str", + "subjectAltName": "str", + "thumbprint": "str", + }, "driveConfiguration": [ {"cacheNumber": 0, "nginxMapping": "str", "physicalPath": "str", "sizeInGb": 0} ], "isProvisioned": bool, "isProxyRequired": "str", + "issuesCount": 0, + "issuesList": ["str"], + "lastAutoUpdateInfo": { + "autoUpdateLastAppliedStatus": 0, + "autoUpdateLastAppliedStatusDetailedText": "str", + "autoUpdateLastAppliedStatusText": "str", + "autoUpdateRingType": 0, + "createdDateTimeUtc": "2020-02-20 00:00:00", + "imageUriBeforeUpdate": "str", + "imageUriTargeted": "str", + "imageUriTerminal": "str", + "movedToTerminalStateDateTime": "2020-02-20 00:00:00", + "planChangeLogText": "str", + "planId": 0, + "ruleRequestedDay": 0, + "ruleRequestedHour": "str", + "ruleRequestedMinute": "str", + "ruleRequestedWeek": 0, + "timeToGoLiveDateTime": "str", + "updatedRegistryDateTimeUtc": "2020-02-20 00:00:00", + }, "optionalProperty1": "str", "optionalProperty2": "str", "optionalProperty3": "str", @@ -71,9 +102,8 @@ def test_isp_cache_nodes_operations_begin_create_or_update(self, resource_group) "optionalProperty5": "str", "osType": "str", "productVersion": "str", - "proxyUrl": "str", "proxyUrlConfiguration": {"proxyUrl": "str"}, - "updateCycleType": "str", + "tlsStatus": "str", "updateInfoDetails": "str", "updateRequestedDateTime": "2020-02-20 00:00:00", }, @@ -219,3 +249,27 @@ def test_isp_cache_nodes_operations_get_cache_node_install_details(self, resourc # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_isp_cache_nodes_operations_get_cache_node_auto_update_history(self, resource_group): + response = self.client.isp_cache_nodes_operations.get_cache_node_auto_update_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history(self, resource_group): + response = self.client.isp_cache_nodes_operations.get_cache_node_mcc_issue_details_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_cache_nodes_operations_operations_async.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_cache_nodes_operations_operations_async.py index ca89df5abc87..32162cb04965 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_cache_nodes_operations_operations_async.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_cache_nodes_operations_operations_async.py @@ -61,11 +61,42 @@ async def test_isp_cache_nodes_operations_begin_create_or_update(self, resource_ "cacheNodeState": 0, "cacheNodeStateDetailedText": "str", "cacheNodeStateShortText": "str", + "creationMethod": 0, + "currentTlsCertificate": { + "actionRequired": "str", + "certificateFileName": "str", + "expiryDate": "2020-02-20 00:00:00", + "notBeforeDate": "2020-02-20 00:00:00", + "subject": "str", + "subjectAltName": "str", + "thumbprint": "str", + }, "driveConfiguration": [ {"cacheNumber": 0, "nginxMapping": "str", "physicalPath": "str", "sizeInGb": 0} ], "isProvisioned": bool, "isProxyRequired": "str", + "issuesCount": 0, + "issuesList": ["str"], + "lastAutoUpdateInfo": { + "autoUpdateLastAppliedStatus": 0, + "autoUpdateLastAppliedStatusDetailedText": "str", + "autoUpdateLastAppliedStatusText": "str", + "autoUpdateRingType": 0, + "createdDateTimeUtc": "2020-02-20 00:00:00", + "imageUriBeforeUpdate": "str", + "imageUriTargeted": "str", + "imageUriTerminal": "str", + "movedToTerminalStateDateTime": "2020-02-20 00:00:00", + "planChangeLogText": "str", + "planId": 0, + "ruleRequestedDay": 0, + "ruleRequestedHour": "str", + "ruleRequestedMinute": "str", + "ruleRequestedWeek": 0, + "timeToGoLiveDateTime": "str", + "updatedRegistryDateTimeUtc": "2020-02-20 00:00:00", + }, "optionalProperty1": "str", "optionalProperty2": "str", "optionalProperty3": "str", @@ -73,9 +104,8 @@ async def test_isp_cache_nodes_operations_begin_create_or_update(self, resource_ "optionalProperty5": "str", "osType": "str", "productVersion": "str", - "proxyUrl": "str", "proxyUrlConfiguration": {"proxyUrl": "str"}, - "updateCycleType": "str", + "tlsStatus": "str", "updateInfoDetails": "str", "updateRequestedDateTime": "2020-02-20 00:00:00", }, @@ -224,3 +254,27 @@ async def test_isp_cache_nodes_operations_get_cache_node_install_details(self, r # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_isp_cache_nodes_operations_get_cache_node_auto_update_history(self, resource_group): + response = await self.client.isp_cache_nodes_operations.get_cache_node_auto_update_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_isp_cache_nodes_operations_get_cache_node_mcc_issue_details_history(self, resource_group): + response = await self.client.isp_cache_nodes_operations.get_cache_node_mcc_issue_details_history( + resource_group_name=resource_group.name, + customer_resource_name="str", + cache_node_resource_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_customers_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_customers_operations.py index e1c8bc1ee5c5..0400c18dfd33 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_customers_operations.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_customers_operations.py @@ -66,7 +66,6 @@ def test_isp_customers_begin_create_or_update(self, resource_group): "optionalProperty4": "str", "optionalProperty5": "str", "peeringDbLastUpdateDate": "2020-02-20 00:00:00", - "peeringDbLastUpdateTime": "2020-02-20 00:00:00", "signupPhaseStatusCode": 0, "signupPhaseStatusText": "str", "signupStatus": bool, diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_customers_operations_async.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_customers_operations_async.py index 0a41224f5e47..fc2d6530532b 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_customers_operations_async.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_tests/test_connected_cache_mgmt_isp_customers_operations_async.py @@ -68,7 +68,6 @@ async def test_isp_customers_begin_create_or_update(self, resource_group): "optionalProperty4": "str", "optionalProperty5": "str", "peeringDbLastUpdateDate": "2020-02-20 00:00:00", - "peeringDbLastUpdateTime": "2020-02-20 00:00:00", "signupPhaseStatusCode": 0, "signupPhaseStatusText": "str", "signupStatus": bool, diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/setup.py b/sdk/connectedcache/azure-mgmt-connectedcache/setup.py index decc6c477e86..f399099bcc1c 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/setup.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/setup.py @@ -22,11 +22,9 @@ # Version extraction inspired from 'requests' with open( - ( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py") - ), + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py"), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -55,7 +53,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -79,7 +76,7 @@ "isodate>=0.6.1", "typing-extensions>=4.6.0", "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", + "azure-mgmt-core>=1.5.0", ], - python_requires=">=3.8", + python_requires=">=3.9", ) diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml b/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml index 62929b944503..f0d880aeeed5 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml +++ b/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/connectedcache/ConnectedCache.Management -commit: 14f4f6b25fe74f90f4ee74fdac5cd7e05d419245 +commit: bd63bf3710616fd0dc1d883b0760899ca7f9babd repo: Azure/azure-rest-api-specs additionalDirectories: