Skip to content

Commit 90ffa19

Browse files
author
SDKAuto
committed
CodeGen from PR 32748 in Azure/azure-rest-api-specs
Merge 7601cf884a79bc885bac48cfcb4e58f657d72775 into 1eaa485159f0af692ad541bd8553ccfb9f51410d
1 parent 32a2eac commit 90ffa19

File tree

110 files changed

+4354
-2265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+4354
-2265
lines changed

sdk/elasticsan/azure-mgmt-elasticsan/CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Release History
22

3+
## 1.2.0b2 (2025-04-18)
4+
5+
### Features Added
6+
7+
- Client `ElasticSanMgmtClient` added method `begin_restore_volume`
8+
- Model `ElasticSanMgmtClient` added property `url`
9+
- Enum `ProvisioningStates` added member `DELETED`
10+
- Enum `ProvisioningStates` added member `RESTORING`
11+
- Enum `ProvisioningStates` added member `SOFT_DELETING`
12+
- Model `VolumeGroupProperties` added property `delete_retention_policy`
13+
- Model `VolumeGroupUpdateProperties` added property `delete_retention_policy`
14+
- Added model `DeleteRetentionPolicy`
15+
- Added enum `DeleteType`
16+
- Added model `DiskSnapshotList`
17+
- Added enum `PolicyState`
18+
- Added model `PreValidationResponse`
19+
- Added model `VolumeNameList`
20+
- Added enum `XMsAccessSoftDeletedResources`
21+
- Model `VolumesOperations` added method `begin_pre_backup`
22+
- Model `VolumesOperations` added method `begin_pre_restore`
23+
- Added model `ElasticSanMgmtClientOperationsMixin`
24+
- Method `VolumesOperations.begin_pre_backup` has a new overload `def begin_pre_backup(self: None, resource_group_name: str, elastic_san_name: str, volume_group_name: str, parameters: VolumeNameList, content_type: str)`
25+
- Method `VolumesOperations.begin_pre_backup` has a new overload `def begin_pre_backup(self: None, resource_group_name: str, elastic_san_name: str, volume_group_name: str, parameters: IO[bytes], content_type: str)`
26+
- Method `VolumesOperations.begin_pre_restore` has a new overload `def begin_pre_restore(self: None, resource_group_name: str, elastic_san_name: str, volume_group_name: str, parameters: DiskSnapshotList, content_type: str)`
27+
- Method `VolumesOperations.begin_pre_restore` has a new overload `def begin_pre_restore(self: None, resource_group_name: str, elastic_san_name: str, volume_group_name: str, parameters: IO[bytes], content_type: str)`
28+
329
## 1.2.0b1 (2024-10-20)
430

531
### Features Added

sdk/elasticsan/azure-mgmt-elasticsan/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Elasticsan Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "fda3d5e4ae4c69aa72ddfdf5ca1b6d5795a03e71",
2+
"commit": "6fb7202e821ffc71905c4637eb04f8a39be8cee3",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.19.0",
6+
"@autorest/python@6.33.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/elasticsan/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/elasticsan/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.33.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/elasticsan/resource-manager/readme.md"
1111
}

sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._elastic_san_mgmt_client import ElasticSanMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._elastic_san_mgmt_client import ElasticSanMgmtClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"ElasticSanMgmtClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/_configuration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class ElasticSanMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class ElasticSanMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for ElasticSanMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class ElasticSanMgmtClientConfiguration: # pylint: disable=too-many-instance-at
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-06-01-preview". Note that overriding
30+
:keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding
3231
this default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-06-01-preview")
36+
api_version: str = kwargs.pop("api_version", "2024-07-01-preview")
3837

3938
if credential is None:
4039
raise ValueError("Parameter 'credential' must not be None.")

sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/_elastic_san_mgmt_client.py

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import ElasticSanMgmtClientConfiguration
2022
from ._serialization import Deserializer, Serializer
2123
from .operations import (
24+
ElasticSanMgmtClientOperationsMixin,
2225
ElasticSansOperations,
2326
Operations,
2427
PrivateEndpointConnectionsOperations,
@@ -30,54 +33,55 @@
3033
)
3134

3235
if TYPE_CHECKING:
33-
# pylint: disable=unused-import,ungrouped-imports
3436
from azure.core.credentials import TokenCredential
3537

3638

