Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2a82e66
Generate aaz code for capacity reservation group
william051200 Aug 10, 2026
3dfc19b
agent gen code v1
william051200 Aug 10, 2026
adc4c52
Revert extra change
william051200 Aug 10, 2026
e29de3b
Generate aaz code for 2026-04-01 vm operations
william051200 Aug 11, 2026
ff056ca
agent gen code v2, trim away some gen code
william051200 Aug 11, 2026
61223b1
Add test case
william051200 Aug 11, 2026
692540a
Gen latest aaz code
william051200 Aug 13, 2026
525cd8b
Update command param option
william051200 Aug 14, 2026
114be02
Update test case
william051200 Aug 14, 2026
6f88cce
Update test case
william051200 Aug 14, 2026
5f196e1
Generate capacity reservation show 2026-04-01 aaz
william051200 Aug 17, 2026
09d8a7f
Update help message
william051200 Aug 17, 2026
e165afd
Update param option
william051200 Aug 17, 2026
e86e15d
Update recording version
william051200 Aug 17, 2026
ebca1fe
Update recording version
william051200 Aug 17, 2026
7c13e25
Update recording version
william051200 Aug 17, 2026
382d158
Update recording version
william051200 Aug 19, 2026
5924920
Merge remote-tracking branch 'origin/dev' into ocr
william051200 Aug 19, 2026
af722ad
Generate aaz code
william051200 Aug 19, 2026
2800e36
Generate aaz vmss 2026-04-01
william051200 Aug 19, 2026
451a365
Update code to support vmss disable capacity reservation assignment a…
william051200 Aug 19, 2026
8684881
Add validation handling and missing snake-case conversion
william051200 Aug 19, 2026
987bb69
Add handling for disbabling capacity reservation in vmss instance
william051200 Aug 19, 2026
e3a6678
Update recording version
william051200 Aug 19, 2026
faceaa7
Update recording version
william051200 Aug 19, 2026
d660a18
Update recording version
william051200 Aug 19, 2026
e3337f2
Update recording version
william051200 Aug 20, 2026
1a45a86
Update recording version
william051200 Aug 20, 2026
b5148b4
Update recording version
william051200 Aug 20, 2026
b34db07
Fix aaz resource ID type
william051200 Aug 20, 2026
8b52f11
Merge branch 'ocr' into vmss-ocr
william051200 Aug 20, 2026
162e66b
Update recording version
william051200 Aug 21, 2026
e04da8c
Merge remote-tracking branch 'origin/dev' into vmss-ocr
william051200 Aug 21, 2026
f60d1bc
Update test case and record test case
william051200 Aug 21, 2026
43dea37
Merge remote-tracking branch 'origin/dev' into vmss-ocr
william051200 Aug 21, 2026
4f25d0b
Update recording version
william051200 Aug 21, 2026
cf3cb7d
Update recording version
william051200 Aug 21, 2026
ba51c04
Update recording version
william051200 Aug 21, 2026
00a93f6
Update recording version
william051200 Aug 21, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ interactions:
User-Agent:
- AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmss1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ interactions:
User-Agent:
- AZURECLI/2.60.0 azsdk-python-core/1.30.1 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmss1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ interactions:
User-Agent:
- AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_predictive_policy000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_predictive_policy000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmss1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_predictive_policy000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ interactions:
User-Agent:
- AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_recurring000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_recurring000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmss1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_recurring000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ interactions:
User-Agent:
- AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_refine000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_refine000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmss1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_refine000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ interactions:
User-Agent:
- AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_rule_with_dimensions000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_rule_with_dimensions000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmss1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_rule_with_dimensions000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ interactions:
User-Agent:
- AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_rules000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_rules000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmss1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_rules000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ interactions:
User-Agent:
- AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_show_predictive_metric000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_show_predictive_metric000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmss1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_show_predictive_metric000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ interactions:
User-Agent:
- AZURECLI/2.86.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmssForPcap\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap\",\r\n
Expand Down Expand Up @@ -6118,7 +6118,7 @@ interactions:
User-Agent:
- AZURECLI/2.86.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmssForPcap\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap\",\r\n
Expand Down Expand Up @@ -6322,7 +6322,7 @@ interactions:
User-Agent:
- AZURECLI/2.86.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmssForPcap\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap\",\r\n
Expand Down Expand Up @@ -6409,7 +6409,7 @@ interactions:
User-Agent:
- AZURECLI/2.86.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmssForPcap\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap\",\r\n
Expand Down Expand Up @@ -6718,7 +6718,7 @@ interactions:
User-Agent:
- AZURECLI/2.86.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmssForPcap\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap\",\r\n
Expand Down Expand Up @@ -7028,7 +7028,7 @@ interactions:
User-Agent:
- AZURECLI/2.86.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2025-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap?api-version=2026-04-01
response:
body:
string: "{\r\n \"name\": \"vmssForPcap\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture_vmss_as_target000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmssForPcap\",\r\n
Expand Down
5 changes: 5 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 @@ -2306,6 +2306,9 @@
- name: Create a VMSS from community gallery image.
text: >
az vmss create -n MyVmss -g MyResourceGroup --image /CommunityGalleries/{gallery_unique_name}/Images/{image}/Versions/{version}
- name: Create a VMSS that is not associated with any capacity reservation.
text: >
az vmss create -n MyVmss -g MyResourceGroup --image Ubuntu2204 --disable-capacity-reservation-assignment true
- name: Create a Windows VMSS with patch mode 'Manual' (Currently patch mode 'AutomaticByPlatform' is not supported during VMSS creation as health extension which is required for 'AutomaticByPlatform' mode cannot be set during VMSS creation).
text: >
az vmss create -n MyVmss -g MyResourceGroup --image Win2019Datacenter --enable-agent --enable-auto-update false --patch-mode Manual --orchestration-mode Flexible
Expand Down Expand Up @@ -2859,6 +2862,8 @@
text: >
az vmss update -n MyVmss -g MyResourceGroup --security-posture-reference-id /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{version} \\
--security-posture-reference-exclude-extensions "c:\\tmp\\exclude_extensions.json"
- name: Opt out a VMSS from being associated with any capacity reservation.
text: az vmss update -n MyVmss -g MyResourceGroup --disable-capacity-reservation-assignment true
"""

helps['vmss update-instances'] = """
Expand Down
3 changes: 3 additions & 0 deletions src/azure-cli/azure/cli/command_modules/vm/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,9 @@ def load_arguments(self, _):
c.argument('enable_automatic_zone_balancing', arg_type=get_three_state_flag(), options_list=['--enable-automatic-zone-balancing', '--enable-zone-balancing'], help='Specify whether automatic AZ balancing should be enabled on the virtualmachine scale set.')
c.argument('automatic_zone_balancing_strategy', arg_type=get_enum_type(AutomaticZoneBalancingStrategy), options_list=['--automatic-zone-balancing-strategy', '--balancing-strategy'], help='Type of rebalance strategy that will be used for rebalancing virtualmachines in the scale set across availability zones.')
c.argument('automatic_zone_balancing_behavior', arg_type=get_enum_type(AutomaticZoneBalancingBehavior), options_list=['--automatic-zone-balancing-behavior', '--balancing-behavior'], help='Type of rebalance behavior that will be used for recreating virtualmachines in the scale set across availability zones.')
c.argument('disable_capacity_reservation_assignment', arg_type=get_three_state_flag(),
options_list=['--disable-capacity-reservation-assignment', '--no-cap-reservation'],
help='Specifies whether the virtual machine scale set is explicitly opted out from being associated with any capacity reservation. When set to true, its virtual machines will not be allowed to implicitly or explicitly associate with any type of capacity reservation and will consume publicly available capacity. This option applies to the parent VMSS only.')

