Skip to content

Commit 60e7765

Browse files
authored
[Compute] az disk create/update: Add new parameter --supported-security-option to support setting supported security option (#32186)
1 parent ddcd6cd commit 60e7765

25 files changed

+7544
-5913
lines changed

src/azure-cli/azure/cli/command_modules/vm/_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ def load_arguments(self, _):
207207
help="Create the disk for upload scenario. 'Upload' is for Standard disk only upload. 'UploadWithSecurityData' is for OS Disk upload along with VM Guest State. Please note the 'UploadWithSecurityData' is not valid for data disk upload, it only to be used for OS Disk upload at present.")
208208
c.argument('performance_plus', arg_type=get_three_state_flag(), min_api='2022-07-02', help='Set this flag to true to get a boost on the performance target of the disk deployed. This flag can only be set on disk creation time and cannot be disabled after enabled')
209209
c.argument('security_metadata_uri', help='Specify the blob URI to be imported into VM metadata for Confidential VM')
210+
c.argument('action_on_disk_delay', arg_type=get_enum_type(['AutomaticReattach']), help='Determine on how to handle disks with slow I/O.')
211+
c.argument('supported_security_option', options_list=['--supported-security-option', '--security-option'], arg_type=get_enum_type(['TrustedLaunchAndConfidentialVMSupported', 'TrustedLaunchSupported']), help='Refer to the security capability of the disk supported to create a Trusted launch or Confidential VM')
210212
# endregion
211213

212214
# region Snapshots

src/azure-cli/azure/cli/command_modules/vm/aaz/latest/disk/_delete.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class Delete(AAZCommand):
2323
"""
2424

2525
_aaz_info = {
26-
"version": "2023-04-02",
26+
"version": "2025-01-02",
2727
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/disks/{}", "2023-04-02"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/disks/{}", "2025-01-02"],
2929
]
3030
}
3131

@@ -82,7 +82,7 @@ def __call__(self, *args, **kwargs):
8282
session,
8383
self.on_200,
8484
self.on_error,
85-
lro_options={"final-state-via": "azure-async-operation"},
85+
lro_options={"final-state-via": "location"},
8686
path_format_arguments=self.url_parameters,
8787
)
8888
if session.http_response.status_code in [200]:
@@ -91,7 +91,7 @@ def __call__(self, *args, **kwargs):
9191
session,
9292
self.on_200,
9393
self.on_error,
94-
lro_options={"final-state-via": "azure-async-operation"},
94+
lro_options={"final-state-via": "location"},
9595
path_format_arguments=self.url_parameters,
9696
)
9797
if session.http_response.status_code in [204]:
@@ -100,7 +100,7 @@ def __call__(self, *args, **kwargs):
100100
session,
101101
self.on_204,
102102
self.on_error,
103-
lro_options={"final-state-via": "azure-async-operation"},
103+
lro_options={"final-state-via": "location"},
104104
path_format_arguments=self.url_parameters,
105105
)
106106

@@ -119,7 +119,7 @@ def method(self):
119119

120120
@property
121121
def error_format(self):
122-
return "MgmtErrorFormat"
122+
return "ODataV4Format"
123123

124124
@property
125125
def url_parameters(self):
@@ -143,7 +143,7 @@ def url_parameters(self):
143143
def query_parameters(self):
144144
parameters = {
145145
**self.serialize_query_param(
146-
"api-version", "2023-04-02",
146+
"api-version", "2025-01-02",
147147
required=True,
148148
),
149149
}

0 commit comments

Comments
 (0)