Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/netapp/azure-mgmt-netapp/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@autorest/python@5.12.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "25a8355d4094595edf9b58b13e8c95b0b0c9c50c",
"commit": "8e3bb03c4761ede2e9ca8380914d446c9c4ee52f",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/netapp/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"autorest_command": "autorest specification/netapp/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/netapp/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-10-01"
self.api_version = "2022-01-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
5 changes: 3 additions & 2 deletions sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2021-10-01",
"total_api_version_list": ["2021-10-01"],
"chosen_version": "2022-01-01",
"total_api_version_list": ["2022-01-01"],
"client": {
"name": "NetAppManagementClient",
"filename": "_net_app_management_client",
Expand Down Expand Up @@ -108,6 +108,7 @@
"backups": "BackupsOperations",
"account_backups": "AccountBackupsOperations",
"backup_policies": "BackupPoliciesOperations",
"volume_quota_rules": "VolumeQuotaRulesOperations",
"vaults": "VaultsOperations",
"volume_groups": "VolumeGroupsOperations",
"subvolumes": "SubvolumesOperations"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from . import models
from ._configuration import NetAppManagementClientConfiguration
from .operations import AccountBackupsOperations, AccountsOperations, BackupPoliciesOperations, BackupsOperations, NetAppResourceOperations, NetAppResourceQuotaLimitsOperations, Operations, PoolsOperations, SnapshotPoliciesOperations, SnapshotsOperations, SubvolumesOperations, VaultsOperations, VolumeGroupsOperations, VolumesOperations
from .operations import AccountBackupsOperations, AccountsOperations, BackupPoliciesOperations, BackupsOperations, NetAppResourceOperations, NetAppResourceQuotaLimitsOperations, Operations, PoolsOperations, SnapshotPoliciesOperations, SnapshotsOperations, SubvolumesOperations, VaultsOperations, VolumeGroupsOperations, VolumeQuotaRulesOperations, VolumesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand Down Expand Up @@ -47,6 +47,8 @@ class NetAppManagementClient:
:vartype account_backups: azure.mgmt.netapp.operations.AccountBackupsOperations
:ivar backup_policies: BackupPoliciesOperations operations
:vartype backup_policies: azure.mgmt.netapp.operations.BackupPoliciesOperations
:ivar volume_quota_rules: VolumeQuotaRulesOperations operations
:vartype volume_quota_rules: azure.mgmt.netapp.operations.VolumeQuotaRulesOperations
:ivar vaults: VaultsOperations operations
:vartype vaults: azure.mgmt.netapp.operations.VaultsOperations
:ivar volume_groups: VolumeGroupsOperations operations
Expand Down Expand Up @@ -89,6 +91,7 @@ def __init__(
self.backups = BackupsOperations(self._client, self._config, self._serialize, self._deserialize)
self.account_backups = AccountBackupsOperations(self._client, self._config, self._serialize, self._deserialize)
self.backup_policies = BackupPoliciesOperations(self._client, self._config, self._serialize, self._deserialize)
self.volume_quota_rules = VolumeQuotaRulesOperations(self._client, self._config, self._serialize, self._deserialize)
self.vaults = VaultsOperations(self._client, self._config, self._serialize, self._deserialize)
self.volume_groups = VolumeGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
self.subvolumes = SubvolumesOperations(self._client, self._config, self._serialize, self._deserialize)
Expand Down
2 changes: 1 addition & 1 deletion sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "7.0.0"
VERSION = "5.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-10-01"
self.api_version = "2022-01-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from .. import models
from ._configuration import NetAppManagementClientConfiguration
from .operations import AccountBackupsOperations, AccountsOperations, BackupPoliciesOperations, BackupsOperations, NetAppResourceOperations, NetAppResourceQuotaLimitsOperations, Operations, PoolsOperations, SnapshotPoliciesOperations, SnapshotsOperations, SubvolumesOperations, VaultsOperations, VolumeGroupsOperations, VolumesOperations
from .operations import AccountBackupsOperations, AccountsOperations, BackupPoliciesOperations, BackupsOperations, NetAppResourceOperations, NetAppResourceQuotaLimitsOperations, Operations, PoolsOperations, SnapshotPoliciesOperations, SnapshotsOperations, SubvolumesOperations, VaultsOperations, VolumeGroupsOperations, VolumeQuotaRulesOperations, VolumesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand Down Expand Up @@ -47,6 +47,8 @@ class NetAppManagementClient:
:vartype account_backups: azure.mgmt.netapp.aio.operations.AccountBackupsOperations
:ivar backup_policies: BackupPoliciesOperations operations
:vartype backup_policies: azure.mgmt.netapp.aio.operations.BackupPoliciesOperations
:ivar volume_quota_rules: VolumeQuotaRulesOperations operations
:vartype volume_quota_rules: azure.mgmt.netapp.aio.operations.VolumeQuotaRulesOperations
:ivar vaults: VaultsOperations operations
:vartype vaults: azure.mgmt.netapp.aio.operations.VaultsOperations
:ivar volume_groups: VolumeGroupsOperations operations
Expand Down Expand Up @@ -89,6 +91,7 @@ def __init__(
self.backups = BackupsOperations(self._client, self._config, self._serialize, self._deserialize)
self.account_backups = AccountBackupsOperations(self._client, self._config, self._serialize, self._deserialize)
self.backup_policies = BackupPoliciesOperations(self._client, self._config, self._serialize, self._deserialize)
self.volume_quota_rules = VolumeQuotaRulesOperations(self._client, self._config, self._serialize, self._deserialize)
self.vaults = VaultsOperations(self._client, self._config, self._serialize, self._deserialize)
self.volume_groups = VolumeGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
self.subvolumes = SubvolumesOperations(self._client, self._config, self._serialize, self._deserialize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from ._backups_operations import BackupsOperations
from ._account_backups_operations import AccountBackupsOperations
from ._backup_policies_operations import BackupPoliciesOperations
from ._volume_quota_rules_operations import VolumeQuotaRulesOperations
from ._vaults_operations import VaultsOperations
from ._volume_groups_operations import VolumeGroupsOperations
from ._subvolumes_operations import SubvolumesOperations
Expand All @@ -33,6 +34,7 @@
'BackupsOperations',
'AccountBackupsOperations',
'BackupPoliciesOperations',
'VolumeQuotaRulesOperations',
'VaultsOperations',
'VolumeGroupsOperations',
'SubvolumesOperations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._net_app_resource_operations import build_check_file_path_availability_request, build_check_name_availability_request, build_check_quota_availability_request
from ...operations._net_app_resource_operations import build_check_file_path_availability_request, build_check_name_availability_request, build_check_quota_availability_request, build_query_region_info_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -233,3 +233,52 @@ async def check_quota_availability(

check_quota_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability'} # type: ignore


@distributed_trace_async
async def query_region_info(
self,
location: str,
**kwargs: Any
) -> "_models.RegionInfo":
"""Describes region specific information.

Provides storage to network proximity and logical zone mapping information.

:param location: The location.
:type location: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: RegionInfo, or the result of cls(response)
:rtype: ~azure.mgmt.netapp.models.RegionInfo
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionInfo"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))


request = build_query_region_info_request(
subscription_id=self._config.subscription_id,
location=location,
template_url=self.query_region_info.metadata['url'],
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)

pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize('RegionInfo', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized

query_region_info.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfo'} # type: ignore

Loading