Skip to content

Commit 12c79f7

Browse files
[AutoRelease] t2-compute-2025-11-08-03417(can only be merged by SDK owner) (Azure#43893)
* code and test * update changelog --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 8948737 commit 12c79f7

23 files changed

+256
-33
lines changed

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

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

3+
## 37.1.0 (2025-11-17)
4+
5+
### Features Added
6+
7+
- Model AdditionalCapabilities has a new parameter enable_fips1403_encryption
8+
- Model DiskRestorePointInstanceView has a new parameter snapshot_access_state
9+
- Model RestorePoint has a new parameter instant_access_duration_minutes
10+
- Model RestorePointCollection has a new parameter instant_access
11+
- Model RestorePointCollectionUpdate has a new parameter instant_access
12+
313
## 37.0.1 (2025-10-09)
414

515
### Bugs Fixed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "3ed4c07ba75ceba9b01d5cf2e4bed0ea988d3c52",
2+
"commit": "a49631915059dad95cfa78cf100c1201e9760b43",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.40.0",
6+
"@autorest/python@6.42.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.40.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.42.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/compute/resource-manager/readme.md"
1111
}

sdk/compute/azure-mgmt-compute/apiview-properties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@
553553
"azure.mgmt.compute.models.PatchOperationStatus": null,
554554
"azure.mgmt.compute.models.ProximityPlacementGroupType": null,
555555
"azure.mgmt.compute.models.RestorePointEncryptionType": null,
556+
"azure.mgmt.compute.models.SnapshotAccessState": null,
556557
"azure.mgmt.compute.models.OperatingSystemType": null,
557558
"azure.mgmt.compute.models.ConsistencyModeTypes": null,
558559
"azure.mgmt.compute.models.DedicatedHostLicenseTypes": null,
@@ -593,7 +594,6 @@
593594
"azure.mgmt.compute.models.AvailabilityPolicyDiskDelay": null,
594595
"azure.mgmt.compute.models.SnapshotStorageAccountTypes": null,
595596
"azure.mgmt.compute.models.CopyCompletionErrorReason": null,
596-
"azure.mgmt.compute.models.SnapshotAccessState": null,
597597
"azure.mgmt.compute.models.ExtendedLocationType": null,
598598
"azure.mgmt.compute.models.ResourceSkuRestrictionsType": null,
599599
"azure.mgmt.compute.models.ResourceSkuRestrictionsReasonCode": null,

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_utils/serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs):
787787

788788
# If dependencies is empty, try with current data class
789789
# It has to be a subclass of Enum anyway
790-
enum_type = self.dependencies.get(data_type, data.__class__)
790+
enum_type = self.dependencies.get(data_type, cast(type, data.__class__))
791791
if issubclass(enum_type, Enum):
792792
return Serializer.serialize_enum(data, enum_obj=enum_type)
793793

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "37.0.1"
8+
VERSION = "37.1.0"

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/operations/_resource_skus_operations.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ async def get_next(next_link=None):
120120

121121
if response.status_code not in [200]:
122122
map_error(status_code=response.status_code, response=response, error_map=error_map)
123-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
123+
error = self._deserialize.failsafe_deserialize(
124+
_models.ErrorResponse,
125+
pipeline_response,
126+
)
124127
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
125128

126129
return pipeline_response

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models/_models_py3.py

