@@ -73,7 +73,7 @@ async def get_status(
73
73
401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
74
74
}
75
75
error_map .update (kwargs .pop ('error_map' , {}))
76
- api_version = "2021-02 -01"
76
+ api_version = "2021-04 -01"
77
77
accept = "application/json"
78
78
79
79
# Construct URL
@@ -111,6 +111,74 @@ async def get_status(
111
111
return deserialized
112
112
get_status .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus' } # type: ignore
113
113
114
+ async def get_volume_restore_status (
115
+ self ,
116
+ resource_group_name : str ,
117
+ account_name : str ,
118
+ pool_name : str ,
119
+ volume_name : str ,
120
+ ** kwargs : Any
121
+ ) -> "_models.RestoreStatus" :
122
+ """Get volume's restore status.
123
+
124
+ Get the status of the restore for a volume.
125
+
126
+ :param resource_group_name: The name of the resource group.
127
+ :type resource_group_name: str
128
+ :param account_name: The name of the NetApp account.
129
+ :type account_name: str
130
+ :param pool_name: The name of the capacity pool.
131
+ :type pool_name: str
132
+ :param volume_name: The name of the volume.
133
+ :type volume_name: str
134
+ :keyword callable cls: A custom type or function that will be passed the direct response
135
+ :return: RestoreStatus, or the result of cls(response)
136
+ :rtype: ~azure.mgmt.netapp.models.RestoreStatus
137
+ :raises: ~azure.core.exceptions.HttpResponseError
138
+ """
139
+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models.RestoreStatus"]
140
+ error_map = {
141
+ 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
142
+ }
143
+ error_map .update (kwargs .pop ('error_map' , {}))
144
+ api_version = "2021-04-01"
145
+ accept = "application/json"
146
+
147
+ # Construct URL
148
+ url = self .get_volume_restore_status .metadata ['url' ] # type: ignore
149
+ path_format_arguments = {
150
+ 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' ),
151
+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 , pattern = r'^[-\w\._\(\)]+$' ),
152
+ 'accountName' : self ._serialize .url ("account_name" , account_name , 'str' ),
153
+ 'poolName' : self ._serialize .url ("pool_name" , pool_name , 'str' , max_length = 64 , min_length = 1 , pattern = r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$' ),
154
+ 'volumeName' : self ._serialize .url ("volume_name" , volume_name , 'str' , max_length = 64 , min_length = 1 , pattern = r'^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$' ),
155
+ }
156
+ url = self ._client .format_url (url , ** path_format_arguments )
157
+
158
+ # Construct parameters
159
+ query_parameters = {} # type: Dict[str, Any]
160
+ query_parameters ['api-version' ] = self ._serialize .query ("api_version" , api_version , 'str' )
161
+
162
+ # Construct headers
163
+ header_parameters = {} # type: Dict[str, Any]
164
+ header_parameters ['Accept' ] = self ._serialize .header ("accept" , accept , 'str' )
165
+
166
+ request = self ._client .get (url , query_parameters , header_parameters )
167
+ pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
168
+ response = pipeline_response .http_response
169
+
170
+ if response .status_code not in [200 ]:
171
+ map_error (status_code = response .status_code , response = response , error_map = error_map )
172
+ raise HttpResponseError (response = response , error_format = ARMErrorFormat )
173
+
174
+ deserialized = self ._deserialize ('RestoreStatus' , pipeline_response )
175
+
176
+ if cls :
177
+ return cls (pipeline_response , deserialized , {})
178
+
179
+ return deserialized
180
+ get_volume_restore_status .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus' } # type: ignore
181
+
114
182
def list (
115
183
self ,
116
184
resource_group_name : str ,
@@ -141,7 +209,7 @@ def list(
141
209
401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
142
210
}
143
211
error_map .update (kwargs .pop ('error_map' , {}))
144
- api_version = "2021-02 -01"
212
+ api_version = "2021-04 -01"
145
213
accept = "application/json"
146
214
147
215
def prepare_request (next_link = None ):
@@ -228,7 +296,7 @@ async def get(
228
296
401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
229
297
}
230
298
error_map .update (kwargs .pop ('error_map' , {}))
231
- api_version = "2021-02 -01"
299
+ api_version = "2021-04 -01"
232
300
accept = "application/json"
233
301
234
302
# Construct URL
@@ -282,7 +350,7 @@ async def _create_initial(
282
350
401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
283
351
}
284
352
error_map .update (kwargs .pop ('error_map' , {}))
285
- api_version = "2021-02 -01"
353
+ api_version = "2021-04 -01"
286
354
content_type = kwargs .pop ("content_type" , "application/json" )
287
355
accept = "application/json"
288
356
@@ -434,7 +502,7 @@ async def _update_initial(
434
502
401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
435
503
}
436
504
error_map .update (kwargs .pop ('error_map' , {}))
437
- api_version = "2021-02 -01"
505
+ api_version = "2021-04 -01"
438
506
content_type = kwargs .pop ("content_type" , "application/json" )
439
507
accept = "application/json"
440
508
@@ -587,7 +655,7 @@ async def _delete_initial(
587
655
401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
588
656
}
589
657
error_map .update (kwargs .pop ('error_map' , {}))
590
- api_version = "2021-02 -01"
658
+ api_version = "2021-04 -01"
591
659
592
660
# Construct URL
593
661
url = self ._delete_initial .metadata ['url' ] # type: ignore
0 commit comments