Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ interactions:
User-Agent:
- AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005?api-version=2022-01-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005?api-version=2025-05-01
response:
body:
string: '{"name":"cli000005","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005","etag":"W/\"953608bd-250c-4858-a9a4-5c744e264cb6\"","type":"Microsoft.Network/privateEndpoints","location":"centraluseuap","properties":{"provisioningState":"Updating","resourceGuid":"9cfc7b2a-aa86-4991-b0cb-f000db18d8c5","privateLinkServiceConnections":[{"name":"cli000006","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005/privateLinkServiceConnections/cli000006","etag":"W/\"953608bd-250c-4858-a9a4-5c744e264cb6\"","properties":{"provisioningState":"Succeeded","privateLinkServiceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000001/providers/Microsoft.DurableTask/schedulers/cli000007","groupIds":["scheduler"],"privateLinkServiceConnectionState":{"status":"Approved","description":"Auto
Expand Down Expand Up @@ -1600,7 +1600,7 @@ interactions:
User-Agent:
- AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005?api-version=2022-01-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005?api-version=2025-05-01
response:
body:
string: '{"name":"cli000005","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005","etag":"W/\"edf078f4-ddd7-4cd7-b3cd-9870f5cb0225\"","type":"Microsoft.Network/privateEndpoints","location":"centraluseuap","properties":{"provisioningState":"Succeeded","resourceGuid":"9cfc7b2a-aa86-4991-b0cb-f000db18d8c5","privateLinkServiceConnections":[{"name":"cli000006","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005/privateLinkServiceConnections/cli000006","etag":"W/\"edf078f4-ddd7-4cd7-b3cd-9870f5cb0225\"","properties":{"provisioningState":"Succeeded","privateLinkServiceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000001/providers/Microsoft.DurableTask/schedulers/cli000007","groupIds":["scheduler"],"privateLinkServiceConnectionState":{"status":"Approved","description":"","actionsRequired":""}},"type":"Microsoft.Network/privateEndpoints/privateLinkServiceConnections"}],"manualPrivateLinkServiceConnections":[],"customNetworkInterfaceName":"","subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004"},"ipConfigurations":[],"networkInterfaces":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/networkInterfaces/cli000005.nic.fbcf88aa-b06d-4241-8d80-3d0e434dc5ce"}],"customDnsConfigs":[{"fqdn":"cliomr77fh4pzrw-bbg2gua3.centraluseuap.durabletask.io","ipAddresses":["10.0.0.4"]}]}}'
Expand Down Expand Up @@ -2542,7 +2542,7 @@ interactions:
User-Agent:
- AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0)
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005?api-version=2022-01-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_durable_task_pec000002/providers/Microsoft.Network/privateEndpoints/cli000005?api-version=2025-05-01
response:
body:
string: ''
Expand Down
4 changes: 4 additions & 0 deletions src/azure-cli/azure/cli/command_modules/vm/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -2993,6 +2993,10 @@
az restore-point create --exclude-disks "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" \
--resource-group "myResourceGroup" --collection-name "rpcName" --name "rpName"
- name: Create a restore point with instant-access-duration-minutes
text: |-
az restore-point create --exclude-disks "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" \
--resource-group "myResourceGroup" --collection-name "rpcName" --name "rpName" --instant-access-duration-minutes 120
"""

helps['restore-point wait'] = """
Expand Down
5 changes: 4 additions & 1 deletion src/azure-cli/azure/cli/command_modules/vm/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def load_arguments(self, _):
c.argument('bandwidth_copy_speed', min_api='2023-10-02',
help='If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed.',
arg_type=get_enum_type(["None", "Enhanced"]))
c.argument('instant_access_duration_minutes', options_list=['--instant-access-duration-minutes', '--ia-duration'], type=int, help='For snapshots created from Premium SSD v2 or Ultra disk, this property determines the time in minutes the snapshot is retained for instant access to enable faster restore. The disk sku should be UltraSSD_LRS or PremiumV2_LRS')
c.argument('instant_access_duration_minutes', options_list=['--instant-access-duration-minutes', '--ia-duration'], type=int, help='For snapshots created from Premium SSD v2 or Ultra disk, this property determines the time in minutes the snapshot is retained for instant access to enable faster restore. The disk sku should be UltraSSD_LRS or PremiumV2_LRS.')
# endregion

# region Images
Expand Down Expand Up @@ -1520,6 +1520,9 @@ def load_arguments(self, _):
c.argument('source_data_disk_resource', nargs='+', help='Resource Id of the source data disk')
c.argument('data_disk_restore_point_encryption_set', nargs='+', help='Customer managed data disk encryption set resource id')
c.argument('data_disk_restore_point_encryption_type', nargs='+', arg_type=get_enum_type(self.get_models('RestorePointEncryptionType')), help='The type of key used to encrypt the data of the data disk restore point.')
c.argument('instant_access_duration_minutes', options_list=['--instant-access-duration-minutes', '--instant-access-duration', '--ia-duration'], type=int,
help='This property determines the time in minutes the snapshot is retained as instant access for '
'restoring Premium SSD v2 or Ultra disk with fast restore performance in this restore point.')