Lines changed: 76 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,25 @@ class AdditionalCapabilities(_serialization.Model):
275275
:vartype ultra_ssd_enabled: bool
276276
:ivar hibernation_enabled: The flag that enables or disables hibernation capability on the VM.
277277
:vartype hibernation_enabled: bool
278+
:ivar enable_fips1403_encryption: The flag enables the usage of FIPS 140-3 compliant
279+
cryptography on the protectedSettings of an extension. Learn more at:
280+
https://aka.ms/linuxagentfipssupport.
281+
:vartype enable_fips1403_encryption: bool
278282
"""
279283

280284
_attribute_map = {
281285
"ultra_ssd_enabled": {"key": "ultraSSDEnabled", "type": "bool"},
282286
"hibernation_enabled": {"key": "hibernationEnabled", "type": "bool"},
287+
"enable_fips1403_encryption": {"key": "enableFips1403Encryption", "type": "bool"},
283288
}
284289

285290
def __init__(
286-
self, *, ultra_ssd_enabled: Optional[bool] = None, hibernation_enabled: Optional[bool] = None, **kwargs: Any
291+
self,
292+
*,
293+
ultra_ssd_enabled: Optional[bool] = None,
294+
hibernation_enabled: Optional[bool] = None,
295+
enable_fips1403_encryption: Optional[bool] = None,
296+
**kwargs: Any
287297
) -> None:
288298
"""
289299
:keyword ultra_ssd_enabled: The flag that enables or disables a capability to have one or more
@@ -294,10 +304,15 @@ def __init__(
294304
:keyword hibernation_enabled: The flag that enables or disables hibernation capability on the
295305
VM.
296306
:paramtype hibernation_enabled: bool
307+
:keyword enable_fips1403_encryption: The flag enables the usage of FIPS 140-3 compliant
308+
cryptography on the protectedSettings of an extension. Learn more at:
309+
https://aka.ms/linuxagentfipssupport.
310+
:paramtype enable_fips1403_encryption: bool
297311
"""
298312
super().__init__(**kwargs)
299313
self.ultra_ssd_enabled = ultra_ssd_enabled
300314
self.hibernation_enabled = hibernation_enabled
315+
self.enable_fips1403_encryption = enable_fips1403_encryption
301316

302317

303318
class AdditionalReplicaSet(_serialization.Model):
@@ -3768,8 +3783,6 @@ def __init__(
37683783
class DataDisk(_serialization.Model):
37693784
"""Describes a data disk.
37703785

3771-
Variables are only populated by the server, and will be ignored when sending a request.
3772-
37733786
All required parameters must be populated in order to send to server.
37743787

37753788
:ivar lun: Specifies the logical unit number of the data disk. This value is used to identify
@@ -3814,12 +3827,10 @@ class DataDisk(_serialization.Model):
38143827
VirtualMachine/VirtualMachineScaleset.
38153828
:vartype to_be_detached: bool
38163829
:ivar disk_iops_read_write: Specifies the Read-Write IOPS for the managed disk when
3817-
StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be
3818-
updated only via updates to the VirtualMachine Scale Set.
3830+
StorageAccountType is UltraSSD_LRS.
38193831
:vartype disk_iops_read_write: int
38203832
:ivar disk_m_bps_read_write: Specifies the bandwidth in MB per second for the managed disk when
3821-
StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be
3822-
updated only via updates to the VirtualMachine Scale Set.
3833+
StorageAccountType is UltraSSD_LRS.
38233834
:vartype disk_m_bps_read_write: int
38243835
:ivar detach_option: Specifies the detach behavior to be used while detaching a disk or which
38253836
is already in the process of detachment from the virtual machine. Supported values:
@@ -3840,8 +3851,6 @@ class DataDisk(_serialization.Model):
38403851
_validation = {
38413852
"lun": {"required": True},
38423853
"create_option": {"required": True},
3843-
"disk_iops_read_write": {"readonly": True},
3844-
"disk_m_bps_read_write": {"readonly": True},
38453854
}
38463855

38473856
_attribute_map = {
@@ -3876,6 +3885,8 @@ def __init__(
38763885
managed_disk: Optional["_models.ManagedDiskParameters"] = None,
38773886
source_resource: Optional["_models.ApiEntityReference"] = None,
38783887
to_be_detached: Optional[bool] = None,
3888+
disk_iops_read_write: Optional[int] = None,
3889+
disk_m_bps_read_write: Optional[int] = None,
38793890
detach_option: Optional[Union[str, "_models.DiskDetachOptionTypes"]] = None,
38803891
delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = None,
38813892
**kwargs: Any
@@ -3922,6 +3933,12 @@ def __init__(
39223933
:keyword to_be_detached: Specifies whether the data disk is in process of detachment from the
39233934
VirtualMachine/VirtualMachineScaleset.
39243935
:paramtype to_be_detached: bool
3936+
:keyword disk_iops_read_write: Specifies the Read-Write IOPS for the managed disk when
3937+
StorageAccountType is UltraSSD_LRS.
3938+
:paramtype disk_iops_read_write: int
3939+
:keyword disk_m_bps_read_write: Specifies the bandwidth in MB per second for the managed disk
3940+
when StorageAccountType is UltraSSD_LRS.
3941+
:paramtype disk_m_bps_read_write: int
39253942
:keyword detach_option: Specifies the detach behavior to be used while detaching a disk or
39263943
which is already in the process of detachment from the virtual machine. Supported values:
39273944
**ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a
@@ -3949,8 +3966,8 @@ def __init__(
39493966
self.managed_disk = managed_disk
39503967
self.source_resource = source_resource
39513968
self.to_be_detached = to_be_detached
3952-
self.disk_iops_read_write: Optional[int] = None
3953-
self.disk_m_bps_read_write: Optional[int] = None
3969+
self.disk_iops_read_write = disk_iops_read_write
3970+
self.disk_m_bps_read_write = disk_m_bps_read_write
39543971
self.detach_option = detach_option
39553972
self.delete_option = delete_option
39563973

@@ -6239,30 +6256,41 @@ class DiskRestorePointInstanceView(_serialization.Model):
62396256

62406257
:ivar id: Disk restore point Id.
62416258
:vartype id: str
6259+
:ivar snapshot_access_state: The state of snapshot which determines the access availability of
6260+
the snapshot. Known values are: "Unknown", "Pending", "Available", "InstantAccess", and
6261+
"AvailableWithInstantAccess".
6262+
:vartype snapshot_access_state: str or ~azure.mgmt.compute.models.SnapshotAccessState
62426263
:ivar replication_status: The disk restore point replication status information.
62436264
:vartype replication_status: ~azure.mgmt.compute.models.DiskRestorePointReplicationStatus
62446265
"""
62456266

62466267
_attribute_map = {
62476268
"id": {"key": "id", "type": "str"},
6269+
"snapshot_access_state": {"key": "snapshotAccessState", "type": "str"},
62486270
"replication_status": {"key": "replicationStatus", "type": "DiskRestorePointReplicationStatus"},
62496271
}
62506272

62516273
def __init__(
62526274
self,
62536275
*,
62546276
id: Optional[str] = None, # pylint: disable=redefined-builtin
6277+
snapshot_access_state: Optional[Union[str, "_models.SnapshotAccessState"]] = None,
62556278
replication_status: Optional["_models.DiskRestorePointReplicationStatus"] = None,
62566279
**kwargs: Any
62576280
) -> None:
62586281
"""
62596282
:keyword id: Disk restore point Id.
62606283
:paramtype id: str
6284+
:keyword snapshot_access_state: The state of snapshot which determines the access availability
6285+
of the snapshot. Known values are: "Unknown", "Pending", "Available", "InstantAccess", and
6286+
"AvailableWithInstantAccess".
6287+
:paramtype snapshot_access_state: str or ~azure.mgmt.compute.models.SnapshotAccessState
62616288
:keyword replication_status: The disk restore point replication status information.
62626289
:paramtype replication_status: ~azure.mgmt.compute.models.DiskRestorePointReplicationStatus
62636290
"""
62646291
super().__init__(**kwargs)
62656292
self.id = id
6293+
self.snapshot_access_state = snapshot_access_state
62666294
self.replication_status = replication_status
62676295

62686296

@@ -15558,6 +15586,10 @@ class RestorePoint(ProxyResource):
1555815586
:vartype source_restore_point: ~azure.mgmt.compute.models.ApiEntityReference
1555915587
:ivar instance_view: The restore point instance view.
1556015588
:vartype instance_view: ~azure.mgmt.compute.models.RestorePointInstanceView
15589+
:ivar instant_access_duration_minutes: This property determines the time in minutes the
15590+
snapshot is retained as instant access for restoring Premium SSD v2 or Ultra disk with fast
15591+
restore performance in this restore point.
15592+
:vartype instant_access_duration_minutes: int
1556115593
"""
1556215594

1556315595
_validation = {
@@ -15581,6 +15613,7 @@ class RestorePoint(ProxyResource):
1558115613
"time_created": {"key": "properties.timeCreated", "type": "iso-8601"},
1558215614
"source_restore_point": {"key": "properties.sourceRestorePoint", "type": "ApiEntityReference"},
1558315615
"instance_view": {"key": "properties.instanceView", "type": "RestorePointInstanceView"},
15616+
"instant_access_duration_minutes": {"key": "properties.instantAccessDurationMinutes", "type": "int"},
1558415617
}
1558515618

1558615619
def __init__(
@@ -15591,6 +15624,7 @@ def __init__(
1559115624
consistency_mode: Optional[Union[str, "_models.ConsistencyModeTypes"]] = None,
1559215625
time_created: Optional[datetime.datetime] = None,
1559315626
source_restore_point: Optional["_models.ApiEntityReference"] = None,
15627+
instant_access_duration_minutes: Optional[int] = None,
1559415628
**kwargs: Any
1559515629
) -> None:
1559615630
"""
@@ -15610,6 +15644,10 @@ def __init__(
1561015644
:keyword source_restore_point: Resource Id of the source restore point from which a copy needs
1561115645
to be created.
1561215646
:paramtype source_restore_point: ~azure.mgmt.compute.models.ApiEntityReference
15647+
:keyword instant_access_duration_minutes: This property determines the time in minutes the
15648+
snapshot is retained as instant access for restoring Premium SSD v2 or Ultra disk with fast
15649+
restore performance in this restore point.
15650+
:paramtype instant_access_duration_minutes: int
1561315651
"""
1561415652
super().__init__(**kwargs)
1561515653
self.exclude_disks = exclude_disks
@@ -15619,6 +15657,7 @@ def __init__(
1561915657
self.time_created = time_created
1562015658
self.source_restore_point = source_restore_point
1562115659
self.instance_view: Optional["_models.RestorePointInstanceView"] = None
15660+
self.instant_access_duration_minutes = instant_access_duration_minutes
1562215661

1562315662

1562415663
class RestorePointCollection(TrackedResource):
@@ -15653,6 +15692,11 @@ class RestorePointCollection(TrackedResource):
1565315692
:ivar restore_points: A list containing all restore points created under this restore point
1565415693
collection.
1565515694
:vartype restore_points: list[~azure.mgmt.compute.models.RestorePoint]
15695+
:ivar instant_access: This property determines whether instant access snapshot is enabled for
15696+
restore points created under this restore point collection for Premium SSD v2 or Ultra disk.
15697+
Instant access snapshot for Premium SSD v2 or Ultra disk is instantaneously available for
15698+
restoring disk with fast restore performance.
15699+
:vartype instant_access: bool
1565615700
"""
1565715701

1565815702
_validation = {
@@ -15677,6 +15721,7 @@ class RestorePointCollection(TrackedResource):
1567715721
"provisioning_state": {"key": "properties.provisioningState", "type": "str"},
1567815722
"restore_point_collection_id": {"key": "properties.restorePointCollectionId", "type": "str"},
1567915723
"restore_points": {"key": "properties.restorePoints", "type": "[RestorePoint]"},
15724+
"instant_access": {"key": "properties.instantAccess", "type": "bool"},
1568015725
}
1568115726

1568215727
def __init__(
@@ -15685,6 +15730,7 @@ def __init__(
1568515730
location: str,
1568615731
tags: Optional[dict[str, str]] = None,
1568715732
source: Optional["_models.RestorePointCollectionSourceProperties"] = None,
15733+
instant_access: Optional[bool] = None,
1568815734
**kwargs: Any
1568915735
) -> None:
1569015736
"""
@@ -15695,12 +15741,18 @@ def __init__(
1569515741
:keyword source: The properties of the source resource that this restore point collection is
1569615742
created from.
1569715743
:paramtype source: ~azure.mgmt.compute.models.RestorePointCollectionSourceProperties
15744+
:keyword instant_access: This property determines whether instant access snapshot is enabled
15745+
for restore points created under this restore point collection for Premium SSD v2 or Ultra
15746+
disk. Instant access snapshot for Premium SSD v2 or Ultra disk is instantaneously available for
15747+
restoring disk with fast restore performance.
15748+
:paramtype instant_access: bool
1569815749
"""
1569915750
super().__init__(tags=tags, location=location, **kwargs)
1570015751
self.source = source
1570115752
self.provisioning_state: Optional[str] = None
1570215753
self.restore_point_collection_id: Optional[str] = None
1570315754
self.restore_points: Optional[list["_models.RestorePoint"]] = None
15755+
self.instant_access = instant_access
1570415756

1570515757

1570615758
class RestorePointCollectionListResult(_serialization.Model):
@@ -15786,6 +15838,11 @@ class RestorePointCollectionUpdate(UpdateResource):
1578615838
:ivar restore_points: A list containing all restore points created under this restore point
1578715839
collection.
1578815840
:vartype restore_points: list[~azure.mgmt.compute.models.RestorePoint]
15841+
:ivar instant_access: This property determines whether instant access snapshot is enabled for
15842+
restore points created under this restore point collection for Premium SSD v2 or Ultra disk.
15843+
Instant access snapshot for Premium SSD v2 or Ultra disk is instantaneously available for
15844+
restoring disk with fast restore performance.
15845+
:vartype instant_access: bool
1578915846
"""
1579015847

1579115848
_validation = {
@@ -15800,13 +15857,15 @@ class RestorePointCollectionUpdate(UpdateResource):
1580015857
"provisioning_state": {"key": "properties.provisioningState", "type": "str"},
1580115858
"restore_point_collection_id": {"key": "properties.restorePointCollectionId", "type": "str"},
1580215859
"restore_points": {"key": "properties.restorePoints", "type": "[RestorePoint]"},
15860+
"instant_access": {"key": "properties.instantAccess", "type": "bool"},
1580315861
}
1580415862

1580515863
def __init__(
1580615864
self,
1580715865
*,
1580815866
tags: Optional[dict[str, str]] = None,
1580915867
source: Optional["_models.RestorePointCollectionSourceProperties"] = None,
15868+
instant_access: Optional[bool] = None,
1581015869
**kwargs: Any
1581115870
) -> None:
1581215871
"""
@@ -15815,12 +15874,18 @@ def __init__(
1581515874
:keyword source: The properties of the source resource that this restore point collection is
1581615875
created from.
1581715876
:paramtype source: ~azure.mgmt.compute.models.RestorePointCollectionSourceProperties
15877+
:keyword instant_access: This property determines whether instant access snapshot is enabled
15878+
for restore points created under this restore point collection for Premium SSD v2 or Ultra
15879+
disk. Instant access snapshot for Premium SSD v2 or Ultra disk is instantaneously available for
15880+
restoring disk with fast restore performance.
15881+
:paramtype instant_access: bool
1581815882
"""
1581915883
super().__init__(tags=tags, **kwargs)
1582015884
self.source = source
1582115885
self.provisioning_state: Optional[str] = None
1582215886
self.restore_point_collection_id: Optional[str] = None
1582315887
self.restore_points: Optional[list["_models.RestorePoint"]] = None
15888+
self.instant_access = instant_access
1582415889

1582515890

1582615891
class RestorePointEncryption(_serialization.Model):

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/operations/_resource_skus_operations.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ def get_next(next_link=None):
158158

159159
if response.status_code not in [200]:
160160
map_error(status_code=response.status_code, response=response, error_map=error_map)
161-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
161+
error = self._deserialize.failsafe_deserialize(
162+
_models.ErrorResponse,
163+
pipeline_response,
164+
)
162165
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
163166

164167
return pipeline_response

sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_create_or_update.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ def main():
3737
parameters={
3838
"location": "norwayeast",
3939
"properties": {
40+
"instantAccess": True,
4041
"source": {
4142
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"
42-
}
43+
},
4344
},
4445
"tags": {"myTag1": "tagValue1"},
4546
},

0 commit comments

Comments
 (0)