with self.argument_context('vmss update') as c:
c.argument('instance_id', id_part='child_name_1', help="Update the VM instance with this ID. If missing, update the VMSS.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,7 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro
enable_cross_zone_upgrade=None, prioritize_unhealthy_instances=None, edge_zone=None,
orchestration_mode=None, user_data=None, network_api_version=None,
enable_spot_restore=None, spot_restore_timeout=None, capacity_reservation_group=None,
disable_capacity_reservation_assignment=None,
enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None,
enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, v_cpus_available=None,
v_cpus_per_core=None, os_disk_security_encryption_type=None,
Expand Down Expand Up @@ -1679,12 +1680,15 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro
if network_profile:
virtual_machine_profile['networkProfile'] = network_profile

if capacity_reservation_group:
virtual_machine_profile['capacityReservation'] = {
'capacityReservationGroup': {
if capacity_reservation_group or disable_capacity_reservation_assignment is not None:
virtual_machine_profile['capacityReservation'] = {}
if capacity_reservation_group:
virtual_machine_profile['capacityReservation']['capacityReservationGroup'] = {
'id': capacity_reservation_group
}
}
if disable_capacity_reservation_assignment is not None:
virtual_machine_profile['capacityReservation']['disableCapacityReservationAssignment'] = \
disable_capacity_reservation_assignment

if security_posture_reference_id:
virtual_machine_profile['securityPostureReference'] = {
Expand Down Expand Up @@ -1741,7 +1745,7 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro
'name': name,
'location': location,
'tags': tags,
'apiVersion': '2025-11-01',
'apiVersion': '2026-04-01',
'dependsOn': [],
'properties': vmss_properties
}
Expand Down
9 changes: 9 additions & 0 deletions src/azure-cli/azure/cli/command_modules/vm/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,6 +1951,10 @@ def process_vmss_create_namespace(cmd, namespace):


def validate_vmss_update_namespace(cmd, namespace): # pylint: disable=unused-argument
if namespace.instance_id and namespace.disable_capacity_reservation_assignment is not None:
raise MutuallyExclusiveArgumentError(
"--disable-capacity-reservation-assignment applies to the parent VMSS and cannot be used with "
"--instance-id")
if not namespace.instance_id:
if namespace.protect_from_scale_in is not None or namespace.protect_from_scale_set_actions is not None:
raise CLIError("usage error: protection policies can only be applied to VM instances within a VMSS."
Expand Down Expand Up @@ -2827,6 +2831,11 @@ def validate_edge_zone(cmd, namespace): # pylint: disable=unused-argument


def _validate_capacity_reservation_group(cmd, namespace):
if getattr(namespace, 'capacity_reservation_group', None) is not None and \
getattr(namespace, 'disable_capacity_reservation_assignment', None) is not None:
raise MutuallyExclusiveArgumentError(
"You can only specify one of --capacity-reservation-group and "
"--disable-capacity-reservation-assignment")

if namespace.capacity_reservation_group and namespace.capacity_reservation_group != 'None':

Expand Down
Loading
Loading