with self.argument_context('restore-point show') as c:
c.argument('restore_point_name', options_list=['--name', '-n', '--restore-point-name'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
from azure.cli.core.aaz import *


@register_command(
"restore-point create",
)
class Create(AAZCommand):
"""Create the restore point. Updating properties of an existing restore point is not allowed.

:example: Create a restore point
az restore-point create --exclude-disks "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" --resource-group "myResourceGroup" --collection-name "rpcName" --name "rpName"
az restore-point create --exclude-disks "/subscriptions/{subscription-id}/resourceGroups/myResour ceGroup/providers/Microsoft.Compute/disks/disk123" --resource-group "myResourceGroup" --collection-name "rpcName" --name "rpName" --instant-access-duration-minutes 120

:example: Create a restore point with --consistency-mode CrashConsistent
az vm create -n vm -g rg --image UbuntuLTS --tag EnableCrashConsistentRestorePoint=True
Expand All @@ -24,9 +27,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2024-11-01",
"version": "2025-04-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/restorepointcollections/{}/restorepoints/{}", "2024-11-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/restorepointcollections/{}/restorepoints/{}", "2025-04-01"],
]
}

Expand Down Expand Up @@ -82,6 +85,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
# define Arg Group "Properties"

_args_schema = cls._args_schema
_args_schema.instant_access_duration_minutes = AAZIntArg(
options=["--instant-access-duration", "--instant-access-duration-minutes"],
arg_group="Properties",
help="This property determines the time in minutes the snapshot is retained as instant access for restoring Premium SSD v2 or Ultra disk with fast restore performance in this restore point. Range is between 60 and 300. Default is 300.",
)
_args_schema.source_metadata = AAZObjectArg(
options=["--source-metadata"],
arg_group="Properties",
Expand Down Expand Up @@ -340,7 +348,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-11-01",
"api-version", "2025-04-01",
required=True,
),
}
Expand Down Expand Up @@ -371,6 +379,7 @@ def content(self):
if properties is not None:
properties.set_prop("consistencyMode", AAZStrType, ".consistency_mode")
properties.set_prop("excludeDisks", AAZListType, ".exclude_disks")
properties.set_prop("instantAccessDurationMinutes", AAZIntType, ".instant_access_duration_minutes")
properties.set_prop("sourceMetadata", AAZObjectType, ".source_metadata")
_CreateHelper._build_schema_api_entity_reference_create(properties.set_prop("sourceRestorePoint", AAZObjectType, ".source_restore_point"))

Expand Down Expand Up @@ -449,6 +458,9 @@ def _build_schema_on_201(cls):
serialized_name="instanceView",
flags={"read_only": True},
)
properties.instant_access_duration_minutes = AAZIntType(
serialized_name="instantAccessDurationMinutes",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
Expand Down Expand Up @@ -482,6 +494,9 @@ def _build_schema_on_201(cls):
_element.replication_status = AAZObjectType(
serialized_name="replicationStatus",
)
_element.snapshot_access_state = AAZStrType(
serialized_name="snapshotAccessState",
)

replication_status = cls._schema_on_201.properties.instance_view.disk_restore_points.Element.replication_status
replication_status.completion_percent = AAZIntType(
Expand Down Expand Up @@ -756,6 +771,9 @@ def _build_schema_on_201(cls):
)

proxy_agent_settings = cls._schema_on_201.properties.source_metadata.security_profile.proxy_agent_settings
proxy_agent_settings.add_proxy_agent_extension = AAZBoolType(
serialized_name="addProxyAgentExtension",
)
proxy_agent_settings.enabled = AAZBoolType()
proxy_agent_settings.imds = AAZObjectType()
_CreateHelper._build_schema_host_endpoint_settings_read(proxy_agent_settings.imds)
Expand Down Expand Up @@ -803,9 +821,6 @@ def _build_schema_on_201(cls):
serialized_name="diskSizeGB",
flags={"read_only": True},
)
_element.lun = AAZIntType(
flags={"read_only": True},
)
_element.managed_disk = AAZObjectType(
serialized_name="managedDisk",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
from azure.cli.core.aaz import *


@register_command(
"restore-point show",
)
class Show(AAZCommand):
"""Get the restore point.

Expand All @@ -19,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2024-11-01",
"version": "2025-04-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/restorepointcollections/{}/restorepoints/{}", "2024-11-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/restorepointcollections/{}/restorepoints/{}", "2025-04-01"],
]
}

Expand Down Expand Up @@ -135,7 +138,7 @@ def query_parameters(self):
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2024-11-01",
"api-version", "2025-04-01",
required=True,
),
}
Expand Down Expand Up @@ -196,6 +199,9 @@ def _build_schema_on_200(cls):
serialized_name="instanceView",
flags={"read_only": True},
)
properties.instant_access_duration_minutes = AAZIntType(
serialized_name="instantAccessDurationMinutes",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
Expand Down Expand Up @@ -229,6 +235,9 @@ def _build_schema_on_200(cls):
_element.replication_status = AAZObjectType(
serialized_name="replicationStatus",
)
_element.snapshot_access_state = AAZStrType(
serialized_name="snapshotAccessState",
)

replication_status = cls._schema_on_200.properties.instance_view.disk_restore_points.Element.replication_status
replication_status.completion_percent = AAZIntType(
Expand Down Expand Up @@ -503,6 +512,9 @@ def _build_schema_on_200(cls):
)

proxy_agent_settings = cls._schema_on_200.properties.source_metadata.security_profile.proxy_agent_settings
proxy_agent_settings.add_proxy_agent_extension = AAZBoolType(
serialized_name="addProxyAgentExtension",
)
proxy_agent_settings.enabled = AAZBoolType()
proxy_agent_settings.imds = AAZObjectType()
_ShowHelper._build_schema_host_endpoint_settings_read(proxy_agent_settings.imds)
Expand Down Expand Up @@ -550,9 +562,6 @@ def _build_schema_on_200(cls):
serialized_name="diskSizeGB",
flags={"read_only": True},
)
_element.lun = AAZIntType(
flags={"read_only": True},
)
_element.managed_disk = AAZObjectType(
serialized_name="managedDisk",
)
Expand Down
Loading
Loading