@@ -16,9 +16,9 @@ class Create(AAZCommand):
1616 """
1717
1818 _aaz_info = {
19- "version" : "2023-07 -03" ,
19+ "version" : "2024-03 -03" ,
2020 "resources" : [
21- ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/galleries/{}/images/{}/versions/{}" , "2023-07 -03" ],
21+ ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/galleries/{}/images/{}/versions/{}" , "2024-03 -03" ],
2222 ]
2323 }
2424
@@ -86,6 +86,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
8686 arg_group = "Properties" ,
8787 help = "The publishing profile of a gallery image Version." ,
8888 )
89+ _args_schema .restore = AAZBoolArg (
90+ options = ["--restore" ],
91+ arg_group = "Properties" ,
92+ help = "Indicates if this is a soft-delete resource restoration request." ,
93+ )
8994 _args_schema .safety_profile = AAZObjectArg (
9095 options = ["--safety-profile" ],
9196 arg_group = "Properties" ,
@@ -123,7 +128,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
123128 publishing_profile .storage_account_type = AAZStrArg (
124129 options = ["storage-account-type" ],
125130 help = "Specifies the storage account type to be used to store the image. This property is not updatable." ,
126- enum = {"Premium_LRS" : "Premium_LRS" , "Standard_LRS" : "Standard_LRS" , "Standard_ZRS" : "Standard_ZRS" },
131+ enum = {"PremiumV2_LRS" : "PremiumV2_LRS" , " Premium_LRS" : "Premium_LRS" , "Standard_LRS" : "Standard_LRS" , "Standard_ZRS" : "Standard_ZRS" },
127132 )
128133 publishing_profile .target_extended_locations = AAZListArg (
129134 options = ["target-extended-locations" ],
@@ -174,6 +179,10 @@ def _build_arguments_schema(cls, *args, **kwargs):
174179 target_regions .Element = AAZObjectArg ()
175180
176181 _element = cls ._args_schema .publishing_profile .target_regions .Element
182+ _element .additional_replica_sets = AAZListArg (
183+ options = ["additional-replica-sets" ],
184+ help = "List of storage sku with replica count to create direct drive replicas." ,
185+ )
177186 _element .encryption = AAZObjectArg (
178187 options = ["encryption" ],
179188 help = "Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact." ,
@@ -195,14 +204,32 @@ def _build_arguments_schema(cls, *args, **kwargs):
195204 _element .storage_account_type = AAZStrArg (
196205 options = ["storage-account-type" ],
197206 help = "Specifies the storage account type to be used to store the image. This property is not updatable." ,
198- enum = {"Premium_LRS" : "Premium_LRS" , "Standard_LRS" : "Standard_LRS" , "Standard_ZRS" : "Standard_ZRS" },
207+ enum = {"PremiumV2_LRS" : "PremiumV2_LRS" , "Premium_LRS" : "Premium_LRS" , "Standard_LRS" : "Standard_LRS" , "Standard_ZRS" : "Standard_ZRS" },
208+ )
209+
210+ additional_replica_sets = cls ._args_schema .publishing_profile .target_regions .Element .additional_replica_sets
211+ additional_replica_sets .Element = AAZObjectArg ()
212+
213+ _element = cls ._args_schema .publishing_profile .target_regions .Element .additional_replica_sets .Element
214+ _element .regional_replica_count = AAZIntArg (
215+ options = ["regional-replica-count" ],
216+ help = "The number of direct drive replicas of the Image Version to be created.This Property is updatable" ,
217+ )
218+ _element .storage_account_type = AAZStrArg (
219+ options = ["storage-account-type" ],
220+ help = "Specifies the storage account type to be used to create the direct drive replicas" ,
221+ enum = {"PremiumV2_LRS" : "PremiumV2_LRS" , "Premium_LRS" : "Premium_LRS" , "Standard_LRS" : "Standard_LRS" , "Standard_ZRS" : "Standard_ZRS" },
199222 )
200223
201224 safety_profile = cls ._args_schema .safety_profile
202225 safety_profile .allow_deletion_of_replicated_locations = AAZBoolArg (
203226 options = ["allow-deletion-of-replicated-locations" ],
204227 help = "Indicates whether or not removing this Gallery Image Version from replicated regions is allowed." ,
205228 )
229+ safety_profile .block_deletion_before_end_of_life = AAZBoolArg (
230+ options = ["block-deletion-before-end-of-life" ],
231+ help = "Indicates whether or not the deletion is blocked for this Gallery Image Version if its End Of Life has not expired." ,
232+ )
206233
207234 security_profile = cls ._args_schema .security_profile
208235 security_profile .uefi_settings = AAZObjectArg (
@@ -522,7 +549,7 @@ def url_parameters(self):
522549 def query_parameters (self ):
523550 parameters = {
524551 ** self .serialize_query_param (
525- "api-version" , "2023-07 -03" ,
552+ "api-version" , "2024-03 -03" ,
526553 required = True ,
527554 ),
528555 }
@@ -554,6 +581,7 @@ def content(self):
554581 properties = _builder .get (".properties" )
555582 if properties is not None :
556583 properties .set_prop ("publishingProfile" , AAZObjectType , ".publishing_profile" )
584+ properties .set_prop ("restore" , AAZBoolType , ".restore" )
557585 properties .set_prop ("safetyProfile" , AAZObjectType , ".safety_profile" )
558586 properties .set_prop ("securityProfile" , AAZObjectType , ".security_profile" )
559587 properties .set_prop ("storageProfile" , AAZObjectType , ".storage_profile" , typ_kwargs = {"flags" : {"required" : True }})
@@ -591,15 +619,26 @@ def content(self):
591619
592620 _elements = _builder .get (".properties.publishingProfile.targetRegions[]" )
593621 if _elements is not None :
622+ _elements .set_prop ("additionalReplicaSets" , AAZListType , ".additional_replica_sets" )
594623 _CreateHelper ._build_schema_encryption_images_create (_elements .set_prop ("encryption" , AAZObjectType , ".encryption" ))
595624 _elements .set_prop ("excludeFromLatest" , AAZBoolType , ".exclude_from_latest" )
596625 _elements .set_prop ("name" , AAZStrType , ".name" , typ_kwargs = {"flags" : {"required" : True }})
597626 _elements .set_prop ("regionalReplicaCount" , AAZIntType , ".regional_replica_count" )
598627 _elements .set_prop ("storageAccountType" , AAZStrType , ".storage_account_type" )
599628
629+ additional_replica_sets = _builder .get (".properties.publishingProfile.targetRegions[].additionalReplicaSets" )
630+ if additional_replica_sets is not None :
631+ additional_replica_sets .set_elements (AAZObjectType , "." )
632+
633+ _elements = _builder .get (".properties.publishingProfile.targetRegions[].additionalReplicaSets[]" )
634+ if _elements is not None :
635+ _elements .set_prop ("regionalReplicaCount" , AAZIntType , ".regional_replica_count" )
636+ _elements .set_prop ("storageAccountType" , AAZStrType , ".storage_account_type" )
637+
600638 safety_profile = _builder .get (".properties.safetyProfile" )
601639 if safety_profile is not None :
602640 safety_profile .set_prop ("allowDeletionOfReplicatedLocations" , AAZBoolType , ".allow_deletion_of_replicated_locations" )
641+ safety_profile .set_prop ("blockDeletionBeforeEndOfLife" , AAZBoolType , ".block_deletion_before_end_of_life" )
603642
604643 security_profile = _builder .get (".properties.securityProfile" )
605644 if security_profile is not None :
@@ -852,6 +891,7 @@ def _build_schema_gallery_image_version_read(cls, _schema):
852891 serialized_name = "replicationStatus" ,
853892 flags = {"read_only" : True },
854893 )
894+ properties .restore = AAZBoolType ()
855895 properties .safety_profile = AAZObjectType (
856896 serialized_name = "safetyProfile" ,
857897 )
@@ -862,6 +902,10 @@ def _build_schema_gallery_image_version_read(cls, _schema):
862902 serialized_name = "storageProfile" ,
863903 flags = {"required" : True },
864904 )
905+ properties .validations_profile = AAZObjectType (
906+ serialized_name = "validationsProfile" ,
907+ flags = {"read_only" : True },
908+ )
865909
866910 publishing_profile = _schema_gallery_image_version_read .properties .publishing_profile
867911 publishing_profile .end_of_life_date = AAZStrType (
@@ -915,6 +959,9 @@ def _build_schema_gallery_image_version_read(cls, _schema):
915959 target_regions .Element = AAZObjectType ()
916960
917961 _element = _schema_gallery_image_version_read .properties .publishing_profile .target_regions .Element
962+ _element .additional_replica_sets = AAZListType (
963+ serialized_name = "additionalReplicaSets" ,
964+ )
918965 _element .encryption = AAZObjectType ()
919966 cls ._build_schema_encryption_images_read (_element .encryption )
920967 _element .exclude_from_latest = AAZBoolType (
@@ -930,6 +977,17 @@ def _build_schema_gallery_image_version_read(cls, _schema):
930977 serialized_name = "storageAccountType" ,
931978 )
932979
980+ additional_replica_sets = _schema_gallery_image_version_read .properties .publishing_profile .target_regions .Element .additional_replica_sets
981+ additional_replica_sets .Element = AAZObjectType ()
982+
983+ _element = _schema_gallery_image_version_read .properties .publishing_profile .target_regions .Element .additional_replica_sets .Element
984+ _element .regional_replica_count = AAZIntType (
985+ serialized_name = "regionalReplicaCount" ,
986+ )
987+ _element .storage_account_type = AAZStrType (
988+ serialized_name = "storageAccountType" ,
989+ )
990+
933991 replication_status = _schema_gallery_image_version_read .properties .replication_status
934992 replication_status .aggregated_state = AAZStrType (
935993 serialized_name = "aggregatedState" ,
@@ -960,6 +1018,9 @@ def _build_schema_gallery_image_version_read(cls, _schema):
9601018 safety_profile .allow_deletion_of_replicated_locations = AAZBoolType (
9611019 serialized_name = "allowDeletionOfReplicatedLocations" ,
9621020 )
1021+ safety_profile .block_deletion_before_end_of_life = AAZBoolType (
1022+ serialized_name = "blockDeletionBeforeEndOfLife" ,
1023+ )
9631024 safety_profile .policy_violations = AAZListType (
9641025 serialized_name = "policyViolations" ,
9651026 flags = {"read_only" : True },
@@ -1057,6 +1118,39 @@ def _build_schema_gallery_image_version_read(cls, _schema):
10571118 serialized_name = "virtualMachineId" ,
10581119 )
10591120
1121+ validations_profile = _schema_gallery_image_version_read .properties .validations_profile
1122+ validations_profile .executed_validations = AAZListType (
1123+ serialized_name = "executedValidations" ,
1124+ )
1125+ validations_profile .platform_attributes = AAZListType (
1126+ serialized_name = "platformAttributes" ,
1127+ )
1128+ validations_profile .validation_etag = AAZStrType (
1129+ serialized_name = "validationEtag" ,
1130+ )
1131+
1132+ executed_validations = _schema_gallery_image_version_read .properties .validations_profile .executed_validations
1133+ executed_validations .Element = AAZObjectType ()
1134+
1135+ _element = _schema_gallery_image_version_read .properties .validations_profile .executed_validations .Element
1136+ _element .execution_time = AAZStrType (
1137+ serialized_name = "executionTime" ,
1138+ )
1139+ _element .status = AAZStrType ()
1140+ _element .type = AAZStrType ()
1141+ _element .version = AAZStrType ()
1142+
1143+ platform_attributes = _schema_gallery_image_version_read .properties .validations_profile .platform_attributes
1144+ platform_attributes .Element = AAZObjectType ()
1145+
1146+ _element = _schema_gallery_image_version_read .properties .validations_profile .platform_attributes .Element
1147+ _element .name = AAZStrType (
1148+ flags = {"read_only" : True },
1149+ )
1150+ _element .value = AAZStrType (
1151+ flags = {"read_only" : True },
1152+ )
1153+
10601154 tags = _schema_gallery_image_version_read .tags
10611155 tags .Element = AAZStrType ()
10621156
0 commit comments