37-
class ElasticSanMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
39+
class ElasticSanMgmtClient(ElasticSanMgmtClientOperationsMixin): # pylint: disable=too-many-instance-attributes
3840
"""ElasticSanMgmtClient.
3941
4042
:ivar operations: Operations operations
4143
:vartype operations: azure.mgmt.elasticsan.operations.Operations
42-
:ivar skus: SkusOperations operations
43-
:vartype skus: azure.mgmt.elasticsan.operations.SkusOperations
4444
:ivar elastic_sans: ElasticSansOperations operations
4545
:vartype elastic_sans: azure.mgmt.elasticsan.operations.ElasticSansOperations
46-
:ivar volume_groups: VolumeGroupsOperations operations
47-
:vartype volume_groups: azure.mgmt.elasticsan.operations.VolumeGroupsOperations
48-
:ivar volumes: VolumesOperations operations
49-
:vartype volumes: azure.mgmt.elasticsan.operations.VolumesOperations
46+
:ivar skus: SkusOperations operations
47+
:vartype skus: azure.mgmt.elasticsan.operations.SkusOperations
5048
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
5149
:vartype private_endpoint_connections:
5250
azure.mgmt.elasticsan.operations.PrivateEndpointConnectionsOperations
5351
:ivar private_link_resources: PrivateLinkResourcesOperations operations
5452
:vartype private_link_resources:
5553
azure.mgmt.elasticsan.operations.PrivateLinkResourcesOperations
54+
:ivar volume_groups: VolumeGroupsOperations operations
55+
:vartype volume_groups: azure.mgmt.elasticsan.operations.VolumeGroupsOperations
56+
:ivar volumes: VolumesOperations operations
57+
:vartype volumes: azure.mgmt.elasticsan.operations.VolumesOperations
5658
:ivar volume_snapshots: VolumeSnapshotsOperations operations
5759
:vartype volume_snapshots: azure.mgmt.elasticsan.operations.VolumeSnapshotsOperations
5860
:param credential: Credential needed for the client to connect to Azure. Required.
5961
:type credential: ~azure.core.credentials.TokenCredential
6062
:param subscription_id: The ID of the target subscription. Required.
6163
:type subscription_id: str
62-
:param base_url: Service URL. Default value is "https://management.azure.com".
64+
:param base_url: Service URL. Default value is None.
6365
:type base_url: str
64-
:keyword api_version: Api Version. Default value is "2024-06-01-preview". Note that overriding
66+
:keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding
6567
this default value may result in unsupported behavior.
6668
:paramtype api_version: str
6769
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
6870
Retry-After header is present.
6971
"""
7072

7173
def __init__(
72-
self,
73-
credential: "TokenCredential",
74-
subscription_id: str,
75-
base_url: str = "https://management.azure.com",
76-
**kwargs: Any
74+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
7775
) -> None:
76+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
77+
_endpoints = get_arm_endpoints(_cloud)
78+
if not base_url:
79+
base_url = _endpoints["resource_manager"]
80+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
7881
self._config = ElasticSanMgmtClientConfiguration(
79-
credential=credential, subscription_id=subscription_id, **kwargs
82+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
8083
)
84+
8185
_policies = kwargs.pop("policies", None)
8286
if _policies is None:
8387
_policies = [
@@ -96,23 +100,23 @@ def __init__(
96100
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
97101
self._config.http_logging_policy,
98102
]
99-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
103+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
100104

101105
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
102106
self._serialize = Serializer(client_models)
103107
self._deserialize = Deserializer(client_models)
104108
self._serialize.client_side_validation = False
105109
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
106-
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
107110
self.elastic_sans = ElasticSansOperations(self._client, self._config, self._serialize, self._deserialize)
108-
self.volume_groups = VolumeGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
109-
self.volumes = VolumesOperations(self._client, self._config, self._serialize, self._deserialize)
111+
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
110112
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
111113
self._client, self._config, self._serialize, self._deserialize
112114
)
113115
self.private_link_resources = PrivateLinkResourcesOperations(
114116
self._client, self._config, self._serialize, self._deserialize
115117
)
118+
self.volume_groups = VolumeGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
119+
self.volumes = VolumesOperations(self._client, self._config, self._serialize, self._deserialize)
116120
self.volume_snapshots = VolumeSnapshotsOperations(
117121
self._client, self._config, self._serialize, self._deserialize
118122
)

0 commit comments

Comments
 (0)