From 86ac2ad582353993647ab36cf52ba4701073c47f Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 13 Mar 2026 13:12:58 +0800 Subject: [PATCH 001/103] Add C# client customizations for Compute TypeSpec migration - Add @azure-typespec/http-client-csharp-mgmt emitter config with namespace - Add 24 @@clientName decorators in Compute/client.tsp for backward compat - Create ComputeGallery/client.tsp with SharedToValues -> SharedToValue rename - Update root client.tsp to import ComputeGallery/client.tsp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 64 +++++++++++++++++++ .../Compute/ComputeGallery/client.tsp | 8 +++ .../Microsoft.Compute/Compute/client.tsp | 2 +- .../Microsoft.Compute/Compute/tspconfig.yaml | 3 + 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 3f8e12c3805b..a832ac4e815a 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -178,3 +178,67 @@ using Compute; "publicIpAllocationMethod", "java" ); + +// C# model renames — preserve backward compatibility during TypeSpec migration + +// VM sub-model renames: prefix with "VirtualMachine" to match old C# names +@@clientName(DataDisk, "VirtualMachineDataDisk", "csharp"); +@@clientName(HardwareProfile, "VirtualMachineHardwareProfile", "csharp"); +@@clientName(NetworkProfile, "VirtualMachineNetworkProfile", "csharp"); +@@clientName(OSProfile, "VirtualMachineOSProfile", "csharp"); +@@clientName(StorageProfile, "VirtualMachineStorageProfile", "csharp"); +@@clientName(ManagedDiskParameters, "VirtualMachineManagedDisk", "csharp"); + +// VMSS sub-model renames +@@clientName(UpgradePolicy, "VirtualMachineScaleSetUpgradePolicy", "csharp"); +@@clientName(PriorityMixPolicy, + "VirtualMachineScaleSetPriorityMixPolicy", + "csharp" +); + +// Enum singular←plural renames +@@clientName(CachingTypes, "CachingType", "csharp"); +@@clientName(DiskCreateOptionTypes, "DiskCreateOptionType", "csharp"); +@@clientName(DiskDeleteOptionTypes, "DiskDeleteOptionType", "csharp"); +@@clientName(DiskDetachOptionTypes, "DiskDetachOptionType", "csharp"); + +// RP-prefix renames +@@clientName(Plan, "ComputePlan", "csharp"); +@@clientName(SkuProfile, "ComputeSkuProfile", "csharp"); +@@clientName(UpdateResource, "ComputeResourcePatch", "csharp"); + +// Base type rename +@@clientName(VirtualMachineImageResource, "VirtualMachineImageBase", "csharp"); + +// Long enum/type renames +@@clientName(ExpandTypesForGetCapacityReservationGroups, + "CapacityReservationGroupGetExpand", + "csharp" +); + +// VM→Vm casing renames (old C# convention used lowercase "Vm") +@@clientName(VirtualMachineScaleSetVMInstanceIDs, + "VirtualMachineScaleSetVmInstanceIds", + "csharp" +); +@@clientName(ResilientVMDeletionStatus, "ResilientVmDeletionStatus", "csharp"); +@@clientName(LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + "LinuxVmGuestPatchAutomaticByPlatformRebootSetting", + "csharp" +); +@@clientName(WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + "WindowsVmGuestPatchAutomaticByPlatformRebootSetting", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMInstanceView, + "VirtualMachineScaleSetVmInstanceView", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMProperties, + "VirtualMachineScaleSetVmProperties", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMProtectionPolicy, + "VirtualMachineScaleSetVmProtectionPolicy", + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp new file mode 100644 index 000000000000..1059b8714f81 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -0,0 +1,8 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using ComputeGallery; + +// C# enum singular←plural rename +@@clientName(SharedToValues, "SharedToValue", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 4fd46c4dc6a6..712337ace7ae 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -1,7 +1,7 @@ import "@azure-tools/typespec-client-generator-core"; import "./Compute/client.tsp"; import "./ComputeDisk/client.tsp"; -import "./ComputeGallery/main.tsp"; +import "./ComputeGallery/client.tsp"; import "./ComputeSku/main.tsp"; using Azure.ClientGenerator.Core; diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/tspconfig.yaml b/specification/compute/resource-manager/Microsoft.Compute/Compute/tspconfig.yaml index ab8dc2026a09..516daa79b916 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/tspconfig.yaml +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/tspconfig.yaml @@ -10,6 +10,9 @@ options: output-file: "{version-status}/{version}/ComputeRP.json" arm-types-dir: "{project-root}/../../../../common-types/resource-management" examples-dir: "{project-root}/examples" + "@azure-typespec/http-client-csharp-mgmt": + namespace: "Azure.ResourceManager.Compute" + emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" "@azure-tools/typespec-go": service-dir: "sdk/resourcemanager/compute" emitter-output-dir: "{output-dir}/{service-dir}/armcompute" From a57f658748275d20a583397c5286df1d0f458e62 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Sat, 14 Mar 2026 00:03:32 +0800 Subject: [PATCH 002/103] Add C# clientName decorators for operation group collision resolution - Renamed EdgeZone operations to avoid CollectionResult name collisions with non-EdgeZone counterparts (listPublishers, listOffers, listSkus, etc.) - Renamed VirtualMachineImages, Usage, VirtualMachineSizes, RunCommands, and LogAnalytics operations to match old API names Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index a832ac4e815a..48f8014a117f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -179,6 +179,98 @@ using Compute; "java" ); +// C# operation location fixes — resolve collection result name collisions +// Both "list" and "listAll" on the same interface get mapped to "GetAll", +// causing duplicate CollectionResult type names. Move "listAll" to a separate +// interface so each gets a unique collection result type name. +@@clientLocation(VirtualMachineScaleSets.listAll, + "VirtualMachineScaleSetsSubscription", + "csharp" +); +@@clientLocation(VirtualMachines.listAll, + "VirtualMachinesSubscription", + "csharp" +); +@@clientLocation(RestorePointCollections.listAll, + "RestorePointCollectionsSubscription", + "csharp" +); + +// C# operation renames — OperationGroup operations with colliding names on the +// same mockable resource scope need unique C# method names. +// VirtualMachineImagesEdgeZoneOperationGroup ops renamed to old API names. +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listPublishers, + "GetPublishersVirtualMachineImagesEdgeZones", + "csharp" +); +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listOffers, + "GetOffersVirtualMachineImagesEdgeZones", + "csharp" +); +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listSkus, + "GetVirtualMachineImageEdgeZoneSkus", + "csharp" +); +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.list, + "GetVirtualMachineImagesEdgeZones", + "csharp" +); +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.get, + "GetVirtualMachineImagesEdgeZone", + "csharp" +); +// VirtualMachineImagesOperationGroup ops renamed to old API names. +@@clientName(VirtualMachineImagesOperationGroup.listPublishers, + "GetVirtualMachineImagePublishers", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.listOffers, + "GetVirtualMachineImageOffers", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.listSkus, + "GetVirtualMachineImageSkus", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.list, + "GetVirtualMachineImages", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.get, + "GetVirtualMachineImage", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.listByEdgeZone, + "GetVirtualMachineImagesByEdgeZone", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.listWithProperties, + "GetVirtualMachineImagesWithProperties", + "csharp" +); +// Other OperationGroup ops renamed to old API names. +@@clientName(UsageOperationGroup.list, "GetUsages", "csharp"); +@@clientName(VirtualMachineSizesOperationGroup.list, + "GetVirtualMachineSizes", + "csharp" +); +@@clientName(VirtualMachineRunCommandsOperationGroup.list, + "GetVirtualMachineRunCommands", + "csharp" +); +@@clientName(VirtualMachineRunCommandsOperationGroup.get, + "GetVirtualMachineRunCommand", + "csharp" +); +@@clientName(LogAnalyticsOperationGroup.exportThrottledRequests, + "ExportLogAnalyticsThrottledRequests", + "csharp" +); +@@clientName(LogAnalyticsOperationGroup.exportRequestRateByInterval, + "ExportLogAnalyticsRequestRateByInterval", + "csharp" +); + // C# model renames — preserve backward compatibility during TypeSpec migration // VM sub-model renames: prefix with "VirtualMachine" to match old C# names From 7db9cbb5171d6677300d193a83f39ad4fcbea8d8 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Sat, 14 Mar 2026 19:16:11 +0800 Subject: [PATCH 003/103] Add RollingUpgrade @@clientName and additional C# client customizations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 148 ++++++++++++++++++ .../Compute/ComputeDisk/client.tsp | 7 + .../Compute/ComputeGallery/client.tsp | 76 +++++++++ 3 files changed, 231 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 48f8014a117f..79f6dd9f5626 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -2,6 +2,7 @@ import "./main.tsp"; import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; +using Common; using Compute; @@clientName(NetworkApiVersion.`2020-11-01`, "TwoThousandTwenty1101", "go"); @@ -334,3 +335,150 @@ using Compute; "VirtualMachineScaleSetVmProtectionPolicy", "csharp" ); + +// ── Type renames for backward compatibility (migration from AutoRest) ── + +// Enum/union plural→singular renames +@@clientName(ArchitectureTypes, "ArchitectureType", "csharp"); +@@clientName(ConsistencyModeTypes, "ConsistencyModeType", "csharp"); +@@clientName(DedicatedHostLicenseTypes, "DedicatedHostLicenseType", "csharp"); +@@clientName(OperatingSystemStateTypes, "OperatingSystemStateType", "csharp"); +@@clientName(OrchestrationServiceNames, "OrchestrationServiceName", "csharp"); +@@clientName(VirtualMachineEvictionPolicyTypes, + "VirtualMachineEvictionPolicyType", + "csharp" +); +@@clientName(VirtualMachinePriorityTypes, + "VirtualMachinePriorityType", + "csharp" +); +@@clientName(VirtualMachineScaleSetScaleInRules, + "VirtualMachineScaleSetScaleInRule", + "csharp" +); +@@clientName(VMGuestPatchClassificationLinux, + "VmGuestPatchClassificationForLinux", + "csharp" +); +@@clientName(VMGuestPatchClassificationWindows, + "VmGuestPatchClassificationForWindows", + "csharp" +); + +// Model casing renames +@@clientName(DedicatedHostAllocatableVM, + "DedicatedHostAllocatableVm", + "csharp" +); + +// Resource type VM→Vm casing renames (backward compat with AutoRest output) +@@clientName(VirtualMachineScaleSetVM, "VirtualMachineScaleSetVm", "csharp"); +@@clientName(VirtualMachineScaleSetVMExtension, + "VirtualMachineScaleSetVmExtension", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMNetworkProfileConfiguration, + "VirtualMachineScaleSetVmNetworkProfileConfiguration", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMInstanceRequiredIDs, + "VirtualMachineScaleSetVmInstanceRequiredIds", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMExtensionsSummary, + "VirtualMachineScaleSetVmExtensionsSummary", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMReimageParameters, + "VirtualMachineScaleSetVmReimageContent", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMExtensionUpdate, + "VirtualMachineScaleSetVmExtensionPatch", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMExtensionsListResult, + "VirtualMachineScaleSetVmExtensionsListResult", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMListResult, + "VirtualMachineScaleSetVmListResult", + "csharp" +); + +// RP-prefix renames (old AutoRest prepend-rp-prefix convention) +@@clientName(ApiError, "ComputeApiError", "csharp"); +@@clientName(Placement, "VirtualMachinePlacement", "csharp"); +@@clientName(ScheduledEventsProfile, "ComputeScheduledEventsProfile", "csharp"); +@@clientName(SubResourceWithColocationStatus, + "ComputeSubResourceDataWithColocationStatus", + "csharp" +); +@@clientName(UsageName, "ComputeUsageName", "csharp"); +@@clientName(OperatingSystemType, "SupportedOperatingSystemType", "csharp"); +@@clientName(ReservationType, "CapacityReservationType", "csharp"); +@@clientName(ApiErrorBase, "ComputeApiErrorBase", "csharp"); +@@clientName(VMGalleryApplication, + "VirtualMachineGalleryApplication", + "csharp" +); +@@clientName(NetworkInterfaceReference, + "VirtualMachineNetworkInterfaceReference", + "csharp" +); +@@clientName(SkuProfileVMSize, "ComputeSkuProfileVmSize", "csharp"); +@@clientName(VirtualMachineScaleSetVMProfile, + "VirtualMachineScaleSetVmProfile", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateVMProfile, + "VirtualMachineScaleSetUpdateVmProfile", + "csharp" +); + +// Accessibility overrides (types generated as internal that should be public) +@@access(VirtualMachineScaleSetVMProfile, Access.public, "csharp"); +@@access(VirtualMachineScaleSetProperties, Access.public, "csharp"); +@@access(VirtualMachineScaleSetUpdateVMProfile, Access.public, "csharp"); +@@access(VirtualMachineScaleSetVMProperties, Access.public, "csharp"); + +// Rename listByLocation operations to avoid name collision (both map to GetByLocation) +@@clientName(VirtualMachinesOperationGroup.listByLocation, + "GetVirtualMachinesByLocation", + "csharp" +); +@@clientName(VirtualMachineScaleSetsOperationGroup.listByLocation, + "GetVirtualMachineScaleSetsByLocation", + "csharp" +); + +// Rename extension property "type" to avoid conflict with base class "Type" property +@@clientName(VirtualMachineScaleSetExtensionProperties.type, + "ExtensionType", + "csharp" +); +@@clientName(VirtualMachineExtensionProperties.type, "ExtensionType", "csharp"); +@@clientName(VirtualMachineExtensionUpdateProperties.type, + "ExtensionType", + "csharp" +); + +// Rename duplicate automaticallyApprove in sub-models to avoid flattening collision +@@clientName(UserInitiatedRedeploy.automaticallyApprove, + "AutomaticallyApproveRedeploy", + "csharp" +); +@@clientName(AllInstancesDown.automaticallyApprove, + "AutomaticallyApproveAllDown", + "csharp" +); + +// Resource type rename for backward compatibility - RollingUpgradeStatusInfo → VirtualMachineScaleSetRollingUpgrade +@@clientName(RollingUpgradeStatusInfo, + "VirtualMachineScaleSetRollingUpgrade", + "csharp" +); +@@clientName(RollingUpgradeStatusInfoProperties, + "VirtualMachineScaleSetRollingUpgradeProperties", + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 41eaed20925b..b1b09844256d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -31,3 +31,10 @@ using ComputeDisk; "getSecureVMGuestStateSas", "java" ); + +// C# renames for backward compatibility (migration from AutoRest) +@@clientName(CreationData, "DiskCreationData", "csharp"); +@@clientName(FileFormat, "DiskImageFileFormat", "csharp"); +@@clientName(PublicNetworkAccess, "DiskPublicNetworkAccess", "csharp"); +@@clientName(EncryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(Encryption, "DiskEncryption", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 1059b8714f81..773d291cd5ec 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -6,3 +6,79 @@ using ComputeGallery; // C# enum singular←plural rename @@clientName(SharedToValues, "SharedToValue", "csharp"); + +// C# renames for backward compatibility (migration from AutoRest) +@@clientName(UserArtifactManage, "UserArtifactManagement", "csharp"); +@@clientName(ValidationsProfile, "GalleryImageValidationsProfile", "csharp"); +@@clientName(PolicyViolation, "GalleryImageVersionPolicyViolation", "csharp"); +@@clientName(ReplicationMode, "GalleryReplicationMode", "csharp"); +@@clientName(PlatformAttribute, "ComputeGalleryPlatformAttribute", "csharp"); +@@clientName(ExecutedValidation, "GalleryImageExecutedValidation", "csharp"); +@@clientName(ValidationStatus, "ComputeGalleryValidationStatus", "csharp"); +@@clientName(GallerySharingPermissionTypes, + "GallerySharingPermissionType", + "csharp" +); + +// Accessibility overrides +@@access(CommunityGalleryIdentifier, Access.public, "csharp"); +@@access(CommunityGalleryImageIdentifier, Access.public, "csharp"); +@@access(SharedGalleryIdentifier, Access.public, "csharp"); + +// Resource type InVM→InVm casing renames (backward compat with AutoRest output) +@@clientName(GalleryInVMAccessControlProfile, + "GalleryInVmAccessControlProfile", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileVersion, + "GalleryInVmAccessControlProfileVersion", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileProperties, + "GalleryInVmAccessControlProfileProperties", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileUpdate, + "GalleryInVmAccessControlProfilePatch", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileVersionProperties, + "GalleryInVmAccessControlProfileVersionProperties", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileVersionUpdate, + "GalleryInVmAccessControlProfileVersionPatch", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileList, + "GalleryInVmAccessControlProfileList", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileVersionList, + "GalleryInVmAccessControlProfileVersionList", + "csharp" +); + +// AccessControlRules and EndpointAccess renames (backward compat with AutoRest RP-prefix) +@@clientName(AccessControlRules, "GalleryInVmAccessControlRules", "csharp"); +@@clientName(AccessControlRulesMode, + "GalleryInVmAccessControlRulesMode", + "csharp" +); +@@clientName(AccessControlRulesPrivilege, + "GalleryInVmAccessControlRulesPrivilege", + "csharp" +); +@@clientName(AccessControlRulesRole, + "GalleryInVmAccessControlRulesRole", + "csharp" +); +@@clientName(AccessControlRulesIdentity, + "GalleryInVmAccessControlRulesIdentity", + "csharp" +); +@@clientName(AccessControlRulesRoleAssignment, + "GalleryInVmAccessControlRulesRoleAssignment", + "csharp" +); +@@clientName(EndpointAccess, "ComputeGalleryEndpointAccess", "csharp"); From a25b3c7b7012c6d94e230189e9ec5c890598e239 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 31 Mar 2026 15:18:18 +0800 Subject: [PATCH 004/103] =?UTF-8?q?Add=20@@alternateType=20for=20CommonTyp?= =?UTF-8?q?es=20v3=20Resource.id=20=E2=86=92=20armResourceIdentifier=20(cs?= =?UTF-8?q?harp)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Microsoft.Compute/Compute/Compute/client.tsp | 7 +++++++ .../resource-manager/Microsoft.Compute/Compute/client.tsp | 1 + 2 files changed, 8 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 79f6dd9f5626..2b4185f986e7 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -5,6 +5,13 @@ using Azure.ClientGenerator.Core; using Common; using Compute; +// CommonTypes v3 defines Resource.id as string, but the .NET SDK base classes +// (ResourceData/TrackedResourceData) expect ResourceIdentifier. Override for csharp. +@@alternateType(Azure.ResourceManager.CommonTypes.Resource.id, + Azure.Core.armResourceIdentifier, + "csharp" +); + @@clientName(NetworkApiVersion.`2020-11-01`, "TwoThousandTwenty1101", "go"); @@clientName(NetworkApiVersion.`2022-11-01`, "TwoThousandTwentyTwo1101", "go"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 712337ace7ae..be30f51c4d86 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -5,6 +5,7 @@ import "./ComputeGallery/client.tsp"; import "./ComputeSku/main.tsp"; using Azure.ClientGenerator.Core; + /** * Compute Client */ From ba0a19206edd3941d9454744cc2816e81fc0d329 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 31 Mar 2026 15:25:03 +0800 Subject: [PATCH 005/103] Add StorageAccountType -> ImageStorageAccountType csharp rename --- .../Microsoft.Compute/Compute/ComputeGallery/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 773d291cd5ec..3c1f73e5d8e6 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -12,6 +12,7 @@ using ComputeGallery; @@clientName(ValidationsProfile, "GalleryImageValidationsProfile", "csharp"); @@clientName(PolicyViolation, "GalleryImageVersionPolicyViolation", "csharp"); @@clientName(ReplicationMode, "GalleryReplicationMode", "csharp"); +@@clientName(StorageAccountType, "ImageStorageAccountType", "csharp"); @@clientName(PlatformAttribute, "ComputeGalleryPlatformAttribute", "csharp"); @@clientName(ExecutedValidation, "GalleryImageExecutedValidation", "csharp"); @@clientName(ValidationStatus, "ComputeGalleryValidationStatus", "csharp"); From 6f383cd6826adaf2f3f092d836fc9fd340eb2007 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 31 Mar 2026 18:10:53 +0800 Subject: [PATCH 006/103] Add ImageIdentifier rename and ImageStorageAccountType for C# compute migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - @@clientName for CommunityGalleryImageProperties.identifier → ImageIdentifier (fixes CS0108 hiding) - @@clientName for SharedGalleryImageProperties.identifier → ImageIdentifier (fixes CS0108 hiding) - @@clientName for StorageAccountType → ImageStorageAccountType (fixes CS0234 missing type) --- .../Compute/ComputeGallery/client.tsp | 10 + .../ContainerInstance/ContainerGroup.tsp | 225 + .../ContainerGroupProfile.tsp | 164 + .../ContainerInstance/NGroup.tsp | 164 + .../ContainerInstance/back-compatible.tsp | 69 + .../ContainerInstance/client.tsp | 54 + .../examples/2025-09-01/CachedImagesList.json | 29 + .../examples/2025-09-01/CapabilitiesList.json | 41 + .../examples/2025-09-01/ContainerAttach.json | 19 + .../examples/2025-09-01/ContainerExec.json | 26 + .../ContainerGroupCreateConfidential.json | 186 + ...ntainerGroupCreateOrUpdateStandbyPool.json | 139 + .../ContainerGroupEncryptionProperties.json | 196 + .../2025-09-01/ContainerGroupExtensions.json | 212 + ...fileCreateOrUpdate_CreateConfidential.json | 182 + ...leCreateOrUpdate_EncryptionProperties.json | 166 + ...GroupProfileCreateOrUpdate_Extensions.json | 193 + ...tainerGroupProfileGetByRevisionNumber.json | 83 + ...ContainerGroupProfileListAllRevisions.json | 86 + .../ContainerGroupProfilesCreateOrUpdate.json | 295 + .../ContainerGroupProfilesDelete.json | 14 + .../2025-09-01/ContainerGroupProfilesGet.json | 82 + .../ContainerGroupProfilesGetPriority.json | 83 + .../ContainerGroupProfilesList.json | 84 + ...ainerGroupProfilesListByResourceGroup.json | 85 + .../ContainerGroupProfilesPatch.json | 101 + .../2025-09-01/ContainerGroupUsage.json | 26 + .../ContainerGroupsCreateOrUpdate.json | 320 + ...erGroupsCreateOrUpdateSecretReference.json | 449 ++ .../ContainerGroupsCreatePriority.json | 124 + .../2025-09-01/ContainerGroupsDelete.json | 87 + .../ContainerGroupsGetPriority.json | 89 + .../2025-09-01/ContainerGroupsGet_Failed.json | 117 + .../ContainerGroupsGet_Succeeded.json | 81 + .../2025-09-01/ContainerGroupsList.json | 83 + .../ContainerGroupsListByResourceGroup.json | 84 + .../2025-09-01/ContainerGroupsRestart.json | 13 + .../2025-09-01/ContainerGroupsStart.json | 18 + .../2025-09-01/ContainerGroupsStop.json | 13 + .../2025-09-01/ContainerGroupsUpdate.json | 102 + .../2025-09-01/ContainerListLogs.json | 19 + .../examples/2025-09-01/OperationsList.json | 25 + .../SubnetServiceAssociationLinkDelete.json | 20 + .../ContainerInstance/main.tsp | 51 + .../ContainerInstance/models.tsp | 2769 +++++++ .../ContainerInstance/routes.tsp | 131 + .../stable/2025-09-01/containerInstance.json | 6527 +++++++++-------- .../2025-09-01/examples/CachedImagesList.json | 20 +- .../2025-09-01/examples/CapabilitiesList.json | 40 +- .../2025-09-01/examples/ContainerAttach.json | 14 +- .../2025-09-01/examples/ContainerExec.json | 22 +- .../ContainerGroupCreateConfidential.json | 146 +- ...ntainerGroupCreateOrUpdateStandbyPool.json | 106 +- .../ContainerGroupEncryptionProperties.json | 188 +- .../examples/ContainerGroupExtensions.json | 134 +- ...fileCreateOrUpdate_CreateConfidential.json | 126 +- ...leCreateOrUpdate_EncryptionProperties.json | 128 +- ...GroupProfileCreateOrUpdate_Extensions.json | 98 +- ...tainerGroupProfileGetByRevisionNumber.json | 36 +- ...ContainerGroupProfileListAllRevisions.json | 4 +- .../ContainerGroupProfilesCreateOrUpdate.json | 112 +- .../ContainerGroupProfilesDelete.json | 8 +- .../examples/ContainerGroupProfilesGet.json | 36 +- .../ContainerGroupProfilesGetPriority.json | 36 +- .../examples/ContainerGroupProfilesList.json | 34 +- ...ainerGroupProfilesListByResourceGroup.json | 34 +- .../examples/ContainerGroupProfilesPatch.json | 32 +- .../examples/ContainerGroupUsage.json | 18 +- .../ContainerGroupsCreateOrUpdate.json | 114 +- ...erGroupsCreateOrUpdateSecretReference.json | 290 +- .../ContainerGroupsCreatePriority.json | 88 +- .../examples/ContainerGroupsDelete.json | 28 +- .../examples/ContainerGroupsGetPriority.json | 66 +- .../examples/ContainerGroupsGet_Failed.json | 52 +- .../ContainerGroupsGet_Succeeded.json | 30 +- .../examples/ContainerGroupsList.json | 28 +- .../ContainerGroupsListByResourceGroup.json | 28 +- .../examples/ContainerGroupsRestart.json | 8 +- .../examples/ContainerGroupsStart.json | 8 +- .../examples/ContainerGroupsStop.json | 8 +- .../examples/ContainerGroupsUpdate.json | 34 +- .../examples/ContainerListLogs.json | 8 +- .../2025-09-01/examples/OperationsList.json | 10 +- .../SubnetServiceAssociationLinkDelete.json | 10 +- .../ContainerInstance/tspconfig.yaml | 51 + 85 files changed, 12375 insertions(+), 3994 deletions(-) create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/ContainerGroup.tsp create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/ContainerGroupProfile.tsp create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/NGroup.tsp create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/back-compatible.tsp create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/client.tsp create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/CachedImagesList.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/CapabilitiesList.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerAttach.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerExec.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupCreateConfidential.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupCreateOrUpdateStandbyPool.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupEncryptionProperties.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupExtensions.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_Extensions.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileGetByRevisionNumber.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileListAllRevisions.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesCreateOrUpdate.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesDelete.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesGet.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesGetPriority.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesList.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesListByResourceGroup.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesPatch.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupUsage.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreateOrUpdate.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreateOrUpdateSecretReference.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreatePriority.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsDelete.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGetPriority.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGet_Failed.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGet_Succeeded.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsList.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsListByResourceGroup.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsRestart.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsStart.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsStop.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsUpdate.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerListLogs.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/OperationsList.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/SubnetServiceAssociationLinkDelete.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/main.tsp create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/models.tsp create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/routes.tsp create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/tspconfig.yaml diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 3c1f73e5d8e6..110588322f85 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -83,3 +83,13 @@ using ComputeGallery; "csharp" ); @@clientName(EndpointAccess, "ComputeGalleryEndpointAccess", "csharp"); + +// Rename child identifier properties to avoid CS0108 hiding conflict with base class Identifier +@@clientName(CommunityGalleryImageProperties.identifier, + "ImageIdentifier", + "csharp" +); +@@clientName(SharedGalleryImageProperties.identifier, + "ImageIdentifier", + "csharp" +); diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/ContainerGroup.tsp b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/ContainerGroup.tsp new file mode 100644 index 000000000000..f1825358825a --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/ContainerGroup.tsp @@ -0,0 +1,225 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Microsoft.ContainerInstance; +/** + * A container group. + */ +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" +@Azure.ResourceManager.Legacy.customAzureResource +@Http.Private.includeInapplicableMetadataInPayload(false) +model ContainerGroup extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ContainerGroup, + KeyName = "containerGroupName", + SegmentName = "containerGroups", + NamePattern = "" + >; + + /** + * The resource location. + */ + location?: string; + + /** + * The resource tags. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + tags?: Record; + + ...Azure.ResourceManager.AvailabilityZonesProperty; + ...ContainerGroupProperties; +} + +@@visibility(ContainerGroup.name, Lifecycle.Read); + +@armResourceOperations(#{ omitTags: true }) +interface ContainerGroups { + /** + * Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes. + */ + @summary("Get the properties of the specified container group.") + get is ArmResourceRead; + + /** + * Create or update container groups with specified configurations. + */ + @summary("Create or update container groups.") + createOrUpdate is ArmResourceCreateOrReplaceAsync< + ContainerGroup, + LroHeaders = ArmLroLocationHeader & + Azure.Core.Foundations.RetryAfterHeader, + Error = CloudError + >; + + /** + * Updates container group tags with specified values. + */ + @patch(#{ implicitOptionality: false }) + @summary("Update container groups.") + update is ArmCustomPatchSync< + ContainerGroup, + PatchModel = Resource, + Error = CloudError + >; + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + @summary("Delete the specified container group.") + delete is ArmResourceDeleteAsyncBase< + ContainerGroup, + ArmResponse | ArmDeleteAcceptedLroResponse & + Azure.Core.Foundations.RetryAfterHeader> | ArmDeletedNoContentResponse, + Error = CloudError + >; + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be downloaded. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-openapi" "For backward compatibility" + @summary("Restarts all containers in a container group.") + restart is ArmResourceActionAsyncBase< + ContainerGroup, + void, + NoContentResponse & + ArmLroLocationHeader & + Azure.Core.Foundations.RetryAfterHeader, + BaseParameters = Azure.ResourceManager.Foundations.DefaultBaseParameters, + Error = CloudError + >; + + /** + * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. + */ + @summary("Stops all containers in a container group.") + stop is ArmResourceActionSync< + ContainerGroup, + void, + NoContentResponse, + Error = CloudError + >; + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "For backward compatibility" + @summary("Starts all containers in a container group.") + start is ArmResourceActionAsync< + ContainerGroup, + void, + NoContentResponse, + LroHeaders = ArmLroLocationHeader & + Azure.Core.Foundations.RetryAfterHeader, + Error = CloudError + >; + + /** + * Gets all the network dependencies for this container group to allow complete control of network setting and configuration. For container groups, this will always be an empty list. + */ + @summary("Get all network dependencies for container group.") + @get + @action("outboundNetworkDependenciesEndpoints") + getOutboundNetworkDependenciesEndpoints is ArmResourceActionSync< + ContainerGroup, + void, + ArmResponse, + Error = CloudError + >; + + /** + * Get the logs for a specified container instance in a specified resource group and container group. + */ + @summary("Get the logs for a specified container instance.") + @get + @action("logs") + listLogs is ArmResourceActionSync< + ContainerGroup, + void, + ArmResponse, + Error = CloudError, + Parameters = { + /** + * The name of the container instance. + */ + @path + @segment("containers") + containerName: string; + + /** + * The number of lines to show from the tail of the container instance log. If not provided, all available logs are shown up to 4mb. + */ + @query("tail") + tail?: int32; + + /** + * If true, adds a timestamp at the beginning of every line of log output. If not provided, defaults to false. + */ + @query("timestamps") + timestamps?: boolean; + } + >; + + /** + * Executes a command for a specific container instance in a specified resource group and container group. + */ + @summary("Executes a command in a specific container instance.") + @action("exec") + executeCommand is ArmResourceActionSync< + ContainerGroup, + ContainerExecRequest, + ArmResponse, + Error = CloudError, + Parameters = { + /** + * The name of the container instance. + */ + @path + @segment("containers") + containerName: string; + } + >; + + /** + * Attach to the output stream of a specific container instance in a specified resource group and container group. + */ + @summary("Attach to the output of a specific container instance.") + attach is ArmResourceActionSync< + ContainerGroup, + void, + ArmResponse, + Error = CloudError, + Parameters = { + /** + * The name of the container instance. + */ + @path + @segment("containers") + containerName: string; + } + >; +} + +@@doc(ContainerGroup.name, "The name of the container group."); +@@doc(ContainerGroups.createOrUpdate::parameters.resource, + "The properties of the container group to be created or updated." +); +@@doc(ContainerGroups.update::parameters.properties, + "The container group resource with just the tags to be updated." +); +@@doc(ContainerGroups.executeCommand::parameters.body, + "The request for the exec command." +); diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/ContainerGroupProfile.tsp b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/ContainerGroupProfile.tsp new file mode 100644 index 000000000000..cdda62cb168b --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/ContainerGroupProfile.tsp @@ -0,0 +1,164 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Microsoft.ContainerInstance; +/** + * A container group profile object + */ +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" +model ContainerGroupProfile + is Azure.ResourceManager.Legacy.TrackedResourceWithOptionalLocation { + ...ResourceNameParameter< + Resource = ContainerGroupProfile, + KeyName = "containerGroupProfileName", + SegmentName = "containerGroupProfiles", + NamePattern = "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" + >; + ...Azure.ResourceManager.AvailabilityZonesProperty; +} + +alias ContainerGroupProfileOps = Azure.ResourceManager.Legacy.LegacyOperations< + { + ...ApiVersionParameter; + ...SubscriptionIdParameter; + ...ResourceGroupParameter; + ...Azure.ResourceManager.Legacy.Provider; + }, + { + /** ContainerGroupProfile name. */ + @path + @segment("containerGroupProfiles") + @key + @pattern("^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$") + @minLength(1) + @maxLength(63) + containerGroupProfileName: string; + } +>; + +@armResourceOperations(#{ omitTags: true }) +interface ContainerGroupProfiles { + /** + * Get the properties of the specified container group profile. + */ + @summary("Display information about a specified ContainerGroupProfile.") + get is ArmResourceRead; + + /** + * Create a CGProfile if it doesn't exist or update an existing CGProfile. + */ + @summary("Create or Update a ContainerGroupProfile") + createOrUpdate is ContainerGroupProfileOps.CreateOrUpdateSync< + ContainerGroupProfile, + Response = (ArmResourceUpdatedResponse & { + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("x-ms-correlation-request-id") + `x-ms-correlation-request-id`: string; + }) | (ArmResourceCreatedSyncResponse & { + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("x-ms-correlation-request-id") + `x-ms-correlation-request-id`: string; + }) + >; + + /** + * Update a specified container group profile. + */ + @summary("Container group profile PATCH REST API.") + @patch(#{ implicitOptionality: false }) + update is ContainerGroupProfileOps.CustomPatchSync< + ContainerGroupProfile, + PatchModel = ContainerGroupProfilePatch, + Response = ArmResponse & { + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("x-ms-correlation-request-id") + `x-ms-correlation-request-id`: string; + } + >; + + /** + * Deletes a container group profile. + */ + @summary("Container group profile DELETE REST API.") + delete is ContainerGroupProfileOps.DeleteSync; + + /** + * Gets a list of all container group profiles under a subscription. + */ + @summary("List container group profiles in a subscription.") + listBySubscription is ArmListBySubscription< + ContainerGroupProfile, + Error = CloudError + >; + + /** + * Gets a list of all container group profiles under a resource group. + */ + @summary("List container group profiles in a resource group.") + listByResourceGroup is ArmResourceListByParent< + ContainerGroupProfile, + Error = CloudError + >; +} +alias CGProfileOps = Azure.ResourceManager.Legacy.LegacyOperations< + { + ...ApiVersionParameter; + ...SubscriptionIdParameter; + ...ResourceGroupParameter; + ...Azure.ResourceManager.Legacy.Provider; + + /** ContainerGroupProfile name. */ + @path + @segment("containerGroupProfiles") + @key + @pattern("^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$") + @minLength(1) + @maxLength(63) + containerGroupProfileName: string; + }, + { + /** The revision number of the container group profile. */ + @path + @segment("revisions") + @key + revisionNumber: string; + }, + CloudError +>; + +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +@armResourceOperations(#{ omitTags: true }) +interface CGProfile { + /** + * Gets the properties of the specified revision of the container group profile in the given subscription and resource group. The operation returns the properties of container group profile including containers, image registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. + */ + @summary("Get the properties of the specified revision of the container group profile.") + getByRevisionNumber is CGProfileOps.Read; + + /** + * Get a list of all the revisions of the specified container group profile in the given subscription and resource group. This operation returns properties of each revision of the specified container group profile including containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. + */ + @summary("Get a list of all the revisions of the specified container group profile in the given subscription and resource group.") + listAllRevisions is CGProfileOps.List; +} + +@@maxLength(ContainerGroupProfile.name, 63); +@@minLength(ContainerGroupProfile.name, 1); +@@doc(ContainerGroupProfile.name, "ContainerGroupProfile name."); +@@doc(ContainerGroupProfile.properties, + "The container group profile properties" +); +@@doc(ContainerGroupProfiles.createOrUpdate::parameters.resource, + "The ContainerGroupProfile object." +); +@@doc(ContainerGroupProfiles.update::parameters.properties, + "The container group profile properties that need to be updated." +); diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/NGroup.tsp b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/NGroup.tsp new file mode 100644 index 000000000000..15dde69b6a32 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/NGroup.tsp @@ -0,0 +1,164 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Microsoft.ContainerInstance; +/** + * Describes the NGroups resource. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" +model NGroup + is Azure.ResourceManager.Legacy.TrackedResourceWithOptionalLocation { + ...ResourceNameParameter< + Resource = NGroup, + KeyName = "ngroupsName", + SegmentName = "ngroups", + NamePattern = "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" + >; + ...Azure.ResourceManager.AvailabilityZonesProperty; + + /** + * The identity of the NGroup, if configured. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" + identity?: NGroupIdentity; +} + +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +@armResourceOperations(#{ omitTags: true }) +interface NGroups { + /** + * Get the properties of the specified NGroups resource. + */ + @summary("NGroups GET REST API") + get is ArmResourceRead; + + /** + * Create or update a NGroups resource. + */ + @summary("NGroup PUT REST API") + createOrUpdate is ArmResourceCreateOrReplaceAsync< + NGroup, + Response = (ArmResourceUpdatedResponse & { + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Azure-AsyncOperation") + `Azure-AsyncOperation`: string; + }) | ArmResourceCreatedResponse< + NGroup, + ArmAsyncOperationHeader & + Azure.Core.Foundations.RetryAfterHeader + > + >; + + /** + * Update a specified NGroups resource. + */ + @patch(#{ implicitOptionality: false }) + @summary("NGroups PATCH REST API") + update is ArmCustomPatchAsync< + NGroup, + PatchModel = NGroupPatch, + Response = (ArmResponse & { + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Azure-AsyncOperation") + `Azure-AsyncOperation`: string; + }) | ArmAcceptedLroResponse< + "Resource update request accepted.", + ArmAsyncOperationHeader & + Azure.Core.Foundations.RetryAfterHeader & { + @header("Location") + Location: string; + } + > + >; + + /** + * Deletes the NGroups resource. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "For backward compatibility" + @summary("NGroups Delete REST API") + delete is ArmResourceDeleteWithoutOkAsync< + NGroup, + Response = (ArmDeleteAcceptedLroResponse & { + @header("Location") + Location: string; + }) | ArmDeletedNoContentResponse + >; + + /** + * Gets a list of all NGroups resources under a resource group. + */ + @summary("GET NGroups under a resource group REST API.") + listByResourceGroup is ArmResourceListByParent< + NGroup, + Response = ArmResponse, + Error = CloudError + >; + + /** + * Gets a list of all NGroups resources under a subscription. + */ + @summary("List NGroups in a subscription.") + list is ArmListBySubscription< + NGroup, + Response = ArmResponse, + Error = CloudError + >; + + /** + * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing will start. + */ + @summary("Starts all container groups in the specified NGroups resource.") + start is ArmResourceActionAsyncBase< + NGroup, + void, + ArmAcceptedLroResponse & { + @header("Location") + Location: string; + }, + BaseParameters = Azure.ResourceManager.Foundations.DefaultBaseParameters + >; + + /** + * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing will stop. + */ + @summary("Stops all container groups in the specified NGroups resource.") + stop is ArmResourceActionSync< + NGroup, + void, + NoContentResponse, + Error = CloudError + >; + + /** + * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new image will be downloaded. + */ + @summary("Restarts all container groups in the specified NGroups resource.") + restart is ArmResourceActionAsyncBase< + NGroup, + void, + BaseParameters = Azure.ResourceManager.Foundations.DefaultBaseParameters, + Response = ArmAcceptedLroResponse & { + @header("Location") + Location: string; + } + >; +} + +@@maxLength(NGroup.name, 63); +@@minLength(NGroup.name, 1); +@@doc(NGroup.name, "The NGroups name."); +@@doc(NGroup.properties, "Describes the properties of the NGroups resource."); +@@doc(NGroups.createOrUpdate::parameters.resource, "The NGroup object."); +@@doc(NGroups.update::parameters.properties, "The NGroup object."); diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/back-compatible.tsp b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/back-compatible.tsp new file mode 100644 index 000000000000..1174d20c7db8 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/back-compatible.tsp @@ -0,0 +1,69 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.ContainerInstance; + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(ListResultContainerGroupProperties.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(Container.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(InitContainerDefinition.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(DeploymentExtensionSpec.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(ContainerGroup.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(ContainerGroupProperties.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(Operation.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(NGroupPatch.properties); + +@@clientName(ContainerGroups.createOrUpdate::parameters.resource, + "containerGroup" +); +@@clientName(ContainerGroups.update::parameters.properties, "Resource"); +@@clientLocation(ContainerGroups.listLogs, "Containers"); +@@clientLocation(ContainerGroups.executeCommand, "Containers"); +@@clientName(ContainerGroups.executeCommand::parameters.body, + "containerExecRequest" +); +@@clientLocation(ContainerGroups.attach, "Containers"); + +@@clientName(NGroups.createOrUpdate::parameters.resource, "NGroup"); +@@clientName(NGroups.update::parameters.properties, "NGroup"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(NGroup.properties); + +@@clientLocation(ContainerGroupProfiles.get, CGProfile); +@@clientLocation(ContainerGroupProfiles.createOrUpdate, CGProfile); +@@clientName(ContainerGroupProfiles.createOrUpdate::parameters.resource, + "ContainerGroupProfile" +); +@@clientLocation(ContainerGroupProfiles.update, CGProfile); +@@clientLocation(ContainerGroupProfiles.delete, CGProfile); +@@clientLocation(ContainerGroupProfiles.listBySubscription, "CGProfiles"); +@@clientLocation(ContainerGroupProfiles.listByResourceGroup, "CGProfiles"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(ContainerGroupProfile.properties); + +@@clientLocation(ContainerGroupsOperationGroup.list, ContainerGroups); +@@clientLocation(ContainerGroupsOperationGroup.listByResourceGroup, + ContainerGroups +); + +@@clientLocation(LocationOperationGroup.listUsage, "Location"); +@@clientLocation(LocationOperationGroup.listCachedImages, "Location"); +@@clientLocation(LocationOperationGroup.listCapabilities, "Location"); + +@@clientLocation(SubnetServiceAssociationLinkOperationGroup.delete, + "SubnetServiceAssociationLink" +); diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/client.tsp b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/client.tsp new file mode 100644 index 000000000000..62cfd209769b --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/client.tsp @@ -0,0 +1,54 @@ +import "@azure-tools/typespec-client-generator-core"; +import "./main.tsp"; + +using Azure.ClientGenerator.Core; +using Microsoft.ContainerInstance; + +@@clientName(Microsoft.ContainerInstance, + "ContainerInstanceManagementClient", + "javascript,python" +); +@@clientName(Azure.ResourceManager.CommonTypes.Resource, + "ArmResource", + "python,javascript" +); +@@clientName(ContainerGroupPropertiesPropertiesInstanceView, + "ContainerGroupPropertiesInstanceView", + "go,python" +); + +@@clientName(ContainerGroupPropertiesPropertiesInstanceView, + "ContainerGroupPropertiesInstanceView", + "java" +); +@@clientName(Azure.ResourceManager.CommonTypes.Resource, + "ResourceAutoGenerated", + "java" +); +@@clientName(ContainerGroupProperties, + "ContainerGroupPropertiesWrapper", + "java,python" +); +@@clientName(ContainerGroupPropertiesProperties, + "ContainerGroupProperties", + "java,python" +); +@@clientName(UserAssignedIdentities, + "ContainerGroupIdentityUserAssignedIdentities", + "java" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" +@@Legacy.hierarchyBuilding(ContainerGroup, + Azure.ResourceManager.CommonTypes.TrackedResource, + "java" +); +@@alternateType(ListResultContainerGroup, ContainerGroup); + +@@clientName(ListResultContainerGroupProperties, + "ListResultContainerGroupPropertiesWrapper", + "python" +); +@@clientName(ListResultContainerGroupPropertiesProperties, + "ListResultContainerGroupProperties", + "python" +); diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/CachedImagesList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/CachedImagesList.json new file mode 100644 index 000000000000..11e46040369d --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/CachedImagesList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "location": "westcentralus", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "image": "ubuntu:16.04", + "osType": "Linux" + }, + { + "image": "alpine:3.6", + "osType": "Linux" + }, + { + "image": "microsoft/nanoserver:10.0.14393.2485", + "osType": "Windows" + } + ] + } + } + }, + "operationId": "Location_ListCachedImages", + "title": "CachedImages" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/CapabilitiesList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/CapabilitiesList.json new file mode 100644 index 000000000000..26220d254122 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/CapabilitiesList.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "location": "westus", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "capabilities": { + "maxCpu": 4, + "maxGpuCount": 4, + "maxMemoryInGB": 14 + }, + "gpu": "K80", + "ipAddressType": "Public", + "location": "West US", + "osType": "Linux", + "resourceType": "containerGroups" + }, + { + "capabilities": { + "maxCpu": 4, + "maxGpuCount": 0, + "maxMemoryInGB": 14 + }, + "gpu": "None", + "ipAddressType": "Public", + "location": "West US", + "osType": "Windows", + "resourceType": "containerGroups" + } + ] + } + } + }, + "operationId": "Location_ListCapabilities", + "title": "GetCapabilities" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerAttach.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerAttach.json new file mode 100644 index 000000000000..b938f2a16bd9 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerAttach.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "containerName": "container1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "password": "password", + "webSocketUri": "wss://web-socket-uri" + } + } + }, + "operationId": "Containers_Attach", + "title": "ContainerAttach" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerExec.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerExec.json new file mode 100644 index 000000000000..8140f1188c88 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerExec.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerExecRequest": { + "command": "/bin/bash", + "terminalSize": { + "cols": 12, + "rows": 12 + } + }, + "containerGroupName": "demo1", + "containerName": "container1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "password": "password", + "webSocketUri": "wss://web-socket-uri" + } + } + }, + "operationId": "Containers_ExecuteCommand", + "title": "ContainerExec" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupCreateConfidential.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupCreateConfidential.json new file mode 100644 index 000000000000..d789db88362c --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupCreateConfidential.json @@ -0,0 +1,186 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroup": { + "location": "westeurope", + "properties": { + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, + "containers": [ + { + "name": "accdemo", + "properties": { + "command": [], + "environmentVariables": [], + "image": "confiimage", + "ports": [ + { + "port": 8000 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "securityContext": { + "capabilities": { + "add": [ + "CAP_NET_ADMIN" + ] + }, + "privileged": false + } + } + } + ], + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 8000, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "sku": "Confidential" + } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "westeurope", + "properties": { + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, + "containers": [ + { + "name": "accdemo", + "properties": { + "command": [], + "environmentVariables": [], + "image": "confiimage", + "ports": [ + { + "port": 8000 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "securityContext": { + "capabilities": { + "add": [ + "CAP_NET_ADMIN" + ] + }, + "privileged": false + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Running" + }, + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 8000, + "protocol": "TCP" + } + ] + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Succeeded", + "sku": "Confidential" + } + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "westeurope", + "properties": { + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, + "containers": [ + { + "name": "accdemo", + "properties": { + "command": [], + "environmentVariables": [], + "image": "confiimage", + "ports": [ + { + "port": 8000 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "securityContext": { + "capabilities": { + "add": [ + "CAP_NET_ADMIN" + ] + }, + "privileged": false + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Running" + }, + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 8000, + "protocol": "TCP" + } + ] + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Succeeded", + "sku": "Confidential" + } + } + } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ConfidentialContainerGroup" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupCreateOrUpdateStandbyPool.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupCreateOrUpdateStandbyPool.json new file mode 100644 index 000000000000..1851f95a318f --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupCreateOrUpdateStandbyPool.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroup": { + "location": "west us", + "properties": { + "containerGroupProfile": { + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp", + "revision": 1 + }, + "containers": [ + { + "name": "demo1", + "properties": { + "configMap": { + "keyValuePairs": { + "Newkey": "value" + } + } + } + } + ], + "standbyPoolProfile": { + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.StandbyPool/standbyContainerGroupPools/demopool" + } + } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus2", + "properties": { + "containerGroupProfile": { + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp", + "revision": 1 + }, + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "configMap": { + "keyValuePairs": { + "Newkey": "value" + } + }, + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Running" + }, + "isCreatedFromStandbyPool": true, + "osType": "Linux", + "provisioningState": "Succeeded", + "sku": "Standard" + } + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus2", + "properties": { + "containerGroupProfile": { + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp", + "revision": 1 + }, + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "configMap": { + "keyValuePairs": { + "Newkey": "value" + } + }, + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Running" + }, + "isCreatedFromStandbyPool": true, + "osType": "Linux", + "provisioningState": "Succeeded", + "sku": "Standard" + } + } + } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupCreateOrUpdateWithStandbyPool" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupEncryptionProperties.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupEncryptionProperties.json new file mode 100644 index 000000000000..85faa40ac0ff --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupEncryptionProperties.json @@ -0,0 +1,196 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroup": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity": {} + } + }, + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net" + }, + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux" + } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "identity": { + "type": "UserAssigned", + "tenantId": "", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity": { + "clientId": "", + "principalId": "" + } + } + }, + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net/" + }, + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Pending" + }, + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Pending", + "sku": "Standard" + } + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "identity": { + "type": "UserAssigned", + "tenantId": "", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity": { + "clientId": "", + "principalId": "" + } + } + }, + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "key version", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net/" + }, + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Pending" + }, + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Running", + "sku": "Standard" + } + } + } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupWithEncryptionProperties" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupExtensions.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupExtensions.json new file mode 100644 index 000000000000..18b51bfdf2f9 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupExtensions.json @@ -0,0 +1,212 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroup": { + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Private", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "subnetIds": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/test-subnet" + } + ], + "extensions": [ + { + "name": "kube-proxy", + "properties": { + "extensionType": "kube-proxy", + "protectedSettings": { + "kubeConfig": "" + }, + "settings": { + "clusterCidr": "10.240.0.0/16", + "kubeVersion": "v1.9.10" + }, + "version": "1.0" + } + }, + { + "name": "vk-realtime-metrics", + "properties": { + "extensionType": "realtime-metrics", + "version": "1.0" + } + } + ] + } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Pending" + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Pending", + "sku": "Standard", + "subnetIds": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/test-subnet" + } + ], + "extensions": [ + { + "name": "kube-proxy", + "properties": { + "extensionType": "kube-proxy", + "settings": { + "clusterCidr": "10.240.0.0/16", + "kubeVersion": "v1.9.10" + }, + "version": "1.0" + } + }, + { + "name": "vk-realtime-metrics", + "properties": { + "extensionType": "realtime-metrics", + "version": "1.0" + } + } + ] + } + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Running" + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Pending", + "sku": "Standard", + "subnetIds": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/test-subnet" + } + ], + "extensions": [ + { + "name": "kube-proxy", + "properties": { + "extensionType": "kube-proxy", + "settings": { + "clusterCidr": "10.240.0.0/16", + "kubeVersion": "v1.9.10" + }, + "version": "1.0" + } + }, + { + "name": "vk-realtime-metrics", + "properties": { + "extensionType": "realtime-metrics", + "version": "1.0" + } + } + ] + } + } + } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupCreateWithExtensions" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json new file mode 100644 index 000000000000..ae0a4af79480 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "ContainerGroupProfile": { + "location": "westeurope", + "properties": { + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, + "containers": [ + { + "name": "accdemo", + "properties": { + "command": [], + "environmentVariables": [], + "image": "confiimage", + "ports": [ + { + "port": 8000 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "securityContext": { + "capabilities": { + "add": [ + "CAP_NET_ADMIN" + ] + }, + "privileged": false + } + } + } + ], + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 8000, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "sku": "Confidential" + }, + "zones": [ + "1" + ] + }, + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "westeurope", + "properties": { + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, + "containers": [ + { + "name": "accdemo", + "properties": { + "command": [], + "environmentVariables": [], + "image": "confiimage", + "ports": [ + { + "port": 8000 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "securityContext": { + "capabilities": { + "add": [ + "CAP_NET_ADMIN" + ] + }, + "privileged": false + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 8000, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 0, + "sku": "Confidential" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "westeurope", + "properties": { + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, + "containers": [ + { + "name": "accdemo", + "properties": { + "command": [], + "environmentVariables": [], + "image": "confiimage", + "ports": [ + { + "port": 8000 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "securityContext": { + "capabilities": { + "add": [ + "CAP_NET_ADMIN" + ] + }, + "privileged": false + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 8000, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 1, + "sku": "Confidential" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CGProfile_CreateOrUpdate", + "title": "ConfidentialContainerGroupProfile" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json new file mode 100644 index 000000000000..b10d29af4eac --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json @@ -0,0 +1,166 @@ +{ + "parameters": { + "ContainerGroupProfile": { + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net" + }, + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux" + }, + "zones": [ + "1" + ] + }, + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net/" + }, + "imageRegistryCredentials": [], + "initContainers": [], + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 0, + "sku": "Standard" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "key version", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net/" + }, + "imageRegistryCredentials": [], + "initContainers": [], + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 1, + "sku": "Standard" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CGProfile_CreateOrUpdate", + "title": "ContainerGroupProfileWithEncryptionProperties" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_Extensions.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_Extensions.json new file mode 100644 index 000000000000..9558b682a8ca --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileCreateOrUpdate_Extensions.json @@ -0,0 +1,193 @@ +{ + "parameters": { + "ContainerGroupProfile": { + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Private", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "extensions": [ + { + "name": "kube-proxy", + "properties": { + "extensionType": "kube-proxy", + "protectedSettings": { + "kubeConfig": "" + }, + "settings": { + "clusterCidr": "10.240.0.0/16", + "kubeVersion": "v1.9.10" + }, + "version": "1.0" + } + }, + { + "name": "vk-realtime-metrics", + "properties": { + "extensionType": "realtime-metrics", + "version": "1.0" + } + } + ] + }, + "zones": [ + "1" + ] + }, + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "osType": "Linux", + "revision": 0, + "sku": "Standard", + "extensions": [ + { + "name": "kube-proxy", + "properties": { + "extensionType": "kube-proxy", + "settings": { + "clusterCidr": "10.240.0.0/16", + "kubeVersion": "v1.9.10" + }, + "version": "1.0" + } + }, + { + "name": "vk-realtime-metrics", + "properties": { + "extensionType": "realtime-metrics", + "version": "1.0" + } + } + ] + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "eastus2", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + } + } + } + ], + "imageRegistryCredentials": [], + "initContainers": [], + "osType": "Linux", + "revision": 1, + "sku": "Standard", + "extensions": [ + { + "name": "kube-proxy", + "properties": { + "extensionType": "kube-proxy", + "settings": { + "clusterCidr": "10.240.0.0/16", + "kubeVersion": "v1.9.10" + }, + "version": "1.0" + } + }, + { + "name": "vk-realtime-metrics", + "properties": { + "extensionType": "realtime-metrics", + "version": "1.0" + } + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CGProfile_CreateOrUpdate", + "title": "ContainerGroupProfileCreateWithExtensions" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileGetByRevisionNumber.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileGetByRevisionNumber.json new file mode 100644 index 000000000000..1ca406fa3a3b --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileGetByRevisionNumber.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "revisionNumber": "1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 1, + "sku": "Standard", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CGProfile_GetByRevisionNumber", + "title": "ContainerGroupProfileGetByRevisionNumber" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileListAllRevisions.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileListAllRevisions.json new file mode 100644 index 000000000000..97053203ca4a --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfileListAllRevisions.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "demo", + "containerGroupProfileName": "demo1", + "api-version": "2025-09-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", + "zones": [ + "1" + ], + "name": "demo1", + "properties": { + "sku": "Standard", + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "mountPath": "/mnt/volume1", + "name": "volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ], + "type": "Public" + }, + "osType": "Linux", + "volumes": [ + { + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + }, + "name": "volume1" + } + ], + "revision": 1 + }, + "type": "Microsoft.ContainerInstance/containerGroupProfiles" + } + ] + } + } + }, + "title": "ContainerGroupProfileListAllRevisions", + "operationId": "CGProfile_ListAllRevisions" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesCreateOrUpdate.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesCreateOrUpdate.json new file mode 100644 index 000000000000..9d0321fd5eb5 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesCreateOrUpdate.json @@ -0,0 +1,295 @@ +{ + "parameters": { + "ContainerGroupProfile": { + "location": "west us", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "gpu": { + "count": 1, + "sku": "K80" + }, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "diagnostics": { + "logAnalytics": { + "logType": "ContainerInsights", + "metadata": { + "pod-uuid": "test-metadata-value" + }, + "workspaceId": "workspaceid", + "workspaceKey": "workspaceKey", + "workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/microsoft.operationalinsights/workspaces/workspace" + } + }, + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountKey": "accountKey", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": { + "secretKey1": "SecretValue1InBase64", + "secretKey2": "SecretValue2InBase64" + } + } + ] + }, + "zones": [ + "1" + ] + }, + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "gpu": { + "count": 1, + "sku": "K80" + }, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "diagnostics": { + "logAnalytics": { + "logType": "ContainerInsights", + "metadata": { + "pod-uuid": "test-metadata-value" + }, + "workspaceId": "workspaceid" + } + }, + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 0, + "sku": "Standard", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": {} + } + ] + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "gpu": { + "count": 1, + "sku": "K80" + }, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "diagnostics": { + "logAnalytics": { + "logType": "ContainerInsights", + "metadata": { + "pod-uuid": "test-metadata-value" + }, + "workspaceId": "workspaceid" + } + }, + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 1, + "sku": "Standard", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": {} + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CGProfile_CreateOrUpdate", + "title": "ContainerGroupProfilesCreateOrUpdate" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesDelete.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesDelete.json new file mode 100644 index 000000000000..7767d4a28efb --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "CGProfile_Delete", + "title": "ContainerGroupProfilesDelete" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesGet.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesGet.json new file mode 100644 index 000000000000..036e329df118 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesGet.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 1, + "sku": "Standard", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CGProfile_Get", + "title": "ContainerGroupProfilesGet_Succeeded" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesGetPriority.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesGetPriority.json new file mode 100644 index 000000000000..c89c2aade616 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesGetPriority.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "priority": "Spot", + "revision": 1, + "sku": "Standard", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CGProfile_Get", + "title": "ContainerGroupProfilesGetWithPriority" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesList.json new file mode 100644 index 000000000000..d0e70b060588 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesList.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 1, + "sku": "Standard", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "CGProfiles_ListBySubscription", + "title": "ContainerGroupProfilesList" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesListByResourceGroup.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesListByResourceGroup.json new file mode 100644 index 000000000000..ee179a58af88 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesListByResourceGroup.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 1, + "sku": "Standard", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "CGProfiles_ListByResourceGroup", + "title": "ContainerGroupProfilesListByResourceGroup" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesPatch.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesPatch.json new file mode 100644 index 000000000000..14fa8f307599 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupProfilesPatch.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "properties": { + "tags": { + "tag1key": "tag1Value", + "tag2key": "tag2Value" + } + }, + "resourceGroupName": "demoResource", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/subid/resourceGroups/demoResource/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "revision": 2, + "sku": "Standard", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": {} + } + ] + }, + "tags": { + "tag1key": "tag1Value", + "tag2key": "tag2Value" + } + } + } + }, + "operationId": "CGProfile_Update", + "title": "ContainerGroupProfilesPatch" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupUsage.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupUsage.json new file mode 100644 index 000000000000..ce153593d108 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupUsage.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "location": "westcentralus", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": { + "localizedValue": "Container Groups", + "value": "ContainerGroups" + }, + "currentValue": 1, + "limit": 2000, + "unit": "Count" + } + ] + } + } + }, + "operationId": "Location_ListUsage", + "title": "ContainerUsage" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreateOrUpdate.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreateOrUpdate.json new file mode 100644 index 000000000000..05438f81b666 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreateOrUpdate.json @@ -0,0 +1,320 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroup": { + "identity": { + "type": "SystemAssigned, UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name": {} + } + }, + "location": "west us", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "gpu": { + "count": 1, + "sku": "K80" + }, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "diagnostics": { + "logAnalytics": { + "logType": "ContainerInsights", + "metadata": { + "test-key": "test-metadata-value" + }, + "workspaceId": "workspaceid", + "workspaceKey": "workspaceKey", + "workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/microsoft.operationalinsights/workspaces/workspace" + } + }, + "dnsConfig": { + "nameServers": [ + "1.1.1.1" + ], + "options": "ndots:2", + "searchDomains": "cluster.local svc.cluster.local" + }, + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "subnetIds": [ + { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" + } + ], + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountKey": "accountKey", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": { + "secretKey1": "SecretValue1InBase64", + "secretKey2": "SecretValue2InBase64" + } + } + ] + } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "gpu": { + "count": 1, + "sku": "K80" + }, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "diagnostics": { + "logAnalytics": { + "workspaceId": "workspaceid" + } + }, + "dnsConfig": { + "nameServers": [ + "1.1.1.1" + ], + "options": "ndots:2", + "searchDomains": "cluster.local svc.cluster.local" + }, + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Succeeded", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": {} + } + ] + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "gpu": { + "count": 1, + "sku": "K80" + }, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "dnsConfig": { + "nameServers": [ + "1.1.1.1" + ] + }, + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Succeeded", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": {} + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupsCreateOrUpdate" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreateOrUpdateSecretReference.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreateOrUpdateSecretReference.json new file mode 100644 index 000000000000..5f2abc02ba4c --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreateOrUpdateSecretReference.json @@ -0,0 +1,449 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroup": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name": {} + } + }, + "location": "west us", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [ + { + "name": "envSecret", + "secureValueReference": "envSecretRef" + } + ], + "image": "privateRegistryImage", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "gpu": { + "count": 1, + "sku": "K80" + }, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "diagnostics": { + "logAnalytics": { + "logType": "ContainerInsights", + "metadata": { + "test-key": "test-metadata-value" + }, + "workspaceId": "workspaceid", + "workspaceKey": "workspaceKey", + "workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/microsoft.operationalinsights/workspaces/workspace" + } + }, + "dnsConfig": { + "nameServers": [ + "1.1.1.1" + ], + "options": "ndots:2", + "searchDomains": "cluster.local svc.cluster.local" + }, + "imageRegistryCredentials": [ + { + "passwordReference": "privateRegistryKeyRef", + "server": "demoregistry.azurecr.io", + "username": "registryUserName" + } + ], + "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "secretReferences": [ + { + "name": "envSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/envSecret" + }, + { + "name": "accountKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/accountKey" + }, + { + "name": "volumeSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/volumeSecret" + }, + { + "name": "privateRegistryKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/privateRegistryKey" + } + ], + "subnetIds": [ + { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" + } + ], + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountKeyReference": "accountKeyRef", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": { + "secretKey1": "SecretValue1InBase64" + }, + "secretReference": { + "secretKey2": "volumeSecretRef" + } + } + ] + } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "identity": { + "type": "UserAssigned", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [ + { + "name": "envSecret", + "secureValueReference": "envSecretRef" + } + ], + "image": "privateRegistryImage", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "gpu": { + "count": 1, + "sku": "K80" + }, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "diagnostics": { + "logAnalytics": { + "workspaceId": "workspaceid" + } + }, + "dnsConfig": { + "nameServers": [ + "1.1.1.1" + ], + "options": "ndots:2", + "searchDomains": "cluster.local svc.cluster.local" + }, + "imageRegistryCredentials": [ + { + "passwordReference": "privateRegistryKeyRef", + "server": "demoregistry.azurecr.io", + "username": "registryUserName" + } + ], + "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Succeeded", + "secretReferences": [ + { + "name": "envSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/envSecret" + }, + { + "name": "accountKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/accountKey" + }, + { + "name": "volumeSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/volumeSecret" + }, + { + "name": "privateRegistryKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/privateRegistryKey" + } + ], + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountKeyReference": "accountKeyRef", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": {}, + "secretReference": { + "secretKey2": "volumeSecretRef" + } + } + ] + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "identity": { + "type": "UserAssigned", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [ + { + "name": "envSecret", + "secureValueReference": "envSecretRef" + } + ], + "image": "privateRegistryImage", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "gpu": { + "count": 1, + "sku": "K80" + }, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "dnsConfig": { + "nameServers": [ + "1.1.1.1" + ] + }, + "imageRegistryCredentials": [ + { + "passwordReference": "privateRegistryKeyRef", + "server": "demoregistry.azurecr.io", + "username": "registryUserName" + } + ], + "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Succeeded", + "secretReferences": [ + { + "name": "envSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/envSecret" + }, + { + "name": "accountKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/accountKey" + }, + { + "name": "volumeSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/volumeSecret" + }, + { + "name": "privateRegistryKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/privateRegistryKey" + } + ], + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountKeyReference": "accountKeyRef", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": {}, + "secretReference": { + "secretKey2": "volumeSecretRef" + } + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupsCreateOrUpdateSecretReference" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreatePriority.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreatePriority.json new file mode 100644 index 000000000000..12b47f3497b2 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsCreatePriority.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroup": { + "location": "eastus", + "properties": { + "containers": [ + { + "name": "test-container-001", + "properties": { + "command": [ + "/bin/sh", + "-c", + "sleep 10" + ], + "image": "alpine:latest", + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1 + } + } + } + } + ], + "osType": "Linux", + "priority": "Spot", + "restartPolicy": "Never", + "sku": "Standard" + } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus", + "properties": { + "containers": [ + { + "name": "test-container-001", + "properties": { + "command": [ + "/bin/sh", + "-c", + "sleep 10" + ], + "environmentVariables": [], + "image": "alpine:latest", + "ports": [], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1 + } + } + } + } + ], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Succeeded" + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "priority": "Spot", + "provisioningState": "Succeeded", + "restartPolicy": "Never", + "sku": "Standard" + } + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus", + "properties": { + "containers": [ + { + "name": "test-container-001", + "properties": { + "command": [ + "/bin/sh", + "-c", + "sleep 10" + ], + "environmentVariables": [], + "image": "alpine:latest", + "ports": [], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1 + } + } + } + } + ], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Created" + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "priority": "Spot", + "provisioningState": "Created", + "restartPolicy": "Never", + "sku": "Standard" + } + } + } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupsCreateWithPriority" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsDelete.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsDelete.json new file mode 100644 index 000000000000..8fe4921b8a56 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsDelete.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "provisioningState": "Succeeded", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + }, + "zones": [ + "1" + ] + } + }, + "202": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/locations/location/operations/operationId?api-version=apiVersion" + } + }, + "204": {} + }, + "operationId": "ContainerGroups_Delete", + "title": "ContainerGroupsDelete" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGetPriority.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGetPriority.json new file mode 100644 index 000000000000..037f8df7ea30 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGetPriority.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus", + "properties": { + "containers": [ + { + "name": "test-container-001", + "properties": { + "command": [ + "/bin/sh", + "-c", + "sleep 10" + ], + "environmentVariables": [], + "image": "alpine:latest", + "instanceView": { + "currentState": { + "detailStatus": "Completed", + "exitCode": 0, + "finishTime": "2022-11-11T19:33:55.565Z", + "startTime": "2022-11-11T19:33:44.217Z", + "state": "Terminated" + }, + "events": [ + { + "name": "Pulling", + "type": "Normal", + "count": 2, + "firstTimestamp": "2022-11-11T19:28:22Z", + "lastTimestamp": "2022-11-11T19:32:09Z", + "message": "pulling image \"alpine@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870\"" + }, + { + "name": "Pulled", + "type": "Normal", + "count": 2, + "firstTimestamp": "2022-11-11T19:32:08Z", + "lastTimestamp": "2022-11-11T19:32:38Z", + "message": "Successfully pulled image \"alpine@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870\"" + }, + { + "name": "Started", + "type": "Normal", + "count": 1, + "firstTimestamp": "2022-11-11T19:33:44Z", + "lastTimestamp": "2022-11-11T19:33:44Z", + "message": "Started container" + } + ], + "restartCount": 0 + }, + "ports": [], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1 + } + } + } + } + ], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Succeeded" + }, + "osType": "Linux", + "priority": "Spot", + "provisioningState": "Succeeded", + "restartPolicy": "Never", + "sku": "Standard" + } + } + } + }, + "operationId": "ContainerGroups_Get", + "title": "ContainerGroupsGetWithPriority" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGet_Failed.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGet_Failed.json new file mode 100644 index 000000000000..81dd19180bd7 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGet_Failed.json @@ -0,0 +1,117 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "instanceView": { + "currentState": { + "detailStatus": "", + "startTime": "2017-08-08T00:09:10Z", + "state": "Waiting" + }, + "events": [ + { + "name": "Pulling", + "type": "Normal", + "count": 1, + "firstTimestamp": "2017-08-08T00:09:01Z", + "lastTimestamp": "2017-08-08T00:09:01Z", + "message": "pulling image \"nginx\"" + }, + { + "name": "Pulled", + "type": "Normal", + "count": 1, + "firstTimestamp": "2017-08-08T00:09:10Z", + "lastTimestamp": "2017-08-08T00:09:10Z", + "message": "Successfully pulled image \"nginx\"" + } + ], + "restartCount": 0 + }, + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "instanceView": { + "events": [ + { + "name": "FailedMount", + "type": "Normal", + "count": 1, + "firstTimestamp": "2017-10-08T00:19:10Z", + "lastTimestamp": "2017-10-08T00:19:10Z", + "message": "Output: mount error(2): Permission denied" + } + ], + "state": "Pending" + }, + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "provisioningState": "Failed", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + } + } + } + }, + "operationId": "ContainerGroups_Get", + "title": "ContainerGroupsGet_Failed" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGet_Succeeded.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGet_Succeeded.json new file mode 100644 index 000000000000..19cc7724ff17 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsGet_Succeeded.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "provisioningState": "Succeeded", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "ContainerGroups_Get", + "title": "ContainerGroupsGet_Succeeded" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsList.json new file mode 100644 index 000000000000..0329e49535cc --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsList.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "provisioningState": "Succeeded", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "ContainerGroups_List", + "title": "ContainerGroupsList" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsListByResourceGroup.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsListByResourceGroup.json new file mode 100644 index 000000000000..caad9fb6ac6d --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsListByResourceGroup.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + } + ] + } + } + ], + "imageRegistryCredentials": [ + { + "server": "azcloudconsoleregistry.azurecr.io", + "username": "azcloudconsoleregistry" + } + ], + "ipAddress": { + "type": "Public", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "provisioningState": "Succeeded", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "readOnly": false, + "shareName": "share1", + "storageAccountName": "storage1" + } + } + ] + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "ContainerGroups_ListByResourceGroup", + "title": "ContainerGroupsListByResourceGroup" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsRestart.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsRestart.json new file mode 100644 index 000000000000..30623a648b77 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsRestart.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "204": {} + }, + "operationId": "ContainerGroups_Restart", + "title": "ContainerRestart" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsStart.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsStart.json new file mode 100644 index 000000000000..23a226fd2a8e --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsStart.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "202": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/locations/location/operations/operationId?api-version=apiVersion" + } + }, + "204": {} + }, + "operationId": "ContainerGroups_Start", + "title": "ContainerStart" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsStop.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsStop.json new file mode 100644 index 000000000000..62005c890abc --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsStop.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "204": {} + }, + "operationId": "ContainerGroups_Stop", + "title": "ContainerStop" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsUpdate.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsUpdate.json new file mode 100644 index 000000000000..3587164a9c27 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerGroupsUpdate.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "Resource": { + "tags": { + "tag1key": "tag1Value", + "tag2key": "tag2Value" + } + }, + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "resourceGroupName": "demoResource", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demoResource/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "WestUs", + "properties": { + "containers": [ + { + "name": "demo1", + "properties": { + "command": [], + "environmentVariables": [], + "image": "nginx", + "ports": [ + { + "port": 80 + } + ], + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 1.5 + } + }, + "volumeMounts": [ + { + "name": "volume1", + "mountPath": "/mnt/volume1", + "readOnly": false + }, + { + "name": "volume2", + "mountPath": "/mnt/volume2", + "readOnly": false + }, + { + "name": "volume3", + "mountPath": "/mnt/volume3", + "readOnly": true + } + ] + } + } + ], + "imageRegistryCredentials": [], + "ipAddress": { + "type": "Public", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", + "ip": "10.0.0.1", + "ports": [ + { + "port": 80, + "protocol": "TCP" + } + ] + }, + "osType": "Linux", + "provisioningState": "Succeeded", + "volumes": [ + { + "name": "volume1", + "azureFile": { + "shareName": "shareName", + "storageAccountName": "accountName" + } + }, + { + "name": "volume2", + "emptyDir": {} + }, + { + "name": "volume3", + "secret": {} + } + ] + }, + "tags": { + "tag1key": "tag1Value", + "tag2key": "tag2Value" + } + } + } + }, + "operationId": "ContainerGroups_Update", + "title": "ContainerGroupsUpdate" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerListLogs.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerListLogs.json new file mode 100644 index 000000000000..56b91d6d2157 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/ContainerListLogs.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "containerName": "container1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "tail": 10 + }, + "responses": { + "200": { + "body": { + "content": "log content" + } + } + }, + "operationId": "Containers_ListLogs", + "title": "ContainerListLogs" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/OperationsList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/OperationsList.json new file mode 100644 index 000000000000..afe82c4b9dee --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/OperationsList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2025-09-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.ContainerInstance/containerGroups/read", + "display": { + "description": "Get all container goups.", + "operation": "Get Container Groups", + "provider": "Microsoft Container Instance", + "resource": "Container Group" + }, + "origin": "User" + } + ] + } + } + }, + "operationId": "Operations_List", + "title": "OperationsList" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/SubnetServiceAssociationLinkDelete.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/SubnetServiceAssociationLinkDelete.json new file mode 100644 index 000000000000..362cac870937 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/examples/2025-09-01/SubnetServiceAssociationLinkDelete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2025-09-01", + "resourceGroupName": "demo", + "subnetName": "demo3", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "virtualNetworkName": "demo2" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/locations/location/operations/operationId?api-version=apiVersion" + } + }, + "204": {} + }, + "operationId": "SubnetServiceAssociationLink_Delete", + "title": "SubnetServiceAssociationLinkDelete" +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/main.tsp b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/main.tsp new file mode 100644 index 000000000000..8021e9e96a61 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/main.tsp @@ -0,0 +1,51 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: true + * guessResourceKey: false + * Version: 0.11.13 + * Date: 2026-03-16T05:52:40.910Z + */ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@typespec/openapi"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./back-compatible.tsp"; +import "./ContainerGroup.tsp"; +import "./NGroup.tsp"; +import "./ContainerGroupProfile.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.OpenAPI; +using TypeSpec.Versioning; +/** + * ContainerInstance + */ +@armProviderNamespace +@service(#{ title: "ContainerInstanceManagementClient" }) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) +namespace Microsoft.ContainerInstance; + +/** + * The available API versions. + */ +enum Versions { + /** + * The 2025-09-01 API version. + */ + v2025_09_01: "2025-09-01", +} + +interface Operations + extends Azure.ResourceManager.Legacy.Operations< + Response = OperationListResult, + Error = CloudError + > {} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/models.tsp b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/models.tsp new file mode 100644 index 000000000000..9c9bc87c7548 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/models.tsp @@ -0,0 +1,2769 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@azure-tools/typespec-azure-core"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; +using Azure.Core; +using Azure.ResourceManager.Foundations; + +namespace Microsoft.ContainerInstance; + +/** + * Response for network dependencies, always empty list. + */ +#suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model" "For backward compatibility" +model NetworkDependenciesResponse is string[]; + +/** + * The provisioning state of the container group. This only appears in the response. + */ +union ContainerGroupProvisioningState { + string, + + /** + * NotSpecified + */ + NotSpecified: "NotSpecified", + + /** + * Accepted + */ + Accepted: "Accepted", + + /** + * Pending + */ + Pending: "Pending", + + /** + * Updating + */ + Updating: "Updating", + + /** + * Creating + */ + Creating: "Creating", + + /** + * Repairing + */ + Repairing: "Repairing", + + /** + * Unhealthy + */ + Unhealthy: "Unhealthy", + + /** + * Failed + */ + Failed: "Failed", + + /** + * Canceled + */ + Canceled: "Canceled", + + /** + * Succeeded + */ + Succeeded: "Succeeded", + + /** + * Deleting + */ + Deleting: "Deleting", + + /** + * NotAccessible + */ + NotAccessible: "NotAccessible", + + /** + * PreProvisioned + */ + PreProvisioned: "PreProvisioned", +} + +/** + * The protocol associated with the port. + */ +union ContainerNetworkProtocol { + string, + + /** + * TCP + */ + TCP: "TCP", + + /** + * UDP + */ + UDP: "UDP", +} + +/** + * The SKU of the GPU resource. + */ +union GpuSku { + string, + + /** + * K80 + */ + K80: "K80", + + /** + * P100 + */ + P100: "P100", + + /** + * V100 + */ + V100: "V100", +} + +/** + * The scheme. + */ +union Scheme { + string, + + /** + * http + */ + http: "http", + + /** + * https + */ + https: "https", +} + +/** + * Restart policy for all containers within the container group. + * - `Always` Always restart + * - `OnFailure` Restart on failure + * - `Never` Never restart + * + */ +union ContainerGroupRestartPolicy { + string, + + /** + * Always + */ + Always: "Always", + + /** + * OnFailure + */ + OnFailure: "OnFailure", + + /** + * Never + */ + Never: "Never", +} + +/** + * The protocol associated with the port. + */ +union ContainerGroupNetworkProtocol { + string, + + /** + * TCP + */ + TCP: "TCP", + + /** + * UDP + */ + UDP: "UDP", +} + +/** + * Specifies if the IP is exposed to the public internet or private VNET. + */ +union ContainerGroupIpAddressType { + string, + + /** + * Public + */ + Public: "Public", + + /** + * Private + */ + Private: "Private", +} + +/** + * The value representing the security enum. The 'Unsecure' value is the default value if not selected and means the object's domain name label is not secured against subdomain takeover. The 'TenantReuse' value is the default value if selected and means the object's domain name label can be reused within the same tenant. The 'SubscriptionReuse' value means the object's domain name label can be reused within the same subscription. The 'ResourceGroupReuse' value means the object's domain name label can be reused within the same resource group. The 'NoReuse' value means the object's domain name label cannot be reused within the same resource group, subscription, or tenant. + */ +union DnsNameLabelReusePolicy { + string, + + /** + * Unsecure + */ + Unsecure: "Unsecure", + + /** + * TenantReuse + */ + TenantReuse: "TenantReuse", + + /** + * SubscriptionReuse + */ + SubscriptionReuse: "SubscriptionReuse", + + /** + * ResourceGroupReuse + */ + ResourceGroupReuse: "ResourceGroupReuse", + + /** + * Noreuse + */ + Noreuse: "Noreuse", +} + +/** + * The operating system type required by the containers in the container group. + */ +union OperatingSystemTypes { + string, + + /** + * Windows + */ + Windows: "Windows", + + /** + * Linux + */ + Linux: "Linux", +} + +/** + * The log type to be used. + */ +union LogAnalyticsLogType { + string, + + /** + * ContainerInsights + */ + ContainerInsights: "ContainerInsights", + + /** + * ContainerInstanceLogs + */ + ContainerInstanceLogs: "ContainerInstanceLogs", +} + +/** + * The container group SKU. + */ +union ContainerGroupSku { + string, + + /** + * NotSpecified + */ + NotSpecified: "NotSpecified", + + /** + * Standard + */ + Standard: "Standard", + + /** + * Dedicated + */ + Dedicated: "Dedicated", + + /** + * Confidential + */ + Confidential: "Confidential", +} + +/** + * The priority of the container group. + */ +union ContainerGroupPriority { + string, + + /** + * Regular + */ + Regular: "Regular", + + /** + * Spot + */ + Spot: "Spot", +} + +/** + * The access level of an identity. + */ +union IdentityAccessLevel { + string, + + /** + * All + */ + All: "All", + + /** + * System + */ + System: "System", + + /** + * User + */ + User: "User", +} + +/** + * The intended executor of the operation. + */ +union ContainerInstanceOperationsOrigin { + string, + + /** + * User + */ + User: "User", + + /** + * System + */ + System: "System", +} + +/** + * The type of identity that created the resource. + */ +union CreatedByType { + string, + + /** + * User + */ + User: "User", + + /** + * Application + */ + Application: "Application", + + /** + * ManagedIdentity + */ + ManagedIdentity: "ManagedIdentity", + + /** + * Key + */ + Key: "Key", +} + +/** + * The provisioning state, which only appears in the response. + */ +union NGroupProvisioningState { + string, + + /** + * Creating + */ + Creating: "Creating", + + /** + * Updating + */ + Updating: "Updating", + + /** + * Failed + */ + Failed: "Failed", + + /** + * Succeeded + */ + Succeeded: "Succeeded", + + /** + * Canceled + */ + Canceled: "Canceled", + + /** + * Deleting + */ + Deleting: "Deleting", + + /** + * Migrating + */ + Migrating: "Migrating", +} + +#suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" +union NGroupUpdateMode { + string, + + /** + * Manual + */ + Manual: "Manual", + + /** + * Rolling + */ + Rolling: "Rolling", +} + +/** + * The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the container group. + */ +#suppress "@azure-tools/typespec-azure-core/no-enum" "For backward compatibility" +enum ResourceIdentityType { + /** + * SystemAssigned + */ + SystemAssigned, + + /** + * UserAssigned + */ + UserAssigned, + + /** + * SystemAssigned, UserAssigned + */ + `SystemAssigned, UserAssigned`, + + /** + * None + */ + None, +} + +/** + * Specifies how Container Groups can access the Azure file share i.e. all CG will share same Azure file share or going to have exclusive file share. + */ +#suppress "@azure-tools/typespec-azure-core/no-enum" "For backward compatibility" +enum AzureFileShareAccessType { + /** + * Shared + */ + Shared, + + /** + * Exclusive + */ + Exclusive, +} + +/** + * Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Learn more at: https://learn.microsoft.com/en-us/rest/api/storagerp/file-shares/create?tabs=HTTP#shareaccesstier + */ +#suppress "@azure-tools/typespec-azure-core/no-enum" "For backward compatibility" +enum AzureFileShareAccessTier { + /** + * Cool + */ + Cool, + + /** + * Hot + */ + Hot, + + /** + * Premium + */ + Premium, + + /** + * TransactionOptimized + */ + TransactionOptimized, +} + +/** + * A container group part of the list result. + */ +model ListResultContainerGroup { + ...Resource; + ...ListResultContainerGroupProperties; +} + +/** + * The response of a container group list operation. + */ +model ContainerGroupListResult is Azure.Core.Page; + +/** + * The Resource model definition. + */ +#suppress "@azure-tools/typespec-azure-resource-manager/patch-envelope" "For backward compatibility" +model Resource { + /** + * The resource id. + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The resource name. + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The resource type. + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * The resource location. + */ + location?: string; + + /** + * The resource tags. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + tags?: Record; + + /** + * The zones for the container group. + */ + zones?: string[]; +} + +/** + * Properties of container group part of list result + */ +model ListResultContainerGroupProperties { + /** + * The identity of the container group, if configured. + */ + identity?: ContainerGroupIdentity; + + /** + * The container group properties + */ + properties: ListResultContainerGroupPropertiesProperties; +} + +/** + * Identity for the container group. + */ +model ContainerGroupIdentity { + /** + * The principal id of the container group identity. This property will only be provided for a system assigned identity. + */ + @visibility(Lifecycle.Read) + principalId?: string; + + /** + * The tenant id associated with the container group. This property will only be provided for a system assigned identity. + */ + @visibility(Lifecycle.Read) + tenantId?: string; + + /** + * The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the container group. + */ + type?: ResourceIdentityType; + + /** + * The list of user identities associated with the container group. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + userAssignedIdentities?: Record; +} + +/** + * The list of user identities associated with the container group. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ +model UserAssignedIdentities { + /** + * The principal id of user assigned identity. + */ + @visibility(Lifecycle.Read) + principalId?: string; + + /** + * The client id of user assigned identity. + */ + @visibility(Lifecycle.Read) + clientId?: string; +} + +/** + * The container group properties + */ +model ListResultContainerGroupPropertiesProperties { + /** + * The provisioning state of the container group. This only appears in the response. + */ + @visibility(Lifecycle.Read) + provisioningState?: ContainerGroupProvisioningState; + + /** + * The secret references that will be referenced within the container group. + */ + @identifiers(#["name"]) + secretReferences?: SecretReference[]; + + /** + * The containers within the container group. + */ + @identifiers(#["name"]) + containers: Container[]; + + /** + * The image registry credentials by which the container group is created from. + */ + @identifiers(#["username"]) + imageRegistryCredentials?: ImageRegistryCredential[]; + + /** + * Restart policy for all containers within the container group. + * - `Always` Always restart + * - `OnFailure` Restart on failure + * - `Never` Never restart + * + */ + restartPolicy?: ContainerGroupRestartPolicy; + + /** + * The IP address type of the container group. + */ + ipAddress?: IpAddress; + + /** + * The operating system type required by the containers in the container group. + */ + osType: OperatingSystemTypes; + + /** + * The list of volumes that can be mounted by containers in this container group. + */ + @identifiers(#["name"]) + volumes?: Volume[]; + + /** + * The diagnostic information for a container group. + */ + diagnostics?: ContainerGroupDiagnostics; + + /** + * The subnet resource IDs for a container group. + */ + subnetIds?: ContainerGroupSubnetId[]; + + /** + * The DNS config information for a container group. + */ + dnsConfig?: DnsConfiguration; + + /** + * The SKU for a container group. + */ + sku?: ContainerGroupSku; + + /** + * The encryption properties for a container group. + */ + encryptionProperties?: EncryptionProperties; + + /** + * The init containers for a container group. + */ + @identifiers(#["name"]) + initContainers?: InitContainerDefinition[]; + + /** + * extensions used by virtual kubelet + */ + @identifiers(#["name"]) + extensions?: DeploymentExtensionSpec[]; + + /** + * The properties for confidential container group + */ + confidentialComputeProperties?: ConfidentialComputeProperties; + + /** + * The priority of the container group. + */ + priority?: ContainerGroupPriority; + + /** + * The access control levels of the identities. + */ + identityAcls?: IdentityAcls; + + /** + * The reference container group profile properties. + */ + containerGroupProfile?: ContainerGroupProfileReferenceDefinition; + + /** + * The reference standby pool profile properties. + */ + standbyPoolProfile?: StandbyPoolProfileDefinition; + + /** + * The flag to determine whether the container group is created from standby pool. + */ + @visibility(Lifecycle.Read) + isCreatedFromStandbyPool?: boolean; +} + +/** + * A secret reference + */ +model SecretReference { + /** + * The identifier of the secret reference + */ + name: string; + + /** + * The ARM resource id of the managed identity that has access to the secret in the key vault + */ + identity: Azure.Core.armResourceIdentifier; + + /** + * The URI to the secret in key vault + */ + secretReferenceUri: url; +} + +/** + * A container instance. + */ +model Container { + /** + * The user-provided name of the container instance. + */ + name: string; + + /** + * The properties of the container instance. + */ + properties: ContainerProperties; +} + +/** + * The container instance properties. + */ +model ContainerProperties { + /** + * The name of the image used to create the container instance. + */ + image?: string; + + /** + * The commands to execute within the container instance in exec form. + */ + command?: string[]; + + /** + * The exposed ports on the container instance. + */ + @identifiers(#["port"]) + ports?: ContainerPort[]; + + /** + * The environment variables to set in the container instance. + */ + @identifiers(#["name"]) + environmentVariables?: EnvironmentVariable[]; + + /** + * The instance view of the container instance. Only valid in response. + */ + @visibility(Lifecycle.Read) + instanceView?: ContainerPropertiesInstanceView; + + /** + * The resource requirements of the container instance. + */ + resources?: ResourceRequirements; + + /** + * The volume mounts available to the container instance. + */ + @identifiers(#["name"]) + volumeMounts?: VolumeMount[]; + + /** + * The liveness probe. + */ + livenessProbe?: ContainerProbe; + + /** + * The readiness probe. + */ + readinessProbe?: ContainerProbe; + + /** + * The container security properties. + */ + securityContext?: SecurityContextDefinition; + + /** + * The config map. + */ + configMap?: ConfigMap; +} + +/** + * The port exposed on the container instance. + */ +model ContainerPort { + /** + * The protocol associated with the port. + */ + protocol?: ContainerNetworkProtocol; + + /** + * The port number exposed within the container group. + */ + port: int32; +} + +/** + * The environment variable to set within the container instance. + */ +model EnvironmentVariable { + /** + * The name of the environment variable. + */ + name: string; + + /** + * The value of the environment variable. + */ + value?: string; + + /** + * The value of the secure environment variable. + */ + @secret + secureValue?: string; + + /** + * The reference of the secure environment variable. + */ + secureValueReference?: string; +} + +/** + * The instance view of the container instance. Only valid in response. + */ +model ContainerPropertiesInstanceView { + /** + * The number of times that the container instance has been restarted. + */ + @visibility(Lifecycle.Read) + restartCount?: int32; + + /** + * Current container instance state. + */ + @visibility(Lifecycle.Read) + currentState?: ContainerState; + + /** + * Previous container instance state. + */ + @visibility(Lifecycle.Read) + previousState?: ContainerState; + + /** + * The events of the container instance. + */ + @visibility(Lifecycle.Read) + @identifiers(#["name", "type"]) + events?: Event[]; +} + +/** + * The container instance state. + */ +model ContainerState { + /** + * The state of the container instance. + */ + @visibility(Lifecycle.Read) + state?: string; + + /** + * The date-time when the container instance state started. + */ + @visibility(Lifecycle.Read) + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTime?: utcDateTime; + + /** + * The container instance exit codes correspond to those from the `docker run` command. + */ + @visibility(Lifecycle.Read) + exitCode?: int32; + + /** + * The date-time when the container instance state finished. + */ + @visibility(Lifecycle.Read) + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + finishTime?: utcDateTime; + + /** + * The human-readable status of the container instance state. + */ + @visibility(Lifecycle.Read) + detailStatus?: string; +} + +/** + * A container group or container instance event. + */ +model Event { + /** + * The count of the event. + */ + @visibility(Lifecycle.Read) + count?: int32; + + /** + * The date-time of the earliest logged event. + */ + @visibility(Lifecycle.Read) + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + firstTimestamp?: utcDateTime; + + /** + * The date-time of the latest logged event. + */ + @visibility(Lifecycle.Read) + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastTimestamp?: utcDateTime; + + /** + * The event name. + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The event message. + */ + @visibility(Lifecycle.Read) + message?: string; + + /** + * The event type. + */ + @visibility(Lifecycle.Read) + type?: string; +} + +/** + * The resource requirements. + */ +model ResourceRequirements { + /** + * The resource requests of this container instance. + */ + requests: ResourceRequests; + + /** + * The resource limits of this container instance. + */ + limits?: ResourceLimits; +} + +/** + * The resource requests. + */ +model ResourceRequests { + /** + * The memory request in GB of this container instance. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + memoryInGB: float64; + + /** + * The CPU request of this container instance. + */ + cpu: float64; + + /** + * The GPU request of this container instance. + */ + gpu?: GpuResource; +} + +/** + * The GPU resource. + */ +model GpuResource { + /** + * The count of the GPU resource. + */ + count: int32; + + /** + * The SKU of the GPU resource. + */ + sku: GpuSku; +} + +/** + * The resource limits. + */ +model ResourceLimits { + /** + * The memory limit in GB of this container instance. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + memoryInGB?: float64; + + /** + * The CPU limit of this container instance. + */ + cpu?: float64; + + /** + * The GPU limit of this container instance. + */ + gpu?: GpuResource; +} + +/** + * The properties of the volume mount. + */ +model VolumeMount { + /** + * The name of the volume mount. + */ + name: string; + + /** + * The path within the container where the volume should be mounted. Must not contain colon (:). + */ + mountPath: string; + + /** + * The flag indicating whether the volume mount is read-only. + */ + readOnly?: boolean; +} + +/** + * The container probe, for liveness or readiness + */ +model ContainerProbe { + /** + * The execution command to probe + */ + exec?: ContainerExec; + + /** + * The Http Get settings to probe + */ + httpGet?: ContainerHttpGet; + + /** + * The initial delay seconds. + */ + initialDelaySeconds?: int32; + + /** + * The period seconds. + */ + periodSeconds?: int32; + + /** + * The failure threshold. + */ + failureThreshold?: int32; + + /** + * The success threshold. + */ + successThreshold?: int32; + + /** + * The timeout seconds. + */ + timeoutSeconds?: int32; +} + +/** + * The container execution command, for liveness or readiness probe + */ +model ContainerExec { + /** + * The commands to execute within the container. + */ + command?: string[]; +} + +/** + * The container Http Get settings, for liveness or readiness probe + */ +model ContainerHttpGet { + /** + * The path to probe. + */ + path?: string; + + /** + * The port number to probe. + */ + port: int32; + + /** + * The scheme. + */ + scheme?: Scheme; + + /** + * The HTTP headers. + */ + @identifiers(#["name"]) + httpHeaders?: HttpHeader[]; +} + +/** + * The HTTP header. + */ +model HttpHeader { + /** + * The header name. + */ + name?: string; + + /** + * The header value. + */ + value?: string; +} + +/** + * The security context for the container. + */ +model SecurityContextDefinition { + /** + * The flag to determine if the container permissions is elevated to Privileged. + */ + privileged?: boolean; + + /** + * A boolean value indicating whether the init process can elevate its privileges + */ + allowPrivilegeEscalation?: boolean; + + /** + * The capabilities to add or drop from a container. + */ + capabilities?: SecurityContextCapabilitiesDefinition; + + /** + * Sets the User GID for the container. + */ + runAsGroup?: int32; + + /** + * Sets the User UID for the container. + */ + runAsUser?: int32; + + /** + * a base64 encoded string containing the contents of the JSON in the seccomp profile + */ + seccompProfile?: string; +} + +/** + * The capabilities to add or drop from a container. + */ +model SecurityContextCapabilitiesDefinition { + /** + * The capabilities to add to the container. + */ + add?: string[]; + + /** + * The capabilities to drop from the container. + */ + drop?: string[]; +} + +/** + * The container config map. + */ +model ConfigMap { + /** + * The key value pairs dictionary in the config map. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + keyValuePairs?: Record; +} + +/** + * Image registry credential. + */ +model ImageRegistryCredential { + /** + * The Docker image registry server without a protocol such as "http" and "https". + */ + server: string; + + /** + * The username for the private registry. + */ + username?: string; + + /** + * The password for the private registry. + */ + @secret + password?: string; + + /** + * The reference for the private registry password. + */ + passwordReference?: string; + + /** + * The identity for the private registry. + */ + identity?: string; + + /** + * The identity URL for the private registry. + */ + identityUrl?: string; +} + +/** + * IP address for the container group. + */ +model IpAddress { + /** + * The list of ports exposed on the container group. + */ + @identifiers(#["port"]) + ports: Port[]; + + /** + * Specifies if the IP is exposed to the public internet or private VNET. + */ + type: ContainerGroupIpAddressType; + + /** + * The IP exposed to the public internet. + */ + ip?: string; + + /** + * The Dns name label for the IP. + */ + dnsNameLabel?: string; + + /** + * The value representing the security enum. The 'Unsecure' value is the default value if not selected and means the object's domain name label is not secured against subdomain takeover. The 'TenantReuse' value is the default value if selected and means the object's domain name label can be reused within the same tenant. The 'SubscriptionReuse' value means the object's domain name label can be reused within the same subscription. The 'ResourceGroupReuse' value means the object's domain name label can be reused within the same resource group. The 'NoReuse' value means the object's domain name label cannot be reused within the same resource group, subscription, or tenant. + */ + autoGeneratedDomainNameLabelScope?: DnsNameLabelReusePolicy = DnsNameLabelReusePolicy.Unsecure; + + /** + * The FQDN for the IP. + */ + @visibility(Lifecycle.Read) + fqdn?: string; +} + +/** + * The port exposed on the container group. + */ +model Port { + /** + * The protocol associated with the port. + */ + protocol?: ContainerGroupNetworkProtocol; + + /** + * The port number. + */ + #suppress "@azure-tools/typespec-client-generator-core/property-name-conflict" "For backward compatibility" + port: int32; +} + +/** + * The properties of the volume. + */ +model Volume { + /** + * The name of the volume. + */ + name: string; + + /** + * The Azure File volume. + */ + azureFile?: AzureFileVolume; + + /** + * The empty directory volume. + */ + #suppress "@azure-tools/typespec-azure-core/no-unknown" "For backward compatibility" + emptyDir?: unknown; + + /** + * The secret volume. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + secret?: Record; + + /** + * The secret reference volume. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + secretReference?: Record; + + /** + * The git repo volume. + */ + gitRepo?: GitRepoVolume; +} + +/** + * The properties of the Azure File volume. Azure File shares are mounted as volumes. + */ +model AzureFileVolume { + /** + * The name of the Azure File share to be mounted as a volume. + */ + shareName: string; + + /** + * The flag indicating whether the Azure File shared mounted as a volume is read-only. + */ + readOnly?: boolean; + + /** + * The name of the storage account that contains the Azure File share. + */ + storageAccountName: string; + + /** + * The storage account access key used to access the Azure File share. + */ + @secret + storageAccountKey?: string; + + /** + * The reference to the storage account access key used to access the Azure File share. + */ + storageAccountKeyReference?: string; +} + +/** + * Represents a volume that is populated with the contents of a git repository + */ +model GitRepoVolume { + /** + * Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + */ + directory?: string; + + /** + * Repository URL + */ + repository: string; + + /** + * Commit hash for the specified revision. + */ + revision?: string; +} + +/** + * Container group diagnostic information. + */ +model ContainerGroupDiagnostics { + /** + * Container group log analytics information. + */ + logAnalytics?: LogAnalytics; +} + +/** + * Container group log analytics information. + */ +model LogAnalytics { + /** + * The workspace id for log analytics + */ + workspaceId: string; + + /** + * The workspace key for log analytics + */ + @secret + workspaceKey: string; + + /** + * The log type to be used. + */ + logType?: LogAnalyticsLogType; + + /** + * Metadata for log analytics. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + metadata?: Record; + + /** + * The workspace resource id for log analytics + */ + @secret + workspaceResourceId?: string; +} + +/** + * Container group subnet information. + */ +model ContainerGroupSubnetId { + /** + * Resource ID of virtual network and subnet. + */ + id: string; + + /** + * Friendly name for the subnet. + */ + name?: string; +} + +/** + * DNS configuration for the container group. + */ +model DnsConfiguration { + /** + * The DNS servers for the container group. + */ + nameServers: string[]; + + /** + * The DNS search domains for hostname lookup in the container group. + */ + searchDomains?: string; + + /** + * The DNS options for the container group. + */ + options?: string; +} + +/** + * The container group encryption properties. + */ +model EncryptionProperties { + /** + * The keyvault base url. + */ + vaultBaseUrl: string; + + /** + * The encryption key name. + */ + keyName: string; + + /** + * The encryption key version. + */ + keyVersion: string; + + /** + * The keyvault managed identity. + */ + identity?: string; +} + +/** + * The init container definition. + */ +model InitContainerDefinition { + /** + * The name for the init container. + */ + name: string; + + /** + * The properties for the init container. + */ + properties: InitContainerPropertiesDefinition; +} + +/** + * The init container definition properties. + */ +model InitContainerPropertiesDefinition { + /** + * The image of the init container. + */ + image?: string; + + /** + * The command to execute within the init container in exec form. + */ + command?: string[]; + + /** + * The environment variables to set in the init container. + */ + @identifiers(#["name"]) + environmentVariables?: EnvironmentVariable[]; + + /** + * The instance view of the init container. Only valid in response. + */ + @visibility(Lifecycle.Read) + instanceView?: InitContainerPropertiesDefinitionInstanceView; + + /** + * The volume mounts available to the init container. + */ + @identifiers(#["name"]) + volumeMounts?: VolumeMount[]; + + /** + * The container security properties. + */ + securityContext?: SecurityContextDefinition; +} + +/** + * The instance view of the init container. Only valid in response. + */ +model InitContainerPropertiesDefinitionInstanceView { + /** + * The number of times that the init container has been restarted. + */ + @visibility(Lifecycle.Read) + restartCount?: int32; + + /** + * The current state of the init container. + */ + @visibility(Lifecycle.Read) + currentState?: ContainerState; + + /** + * The previous state of the init container. + */ + @visibility(Lifecycle.Read) + previousState?: ContainerState; + + /** + * The events of the init container. + */ + @visibility(Lifecycle.Read) + @identifiers(#["name", "type"]) + events?: Event[]; +} + +/** + * Extension sidecars to be added to the deployment. + */ +model DeploymentExtensionSpec { + /** + * Name of the extension. + */ + name: string; + + /** + * Extension specific properties + */ + properties?: DeploymentExtensionSpecProperties; +} + +/** + * Extension specific properties + */ +model DeploymentExtensionSpecProperties { + /** + * Type of extension to be added. + */ + extensionType: string; + + /** + * Version of the extension being used. + */ + version: string; + + /** + * Settings for the extension. + */ + #suppress "@azure-tools/typespec-azure-core/no-unknown" "For backward compatibility" + settings?: unknown; + + /** + * Protected settings for the extension. + */ + #suppress "@azure-tools/typespec-azure-core/no-unknown" "For backward compatibility" + protectedSettings?: unknown; +} + +/** + * The properties for confidential container group + */ +model ConfidentialComputeProperties { + /** + * The base64 encoded confidential compute enforcement policy + */ + ccePolicy?: string; +} + +/** + * The access control levels of the identities. + */ +model IdentityAcls { + /** + * The default access level. + */ + defaultAccess?: IdentityAccessLevel; + + /** + * The access control levels for each identity. + */ + @identifiers(#["identity"]) + acls?: IdentityAccessControl[]; +} + +/** + * The access control for an identity + */ +model IdentityAccessControl { + /** + * The access level of the identity. + */ + access?: IdentityAccessLevel; + + /** + * An identity. + */ + identity?: Azure.Core.armResourceIdentifier; +} + +/** + * The container group profile reference. + */ +model ContainerGroupProfileReferenceDefinition { + /** + * The container group profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}'. + */ + id?: Azure.Core.armResourceIdentifier; + + /** + * The container group profile reference revision. + */ + revision?: int32; +} + +/** + * The standby pool profile reference. + */ +model StandbyPoolProfileDefinition { + /** + * The standby pool profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyPoolName}'. + */ + id?: Azure.Core.armResourceIdentifier; + + /** + * The flag to determine whether ACI should fail the create request if the container group can not be obtained from standby pool. + */ + failContainerGroupCreateOnReuseFailure?: boolean; +} + +/** + * An error response from the Container Instance service. + */ +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" +@error +@Azure.ResourceManager.Legacy.armExternalType +model CloudError { + /** + * An error response from the Container Instance service. + */ + error?: CloudErrorBody; +} + +/** + * An error response from the Container Instance service. + */ +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" +@Azure.ResourceManager.Legacy.armExternalType +model CloudErrorBody { + /** + * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + */ + code?: string; + + /** + * A message describing the error, intended to be suitable for display in a user interface. + */ + message?: string; + + /** + * The target of the particular error. For example, the name of the property in error. + */ + target?: string; + + /** + * A list of additional details about the error. + */ + @identifiers(#["message", "target"]) + details?: CloudErrorBody[]; +} + +/** + * The container group properties + */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "For backward compatibility" +model ContainerGroupProperties { + /** + * The identity of the container group, if configured. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property" "For backward compatibility" + identity?: ContainerGroupIdentity; + + /** + * The container group properties + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property" "For backward compatibility" + properties: ContainerGroupPropertiesProperties; +} + +/** + * The container group properties + */ +model ContainerGroupPropertiesProperties { + /** + * The provisioning state of the container group. This only appears in the response. + */ + @visibility(Lifecycle.Read) + provisioningState?: string; + + /** + * The secret references that will be referenced within the container group. + */ + @identifiers(#["name"]) + secretReferences?: SecretReference[]; + + /** + * The containers within the container group. + */ + @identifiers(#["name"]) + containers: Container[]; + + /** + * The image registry credentials by which the container group is created from. + */ + @identifiers(#["username"]) + imageRegistryCredentials?: ImageRegistryCredential[]; + + /** + * Restart policy for all containers within the container group. + * - `Always` Always restart + * - `OnFailure` Restart on failure + * - `Never` Never restart + * + */ + restartPolicy?: ContainerGroupRestartPolicy; + + /** + * The IP address type of the container group. + */ + ipAddress?: IpAddress; + + /** + * The operating system type required by the containers in the container group. + */ + osType?: OperatingSystemTypes; + + /** + * The list of volumes that can be mounted by containers in this container group. + */ + @identifiers(#["name"]) + volumes?: Volume[]; + + /** + * The instance view of the container group. Only valid in response. + */ + @visibility(Lifecycle.Read) + instanceView?: ContainerGroupPropertiesPropertiesInstanceView; + + /** + * The diagnostic information for a container group. + */ + diagnostics?: ContainerGroupDiagnostics; + + /** + * The subnet resource IDs for a container group. + */ + subnetIds?: ContainerGroupSubnetId[]; + + /** + * The DNS config information for a container group. + */ + dnsConfig?: DnsConfiguration; + + /** + * The SKU for a container group. + */ + sku?: ContainerGroupSku; + + /** + * The encryption properties for a container group. + */ + encryptionProperties?: EncryptionProperties; + + /** + * The init containers for a container group. + */ + @identifiers(#["name"]) + initContainers?: InitContainerDefinition[]; + + /** + * extensions used by virtual kubelet + */ + @identifiers(#["name"]) + extensions?: DeploymentExtensionSpec[]; + + /** + * The properties for confidential container group + */ + confidentialComputeProperties?: ConfidentialComputeProperties; + + /** + * The priority of the container group. + */ + priority?: ContainerGroupPriority; + + /** + * The access control levels of the identities. + */ + identityAcls?: IdentityAcls; + + /** + * The reference container group profile properties. + */ + containerGroupProfile?: ContainerGroupProfileReferenceDefinition; + + /** + * The reference standby pool profile properties. + */ + standbyPoolProfile?: StandbyPoolProfileDefinition; + + /** + * The flag to determine whether the container group is created from standby pool. + */ + @visibility(Lifecycle.Read) + isCreatedFromStandbyPool?: boolean; +} + +/** + * The instance view of the container group. Only valid in response. + */ +model ContainerGroupPropertiesPropertiesInstanceView { + /** + * The events of this container group. + */ + @visibility(Lifecycle.Read) + @identifiers(#["name", "type"]) + events?: Event[]; + + /** + * The state of the container group. Only valid in response. + */ + @visibility(Lifecycle.Read) + state?: string; +} + +model OperationListResult is Azure.Core.Page; + +/** + * An operation for Azure Container Instance service. + */ +model Operation { + /** + * The name of the operation. + */ + name: string; + + /** + * The display information of the operation. + */ + display: OperationDisplay; + + /** + * The additional properties. + */ + #suppress "@azure-tools/typespec-azure-core/no-unknown" "For backward compatibility" + properties?: unknown; + + /** + * The intended executor of the operation. + */ + origin?: ContainerInstanceOperationsOrigin; +} + +/** + * The display information of the operation. + */ +model OperationDisplay { + /** + * The name of the provider of the operation. + */ + provider?: string; + + /** + * The name of the resource type of the operation. + */ + resource?: string; + + /** + * The friendly name of the operation. + */ + operation?: string; + + /** + * The description of the operation. + */ + description?: string; +} + +/** + * The response containing the usage data + */ +model UsageListResult { + /** + * The usage data. + */ + @visibility(Lifecycle.Read) + @pageItems + @identifiers(#["name"]) + value?: Usage[]; + + /** + * The URL to get the next set of results. + */ + @nextLink + nextLink?: string; +} + +/** + * The response of a NGroups list operation. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupsListResult is Azure.Core.Page; + +/** + * A single usage result + */ +model Usage { + /** + * Id of the usage result + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * Unit of the usage result + */ + @visibility(Lifecycle.Read) + unit?: string; + + /** + * The current usage of the resource + */ + @visibility(Lifecycle.Read) + currentValue?: int32; + + /** + * The maximum permitted usage of the resource. + */ + @visibility(Lifecycle.Read) + limit?: int32; + + /** + * The name object of the resource + */ + @visibility(Lifecycle.Read) + name?: UsageName; +} + +/** + * The name object of the resource + */ +model UsageName { + /** + * The name of the resource + */ + @visibility(Lifecycle.Read) + value?: string; + + /** + * The localized name of the resource + */ + @visibility(Lifecycle.Read) + localizedValue?: string; +} + +/** + * The logs. + */ +model Logs { + /** + * The content of the log. + */ + content?: string; +} + +/** + * The container exec request. + */ +model ContainerExecRequest { + /** + * The command to be executed. + */ + command?: string; + + /** + * The size of the terminal. + */ + terminalSize?: ContainerExecRequestTerminalSize; +} + +/** + * The size of the terminal. + */ +model ContainerExecRequestTerminalSize { + /** + * The row size of the terminal + */ + rows?: int32; + + /** + * The column size of the terminal + */ + cols?: int32; +} + +/** + * The information for the container exec command. + */ +model ContainerExecResponse { + /** + * The uri for the exec websocket. + */ + webSocketUri?: string; + + /** + * The password to start the exec command. + */ + @secret + password?: string; +} + +/** + * The information for the output stream from container attach. + */ +model ContainerAttachResponse { + /** + * The uri for the output stream from the attach. + */ + webSocketUri?: string; + + /** + * The password to the output stream from the attach. Send as an Authorization header value when connecting to the websocketUri. + */ + @secret + password?: string; +} + +/** + * The response containing cached images. + */ +model CachedImagesListResult { + /** + * The cached images. + */ + @pageItems + @identifiers(#["image"]) + value?: CachedImages[]; + + /** + * The URL to get the next set of results. + */ + @nextLink + nextLink?: string; +} + +/** + * The cached image and OS type. + */ +model CachedImages { + /** + * The OS type of the cached image. + */ + osType: string; + + /** + * The cached image name. + */ + image: string; +} + +/** + * The response containing list of capabilities. + */ +model CapabilitiesListResult { + /** + * The list of capabilities. + */ + @pageItems + @identifiers(#["resourceType", "location"]) + value?: Capabilities[]; + + /** + * The URL to get the next set of results. + */ + @nextLink + nextLink?: string; +} + +/** + * The regional capabilities. + */ +model Capabilities { + /** + * The resource type that this capability describes. + */ + @visibility(Lifecycle.Read) + resourceType?: string; + + /** + * The OS type that this capability describes. + */ + @visibility(Lifecycle.Read) + osType?: string; + + /** + * The resource location. + */ + @visibility(Lifecycle.Read) + location?: string; + + /** + * The ip address type that this capability describes. + */ + @visibility(Lifecycle.Read) + ipAddressType?: string; + + /** + * The GPU sku that this capability describes. + */ + @visibility(Lifecycle.Read) + gpu?: string; + + /** + * The supported capabilities. + */ + #suppress "@azure-tools/typespec-client-generator-core/property-name-conflict" "For backward compatibility" + @visibility(Lifecycle.Read) + capabilities?: CapabilitiesCapabilities; +} + +/** + * The supported capabilities. + */ +model CapabilitiesCapabilities { + /** + * The maximum allowed memory request in GB. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @visibility(Lifecycle.Read) + maxMemoryInGB?: float32; + + /** + * The maximum allowed CPU request in cores. + */ + @visibility(Lifecycle.Read) + maxCpu?: float32; + + /** + * The maximum allowed GPU count. + */ + @visibility(Lifecycle.Read) + maxGpuCount?: float32; +} + +/** + * Describes the properties of the NGroups resource. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupProperties { + /** + * The elastic profile. + */ + elasticProfile?: ElasticProfile; + + /** + * Provides options w.r.t allocation and management w.r.t certain placement policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for high availability scenarios. E.g., distributing CGs across fault domains. + */ + placementProfile?: PlacementProfile; + + /** + * The Container Group Profiles that could be used in the NGroups resource. + */ + @identifiers(#[]) + containerGroupProfiles?: ContainerGroupProfileStub[]; + + /** + * The provisioning state, which only appears in the response. + */ + @visibility(Lifecycle.Read) + provisioningState?: NGroupProvisioningState; + + /** + * Used by the customer to specify the way to update the Container Groups in NGroup. + */ + updateProfile?: UpdateProfile; +} + +/** + * Describes the elastic profile of the NGroup + */ +model ElasticProfile { + #suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" + desiredCount?: int32; + + /** + * Flag that indicates whether desiredCount should be maintained when customer deletes SPECIFIC container groups (CGs) from the NGroups. In this case, new CGs will be created by NGroup to compensate for the specific deleted ones. + */ + maintainDesiredCount?: boolean; + + /** + * Container Groups are named on a generic guid based naming scheme/policy. Customer can modify naming policy to add prefix to CG names during scale out operation. + */ + containerGroupNamingPolicy?: ElasticProfileContainerGroupNamingPolicy; +} + +/** + * Container Groups are named on a generic guid based naming scheme/policy. Customer can modify naming policy to add prefix to CG names during scale out operation. + */ +model ElasticProfileContainerGroupNamingPolicy { + #suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" + guidNamingPolicy?: ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy; +} + +#suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" +model ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy { + /** + * The prefix can be used when there are tooling limitations (e.g. on the Azure portal where CGs from multiple NGroups exist in the same RG). The prefix with the suffixed resource name must still follow Azure resource naming guidelines. + */ + prefix?: string; +} + +/** + * Provides options w.r.t allocation and management w.r.t certain placement policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for high availability scenarios. E.g., distributing CGs across fault domains. + */ +model PlacementProfile { + /** + * The number of fault domains to be used to spread CGs in the NGroups resource. This can only be specified during NGroup creation and is immutable after that. + */ + faultDomainCount?: int32; +} + +/** + * The object that contains a reference to a Container Group Profile and it's other related properties. + */ +model ContainerGroupProfileStub { + /** + * A reference to the container group profile ARM resource hosted in ACI RP. + */ + resource?: ApiEntityReference; + + /** + * The revision of the CG profile is an optional property. If customer does not to provide a revision then NGroups will pickup the latest revision of CGProfile. + */ + revision?: int32; + + /** + * A network profile for network settings of a ContainerGroupProfile. + */ + networkProfile?: NetworkProfile; + + /** + * Storage profile for storage related settings of a container group profile. + */ + storageProfile?: StorageProfile; + + /** + * Container Group properties which can be set while creating or updating the NGroups. + */ + containerGroupProperties?: NGroupContainerGroupProperties; +} + +/** + * The API entity reference. + */ +model ApiEntityReference { + /** + * The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + */ + id?: string; +} + +/** + * A network profile for network settings of a ContainerGroupProfile. Used to manage load balancer and application gateway backend pools, specifically updating the IP addresses of CGs within the backend pool. + */ +model NetworkProfile { + /** + * LoadBalancer the CG profile will use to interact with CGs in a backend pool + */ + loadBalancer?: LoadBalancer; + + /** + * Application Gateway the CG profile will use to interact with CGs in a backend pool + */ + applicationGateway?: ApplicationGateway; +} + +/** + * LoadBalancer the CG profile will use to interact with CGs in a backend pool + */ +model LoadBalancer { + /** + * List of Load Balancer Backend Address Pools. + */ + @identifiers(#["resource"]) + backendAddressPools?: LoadBalancerBackendAddressPool[]; +} + +/** + * NGroups load balancer backend address pool + */ +model LoadBalancerBackendAddressPool { + /** + * The Load Balancer backend address pool ARM resource Id. + */ + resource?: string; +} + +/** + * Application Gateway the CG profile will use to interact with CGs in a backend pool + */ +model ApplicationGateway { + /** + * The Application Gateway ARM resource Id. + */ + resource?: string; + + /** + * List of Application Gateway Backend Address Pools. + */ + @identifiers(#["resource"]) + backendAddressPools?: ApplicationGatewayBackendAddressPool[]; +} + +/** + * NGroups application gateway backend address pool + */ +model ApplicationGatewayBackendAddressPool { + /** + * The application gateway backend address pool ARM resource Id. + */ + resource?: string; +} + +/** + * Storage profile for storage related settings of a container group profile. + */ +model StorageProfile { + #suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" + @identifiers(#["name"]) + fileShares?: FileShare[]; +} + +/** + * File shares that can be mounted on container groups. + */ +model FileShare { + #suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" + name?: string; + #suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" + resourceGroupName?: string; + #suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" + storageAccountName?: string; + #suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" + properties?: FileShareProperties; +} + +#suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" +model FileShareProperties { + /** + * Specifies how Container Groups can access the Azure file share i.e. all CG will share same Azure file share or going to have exclusive file share. + */ + shareAccessType?: AzureFileShareAccessType; + + /** + * Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Learn more at: https://learn.microsoft.com/en-us/rest/api/storagerp/file-shares/create?tabs=HTTP#shareaccesstier + */ + shareAccessTier?: AzureFileShareAccessTier = AzureFileShareAccessTier.TransactionOptimized; +} + +/** + * Container Group properties which can be set while creating or updating the NGroups. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupContainerGroupProperties { + /** + * Contains information about Virtual Network Subnet ARM Resource + */ + subnetIds?: ContainerGroupSubnetId[]; + + /** + * Contains information about the volumes that can be mounted by Containers in the Container Groups. + */ + @identifiers(#["name"]) + volumes?: NGroupCGPropertyVolume[]; + + /** + * Contains information about Container which can be set while creating or updating the NGroups. + */ + @identifiers(#["name"]) + containers?: NGroupCGPropertyContainer[]; +} + +/** + * Contains information about the volumes that can be mounted by Containers in the Container Groups. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupCGPropertyVolume { + /** + * The name of the volume. + */ + name: string; + + /** + * The Azure File volume. + */ + azureFile?: AzureFileVolume; +} + +/** + * Container properties that can be provided with NGroups object. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupCGPropertyContainer { + /** + * container name + */ + name?: string; + + /** + * container properties + */ + properties?: NGroupCGPropertyContainerProperties; +} + +/** + * container properties + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupCGPropertyContainerProperties { + #suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" + @identifiers(#["name"]) + volumeMounts?: VolumeMount[]; +} + +/** + * Used by the customer to specify the way to update the Container Groups in NGroup. + */ +model UpdateProfile { + #suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" + updateMode?: NGroupUpdateMode; + + /** + * This profile allows the customers to customize the rolling update. + */ + rollingUpdateProfile?: UpdateProfileRollingUpdateProfile; +} + +/** + * This profile allows the customers to customize the rolling update. + */ +model UpdateProfileRollingUpdateProfile { + /** + * Maximum percentage of total Container Groups which can be updated simultaneously by rolling update in one batch. + */ + maxBatchPercent?: int32; + + /** + * Maximum percentage of the updated Container Groups which can be in unhealthy state after each batch is updated. + */ + maxUnhealthyPercent?: int32; + + /** + * The wait time between batches after completing the one batch of the rolling update and starting the next batch. The time duration should be specified in ISO 8601 format for duration. + */ + pauseTimeBetweenBatches?: string; + + /** + * Default is false. If set to true, the CGs will be updated in-place instead of creating new CG and deleting old ones. + */ + inPlaceUpdate?: boolean; +} + +/** + * Identity for the NGroup. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupIdentity { + /** + * The principal id of the NGroup identity. This property will only be provided for a system assigned identity. + */ + @visibility(Lifecycle.Read) + principalId?: string; + + /** + * The tenant id associated with the NGroup. This property will only be provided for a system assigned identity. + */ + @visibility(Lifecycle.Read) + tenantId?: string; + + /** + * The type of identity used for the NGroup. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the NGroup. + */ + type?: ResourceIdentityType; + + /** + * The list of user identities associated with the NGroup. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + userAssignedIdentities?: Record; +} + +/** + * Describes the NGroups resource. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupPatch { + /** + * Metadata pertaining to creation and last modification of the resource. + */ + @visibility(Lifecycle.Read) + systemData?: SystemData; + + /** + * Describes the properties of the NGroups resource. + */ + properties?: NGroupProperties; + + /** + * The identity of the NGroup, if configured. + */ + identity?: NGroupIdentity; + + /** + * The resource tags. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + tags?: Record; + + /** + * The zones for the NGroup. + */ + zones?: string[]; +} + +/** + * The container group profile properties + */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "For backward compatibility" +model ContainerGroupProfileProperties { + /** + * The SKU for a container group. + */ + sku?: ContainerGroupSku; + + /** + * The encryption properties for a container group. + */ + encryptionProperties?: EncryptionProperties; + + /** + * The containers within the container group. + */ + @identifiers(#["name"]) + containers: Container[]; + + /** + * The init containers for a container group. + */ + @identifiers(#["name"]) + initContainers?: InitContainerDefinition[]; + + /** + * extensions used by virtual kubelet + */ + @identifiers(#["name"]) + extensions?: DeploymentExtensionSpec[]; + + /** + * The image registry credentials by which the container group is created from. + */ + @identifiers(#["username"]) + imageRegistryCredentials?: ImageRegistryCredential[]; + + /** + * Restart policy for all containers within the container group. + * - `Always` Always restart + * - `OnFailure` Restart on failure + * - `Never` Never restart + * + */ + restartPolicy?: ContainerGroupRestartPolicy; + + /** + * Shutdown grace period for containers in a container group. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + shutdownGracePeriod?: utcDateTime; + + /** + * The IP address type of the container group. + */ + ipAddress?: IpAddress; + + /** + * Post completion time to live for containers of a CG + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeToLive?: utcDateTime; + + /** + * The operating system type required by the containers in the container group. + */ + osType: OperatingSystemTypes; + + /** + * The list of volumes that can be mounted by containers in this container group. + */ + @identifiers(#["name"]) + volumes?: Volume[]; + + /** + * The diagnostic information for a container group. + */ + diagnostics?: ContainerGroupDiagnostics; + + /** + * The priority of the container group. + */ + priority?: ContainerGroupPriority; + + /** + * The properties for confidential container group + */ + confidentialComputeProperties?: ConfidentialComputeProperties; + + /** + * The container security properties. + */ + securityContext?: SecurityContextDefinition; + + /** + * Container group profile current revision number + */ + @visibility(Lifecycle.Read) + revision?: int32; + + /** + * Registered revisions are calculated at request time based off the records in the table logs. + */ + @visibility(Lifecycle.Read) + registeredRevisions?: int32[]; + + /** + * Gets or sets Krypton use property. + */ + useKrypton?: boolean; +} + +/** + * Properties of container group profile that need to be patched + */ +model ContainerGroupProfilePatch { + /** + * Resource tags. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + tags?: Record; +} + +/** + * List of SKU definitions. NGroups offer a single sku + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupsSkusList is Azure.Core.Page; + +/** + * The container probe, for liveness or readiness. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" +model NGroupSkus { + /** + * The type of resource the sku is applied to. + */ + resourceType?: string; + + /** + * The sku of the resource type + */ + sku?: string; + + /** + * The number of container groups of the NGroups. + */ + skuCapacity?: string; +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/routes.tsp b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/routes.tsp new file mode 100644 index 000000000000..b5334908ba2d --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/routes.tsp @@ -0,0 +1,131 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; +using TypeSpec.OpenAPI; + +namespace Microsoft.ContainerInstance; + +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "For backward compatibility" +interface ContainerGroupsOperationGroup { + /** + * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes. + */ + @summary("Get a list of container groups in the specified subscription.") + @autoRoute + @get + @list + @action("containerGroups") + list is ArmProviderActionSync< + Response = ContainerGroupListResult, + Scope = SubscriptionActionScope, + Error = CloudError + >; + /** + * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes. + */ + @summary("Get a list of container groups in the specified subscription and resource group.") + @autoRoute + @get + @list + @action("containerGroups") + listByResourceGroup is ArmProviderActionSync< + Response = ContainerGroupListResult, + Scope = Extension.ResourceGroup, + Error = CloudError + >; +} + +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "For backward compatibility" +interface LocationOperationGroup { + /** + * Get the usage for a subscription + */ + @autoRoute + @get + @list + @action("usages") + listUsage is ArmProviderActionSync< + Response = UsageListResult, + Scope = SubscriptionActionScope, + Error = CloudError, + Parameters = LocationParameter + >; + /** + * Get the list of cached images on specific OS type for a subscription in a region. + */ + @summary("Get the list of cached images.") + @autoRoute + @list + @get + @action("cachedImages") + listCachedImages is ArmProviderActionSync< + Response = CachedImagesListResult, + Scope = SubscriptionActionScope, + Error = CloudError, + Parameters = LocationParameter + >; + /** + * Get the list of CPU/memory/GPU capabilities of a region. + */ + @summary("Get the list of capabilities of the location.") + @autoRoute + @get + @list + @action("capabilities") + listCapabilities is ArmProviderActionSync< + Response = CapabilitiesListResult, + Scope = SubscriptionActionScope, + Error = CloudError, + Parameters = LocationParameter + >; +} + +alias VirtualNetwork = Extension.ExternalResource< + "Microsoft.Network", + "virtualNetworks", + "virtualNetworkName", + NamePattern = "The name of the virtual network." +>; + +alias Subnet = Extension.ExternalChildResource< + VirtualNetwork, + "subnets", + "subnetName", + NamePattern = "The name of the subnet." +>; + +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "For backward compatibility" +interface SubnetServiceAssociationLinkOperationGroup { + /** + * Delete container group virtual network association links. The operation does not delete other resources provided by the user. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "For backward compatibility" + @summary("Delete container group virtual network association links.") + @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default") + @delete + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The name of the virtual network. + */ + @segment("virtualNetworks") + virtualNetworkName: string, + + /** + * The name of the subnet. + */ + @segment("subnets") + subnetName: string, + ): OkResponse | ArmAcceptedLroResponse | NoContentResponse | CloudError; +} diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/containerInstance.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/containerInstance.json index b5a4edad8ce2..ce549a3bb217 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/containerInstance.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/containerInstance.json @@ -1,17 +1,23 @@ { "swagger": "2.0", "info": { + "title": "ContainerInstanceManagementClient", "version": "2025-09-01", - "title": "ContainerInstanceManagementClient" + "description": "ContainerInstance", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] }, - "host": "management.azure.com", "schemes": [ "https" ], - "consumes": [ + "host": "management.azure.com", + "produces": [ "application/json" ], - "produces": [ + "consumes": [ "application/json" ], "security": [ @@ -24,1157 +30,1140 @@ "securityDefinitions": { "azure_auth": { "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { - "user_impersonation": "Impersonate your user account" + "user_impersonation": "impersonate your user account" } } }, + "tags": [ + { + "name": "Operations" + } + ], "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups": { + "/providers/Microsoft.ContainerInstance/operations": { "get": { - "operationId": "ContainerGroups_List", - "x-ms-examples": { - "ContainerGroupsList": { - "$ref": "./examples/ContainerGroupsList.json" - } - }, - "summary": "Get a list of container groups in the specified subscription.", - "description": "Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.", + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/ContainerGroupListResult" + "$ref": "#/definitions/OperationListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, + "x-ms-examples": { + "OperationsList": { + "$ref": "./examples/OperationsList.json" + } + }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups": { + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroupProfiles": { "get": { - "operationId": "ContainerGroups_ListByResourceGroup", - "x-ms-examples": { - "ContainerGroupsListByResourceGroup": { - "$ref": "./examples/ContainerGroupsListByResourceGroup.json" - } - }, - "summary": "Get a list of container groups in the specified subscription and resource group.", - "description": "Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.", + "operationId": "CGProfiles_ListBySubscription", + "summary": "List container group profiles in a subscription.", + "description": "Gets a list of all container group profiles under a subscription.", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ContainerGroupListResult" + "$ref": "#/definitions/ContainerGroupProfileListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, + "x-ms-examples": { + "ContainerGroupProfilesList": { + "$ref": "./examples/ContainerGroupProfilesList.json" + } + }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups": { "get": { - "operationId": "ContainerGroups_Get", - "x-ms-examples": { - "ContainerGroupsGet_Succeeded": { - "$ref": "./examples/ContainerGroupsGet_Succeeded.json" - }, - "ContainerGroupsGet_Failed": { - "$ref": "./examples/ContainerGroupsGet_Failed.json" - }, - "ContainerGroupsGetWithPriority": { - "$ref": "./examples/ContainerGroupsGetPriority.json" - } - }, - "summary": "Get the properties of the specified container group.", - "description": "Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.", + "operationId": "ContainerGroups_List", + "summary": "Get a list of container groups in the specified subscription.", + "description": "Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ContainerGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/ContainerGroup" + "$ref": "#/definitions/ContainerGroupListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } - } - }, - "put": { - "operationId": "ContainerGroups_CreateOrUpdate", + }, "x-ms-examples": { - "ContainerGroupsCreateOrUpdate": { - "$ref": "./examples/ContainerGroupsCreateOrUpdate.json" - }, - "ContainerGroupsCreateOrUpdateSecretReference": { - "$ref": "./examples/ContainerGroupsCreateOrUpdateSecretReference.json" - }, - "ContainerGroupCreateWithExtensions": { - "$ref": "./examples/ContainerGroupExtensions.json" - }, - "ContainerGroupWithEncryptionProperties": { - "$ref": "./examples/ContainerGroupEncryptionProperties.json" - }, - "ConfidentialContainerGroup": { - "$ref": "./examples/ContainerGroupCreateConfidential.json" - }, - "ContainerGroupsCreateWithPriority": { - "$ref": "./examples/ContainerGroupsCreatePriority.json" - }, - "ContainerGroupCreateOrUpdateWithStandbyPool": { - "$ref": "./examples/ContainerGroupCreateOrUpdateStandbyPool.json" + "ContainerGroupsList": { + "$ref": "./examples/ContainerGroupsList.json" } }, - "summary": "Create or update container groups.", - "description": "Create or update container groups with specified configurations.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages": { + "get": { + "operationId": "Location_ListCachedImages", + "summary": "Get the list of cached images.", + "description": "Get the list of cached images on specific OS type for a subscription in a region.", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ContainerGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "name": "containerGroup", - "description": "The properties of the container group to be created or updated.", - "required": true, - "in": "body", - "schema": { - "$ref": "#/definitions/ContainerGroup" - } + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ContainerGroup" - } - }, - "201": { - "description": "Created - the container group is created.", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/ContainerGroup" + "$ref": "#/definitions/CachedImagesListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "ContainerGroups_Update", "x-ms-examples": { - "ContainerGroupsUpdate": { - "$ref": "./examples/ContainerGroupsUpdate.json" + "CachedImages": { + "$ref": "./examples/CachedImagesList.json" } }, - "summary": "Update container groups.", - "description": "Updates container group tags with specified values.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities": { + "get": { + "operationId": "Location_ListCapabilities", + "summary": "Get the list of capabilities of the location.", + "description": "Get the list of CPU/memory/GPU capabilities of a region.", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ContainerGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "name": "Resource", - "description": "The container group resource with just the tags to be updated.", - "required": true, - "in": "body", - "schema": { - "$ref": "#/definitions/Resource" - } + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/ContainerGroup" + "$ref": "#/definitions/CapabilitiesListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } - } - }, - "delete": { - "operationId": "ContainerGroups_Delete", + }, "x-ms-examples": { - "ContainerGroupsDelete": { - "$ref": "./examples/ContainerGroupsDelete.json" + "GetCapabilities": { + "$ref": "./examples/CapabilitiesList.json" } }, - "summary": "Delete the specified container group.", - "description": "Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages": { + "get": { + "operationId": "Location_ListUsage", + "description": "Get the usage for a subscription", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ContainerGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/ContainerGroup" + "$ref": "#/definitions/UsageListResult" } }, - "202": { - "description": "Delete started." - }, - "204": { - "description": "No Content - the specified container group was not found." - }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart": { - "post": { - "operationId": "ContainerGroups_Restart", "x-ms-examples": { - "ContainerRestart": { - "$ref": "./examples/ContainerGroupsRestart.json" + "ContainerUsage": { + "$ref": "./examples/ContainerGroupUsage.json" } }, - "summary": "Restarts all containers in a container group.", - "description": "Restarts all containers in a container group in place. If container image has updates, new image will be downloaded.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/ngroups": { + "get": { + "operationId": "NGroups_List", + "summary": "List NGroups in a subscription.", + "description": "Gets a list of all NGroups resources under a subscription.", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ContainerGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { - "204": { - "description": "NoContent" + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/NGroupsListResult" + } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop": { - "post": { - "operationId": "ContainerGroups_Stop", - "x-ms-examples": { - "ContainerStop": { - "$ref": "./examples/ContainerGroupsStop.json" - } - }, - "summary": "Stops all containers in a container group.", - "description": "Stops all containers in a container group. Compute resources will be deallocated and billing will stop.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ContainerGroupNameParameter" - } - ], - "responses": { - "204": { - "description": "NoContent" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start": { - "post": { - "operationId": "ContainerGroups_Start", - "x-ms-examples": { - "ContainerStart": { - "$ref": "./examples/ContainerGroupsStart.json" - } - }, - "summary": "Starts all containers in a container group.", - "description": "Starts all containers in a container group. Compute resources will be allocated and billing will start.", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles": { + "get": { + "operationId": "CGProfiles_ListByResourceGroup", + "summary": "List container group profiles in a resource group.", + "description": "Gets a list of all container group profiles under a resource group.", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ContainerGroupNameParameter" - } - ], - "responses": { - "202": { - "description": "Started - the container group is starting." - }, - "204": { - "description": "Started - the container group is already running or starting." + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-long-running-operation": true - } - }, - "/providers/Microsoft.ContainerInstance/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "x-ms-examples": { - "OperationsList": { - "$ref": "./examples/OperationsList.json" - } - }, - "description": "List the operations for Azure Container Instance service.", - "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/OperationListResult" + "$ref": "#/definitions/ContainerGroupProfileListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, + "x-ms-examples": { + "ContainerGroupProfilesListByResourceGroup": { + "$ref": "./examples/ContainerGroupProfilesListByResourceGroup.json" + } + }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}": { "get": { - "operationId": "Location_ListUsage", - "x-ms-examples": { - "ContainerUsage": { - "$ref": "./examples/ContainerGroupUsage.json" - } - }, - "description": "Get the usage for a subscription", + "operationId": "CGProfile_Get", + "summary": "Display information about a specified ContainerGroupProfile.", + "description": "Get the properties of the specified container group profile.", "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "containerGroupProfileName", + "in": "path", + "description": "ContainerGroupProfile name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/UsageListResult" + "$ref": "#/definitions/ContainerGroupProfile" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs": { - "get": { - "operationId": "Containers_ListLogs", "x-ms-examples": { - "ContainerListLogs": { - "$ref": "./examples/ContainerListLogs.json" + "ContainerGroupProfilesGetWithPriority": { + "$ref": "./examples/ContainerGroupProfilesGetPriority.json" + }, + "ContainerGroupProfilesGet_Succeeded": { + "$ref": "./examples/ContainerGroupProfilesGet.json" } - }, - "summary": "Get the logs for a specified container instance.", - "description": "Get the logs for a specified container instance in a specified resource group and container group.", + } + }, + "put": { + "operationId": "CGProfile_CreateOrUpdate", + "summary": "Create or Update a ContainerGroupProfile", + "description": "Create a CGProfile if it doesn't exist or update an existing CGProfile.", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ContainerGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "containerName", + "name": "containerGroupProfileName", "in": "path", - "description": "The name of the container instance.", + "description": "ContainerGroupProfile name.", "required": true, - "type": "string" - }, - { - "name": "tail", - "in": "query", - "description": "The number of lines to show from the tail of the container instance log. If not provided, all available logs are shown up to 4mb.", - "type": "integer", - "format": "int32" + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" }, { - "name": "timestamps", - "in": "query", - "description": "If true, adds a timestamp at the beginning of every line of log output. If not provided, defaults to false.", - "type": "boolean" + "name": "ContainerGroupProfile", + "in": "body", + "description": "The ContainerGroupProfile object.", + "required": true, + "schema": { + "$ref": "#/definitions/ContainerGroupProfile" + } } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/Logs" + "$ref": "#/definitions/ContainerGroupProfile" + }, + "headers": { + "x-ms-correlation-request-id": { + "type": "string" + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "schema": { + "$ref": "#/definitions/ContainerGroupProfile" + }, + "headers": { + "x-ms-correlation-request-id": { + "type": "string" + } } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/exec": { - "post": { - "operationId": "Containers_ExecuteCommand", + }, "x-ms-examples": { - "ContainerExec": { - "$ref": "./examples/ContainerExec.json" + "ConfidentialContainerGroupProfile": { + "$ref": "./examples/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json" + }, + "ContainerGroupProfileCreateWithExtensions": { + "$ref": "./examples/ContainerGroupProfileCreateOrUpdate_Extensions.json" + }, + "ContainerGroupProfileWithEncryptionProperties": { + "$ref": "./examples/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json" + }, + "ContainerGroupProfilesCreateOrUpdate": { + "$ref": "./examples/ContainerGroupProfilesCreateOrUpdate.json" } - }, - "summary": "Executes a command in a specific container instance.", - "description": "Executes a command for a specific container instance in a specified resource group and container group.", + } + }, + "patch": { + "operationId": "CGProfile_Update", + "summary": "Container group profile PATCH REST API.", + "description": "Update a specified container group profile.", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ContainerGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "containerName", + "name": "containerGroupProfileName", "in": "path", - "description": "The name of the container instance.", + "description": "ContainerGroupProfile name.", "required": true, - "type": "string" + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" }, { - "name": "containerExecRequest", + "name": "properties", "in": "body", - "description": "The request for the exec command.", + "description": "The container group profile properties that need to be updated.", "required": true, "schema": { - "$ref": "#/definitions/ContainerExecRequest" + "$ref": "#/definitions/ContainerGroupProfilePatch" } } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/ContainerExecResponse" + "$ref": "#/definitions/ContainerGroupProfile" + }, + "headers": { + "x-ms-correlation-request-id": { + "type": "string" + } } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach": { - "post": { - "operationId": "Containers_Attach", + }, "x-ms-examples": { - "ContainerAttach": { - "$ref": "./examples/ContainerAttach.json" + "ContainerGroupProfilesPatch": { + "$ref": "./examples/ContainerGroupProfilesPatch.json" } - }, - "summary": "Attach to the output of a specific container instance.", - "description": "Attach to the output stream of a specific container instance in a specified resource group and container group.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, - { + } + }, + "delete": { + "operationId": "CGProfile_Delete", + "summary": "Container group profile DELETE REST API.", + "description": "Deletes a container group profile.", + "parameters": [ + { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ContainerGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "containerName", + "name": "containerGroupProfileName", "in": "path", - "description": "The name of the container instance.", + "description": "ContainerGroupProfile name.", "required": true, - "type": "string" + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ContainerAttachResponse" - } + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "ContainerGroupProfilesDelete": { + "$ref": "./examples/ContainerGroupProfilesDelete.json" + } } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions": { "get": { - "operationId": "Location_ListCachedImages", - "x-ms-examples": { - "CachedImages": { - "$ref": "./examples/CachedImagesList.json" - } - }, - "summary": "Get the list of cached images.", - "description": "Get the list of cached images on specific OS type for a subscription in a region.", + "operationId": "CGProfile_ListAllRevisions", + "summary": "Get a list of all the revisions of the specified container group profile in the given subscription and resource group.", + "description": "Get a list of all the revisions of the specified container group profile in the given subscription and resource group. This operation returns properties of each revision of the specified container group profile including containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc.", "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "containerGroupProfileName", + "in": "path", + "description": "ContainerGroupProfile name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/CachedImagesListResult" + "$ref": "#/definitions/ContainerGroupProfileListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, + "x-ms-examples": { + "ContainerGroupProfileListAllRevisions": { + "$ref": "./examples/ContainerGroupProfileListAllRevisions.json" + } + }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions/{revisionNumber}": { "get": { - "operationId": "Location_ListCapabilities", - "x-ms-examples": { - "GetCapabilities": { - "$ref": "./examples/CapabilitiesList.json" - } - }, - "summary": "Get the list of capabilities of the location.", - "description": "Get the list of CPU/memory/GPU capabilities of a region.", + "operationId": "CGProfile_GetByRevisionNumber", + "summary": "Get the properties of the specified revision of the container group profile.", + "description": "Gets the properties of the specified revision of the container group profile in the given subscription and resource group. The operation returns the properties of container group profile including containers, image registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc.", "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "containerGroupProfileName", + "in": "path", + "description": "ContainerGroupProfile name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" + }, + { + "name": "revisionNumber", + "in": "path", + "description": "The revision number of the container group profile.", + "required": true, + "type": "string" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/CapabilitiesListResult" + "$ref": "#/definitions/ContainerGroupProfile" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" + "x-ms-examples": { + "ContainerGroupProfileGetByRevisionNumber": { + "$ref": "./examples/ContainerGroupProfileGetByRevisionNumber.json" + } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/outboundNetworkDependenciesEndpoints": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups": { "get": { - "operationId": "ContainerGroups_GetOutboundNetworkDependenciesEndpoints", - "x-ms-examples": {}, - "summary": "Get all network dependencies for container group.", - "description": "Gets all the network dependencies for this container group to allow complete control of network setting and configuration. For container groups, this will always be an empty list.", + "operationId": "ContainerGroups_ListByResourceGroup", + "summary": "Get a list of container groups in the specified subscription and resource group.", + "description": "Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.", "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ContainerGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/NetworkDependenciesResponse" + "$ref": "#/definitions/ContainerGroupListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } - } - } - }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default": { - "delete": { - "operationId": "SubnetServiceAssociationLink_Delete", - "x-ms-examples": { - "SubnetServiceAssociationLinkDelete": { - "$ref": "./examples/SubnetServiceAssociationLinkDelete.json" - } }, - "summary": "Delete container group virtual network association links.", - "description": "Delete container group virtual network association links. The operation does not delete other resources provided by the user.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/VirtualNetworkNameParameter" - }, - { - "$ref": "#/parameters/SubnetNameParameter" - } - ], - "responses": { - "200": { - "description": "OK" - }, - "202": { - "description": "Delete started." - }, - "204": { - "description": "No Content - the specified container group was not found." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "x-ms-examples": { + "ContainerGroupsListByResourceGroup": { + "$ref": "./examples/ContainerGroupsListByResourceGroup.json" } }, - "x-ms-long-running-operation": true + "x-ms-pageable": { + "nextLinkName": "nextLink" + } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}": { "get": { - "operationId": "NGroups_Get", - "x-ms-examples": {}, - "summary": "NGroups GET REST API", - "description": "Get the properties of the specified NGroups resource.", + "operationId": "ContainerGroups_Get", + "summary": "Get the properties of the specified container group.", + "description": "Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/NGroupsNameParameter" + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/NGroup" + "$ref": "#/definitions/ContainerGroup" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } + }, + "x-ms-examples": { + "ContainerGroupsGetWithPriority": { + "$ref": "./examples/ContainerGroupsGetPriority.json" + }, + "ContainerGroupsGet_Failed": { + "$ref": "./examples/ContainerGroupsGet_Failed.json" + }, + "ContainerGroupsGet_Succeeded": { + "$ref": "./examples/ContainerGroupsGet_Succeeded.json" + } } }, "put": { - "operationId": "NGroups_CreateOrUpdate", - "x-ms-examples": {}, - "summary": "NGroup PUT REST API", - "description": "Create or update a NGroups resource.", + "operationId": "ContainerGroups_CreateOrUpdate", + "summary": "Create or update container groups.", + "description": "Create or update container groups with specified configurations.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/NGroupsNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "name": "NGroup", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/NGroup" - }, - "description": "The NGroup object." + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "name": "containerGroup", + "in": "body", + "description": "The properties of the container group to be created or updated.", + "required": true, + "schema": { + "$ref": "#/definitions/ContainerGroup" + } } ], "responses": { "200": { - "description": "OK", - "headers": { - "Azure-AsyncOperation": { - "type": "string" - } - }, + "description": "Resource 'ContainerGroup' update operation succeeded", "schema": { - "$ref": "#/definitions/NGroup" + "$ref": "#/definitions/ContainerGroup" } }, "201": { - "description": "Created", + "description": "Resource 'ContainerGroup' create operation succeeded", "schema": { - "$ref": "#/definitions/NGroup" + "$ref": "#/definitions/ContainerGroup" }, "headers": { - "Azure-AsyncOperation": { - "type": "string" + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true, + "x-ms-examples": { + "ConfidentialContainerGroup": { + "$ref": "./examples/ContainerGroupCreateConfidential.json" + }, + "ContainerGroupCreateOrUpdateWithStandbyPool": { + "$ref": "./examples/ContainerGroupCreateOrUpdateStandbyPool.json" + }, + "ContainerGroupCreateWithExtensions": { + "$ref": "./examples/ContainerGroupExtensions.json" + }, + "ContainerGroupWithEncryptionProperties": { + "$ref": "./examples/ContainerGroupEncryptionProperties.json" + }, + "ContainerGroupsCreateOrUpdate": { + "$ref": "./examples/ContainerGroupsCreateOrUpdate.json" + }, + "ContainerGroupsCreateOrUpdateSecretReference": { + "$ref": "./examples/ContainerGroupsCreateOrUpdateSecretReference.json" + }, + "ContainerGroupsCreateWithPriority": { + "$ref": "./examples/ContainerGroupsCreatePriority.json" + } + }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - } + "final-state-via": "location", + "final-state-schema": "#/definitions/ContainerGroup" + }, + "x-ms-long-running-operation": true }, "patch": { - "operationId": "NGroups_Update", - "x-ms-examples": {}, - "summary": "NGroups PATCH REST API", - "description": "Update a specified NGroups resource.", + "operationId": "ContainerGroups_Update", + "summary": "Update container groups.", + "description": "Updates container group tags with specified values.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/NGroupsNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "name": "NGroup", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/NGroupPatch" - }, - "description": "The NGroup object." + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "name": "Resource", + "in": "body", + "description": "The container group resource with just the tags to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/Resource" + } } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/NGroup" - }, - "headers": { - "Azure-AsyncOperation": { - "type": "string" - } - } - }, - "202": { - "description": "NGroup update started", - "headers": { - "Azure-AsyncOperation": { - "type": "string" - }, - "Location": { - "type": "string" - } + "$ref": "#/definitions/ContainerGroup" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "x-ms-examples": { + "ContainerGroupsUpdate": { + "$ref": "./examples/ContainerGroupsUpdate.json" + } } }, "delete": { - "operationId": "NGroups_Delete", - "x-ms-examples": {}, - "summary": "NGroups Delete REST API", - "description": "Deletes the NGroups resource.", + "operationId": "ContainerGroups_Delete", + "summary": "Delete the specified container group.", + "description": "Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/NGroupsNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" } ], "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ContainerGroup" + } + }, "202": { - "description": "Accepted", + "description": "Resource deletion accepted.", "headers": { - "Azure-AsyncOperation": { - "type": "string" - }, "Location": { - "type": "string" + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "204": { - "description": "No Content" + "description": "Resource does not exist." }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true, + "x-ms-examples": { + "ContainerGroupsDelete": { + "$ref": "./examples/ContainerGroupsDelete.json" + } + }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - } + "final-state-via": "location", + "final-state-schema": "#/definitions/ContainerGroup" + }, + "x-ms-long-running-operation": true } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}/start": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach": { "post": { - "operationId": "NGroups_Start", - "x-ms-examples": {}, - "summary": "Starts all container groups in the specified NGroups resource.", - "description": "Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing will start.", + "operationId": "Containers_Attach", + "summary": "Attach to the output of a specific container instance.", + "description": "Attach to the output stream of a specific container instance in a specified resource group and container group.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/NGroupsNameParameter" + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the container instance.", + "required": true, + "type": "string" } ], "responses": { - "202": { - "description": "Started - the container groups are starting.", - "headers": { - "Azure-AsyncOperation": { - "type": "string" - }, - "Location": { - "type": "string" - } + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ContainerAttachResponse" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "x-ms-examples": { + "ContainerAttach": { + "$ref": "./examples/ContainerAttach.json" + } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}/stop": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/exec": { "post": { - "operationId": "NGroups_Stop", - "x-ms-examples": {}, - "summary": "Stops all container groups in the specified NGroups resource.", - "description": "Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing will stop.", + "operationId": "Containers_ExecuteCommand", + "summary": "Executes a command in a specific container instance.", + "description": "Executes a command for a specific container instance in a specified resource group and container group.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/NGroupsNameParameter" + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the container instance.", + "required": true, + "type": "string" + }, + { + "name": "containerExecRequest", + "in": "body", + "description": "The request for the exec command.", + "required": true, + "schema": { + "$ref": "#/definitions/ContainerExecRequest" + } } ], "responses": { - "204": { - "description": "NoContent" + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ContainerExecResponse" + } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } + }, + "x-ms-examples": { + "ContainerExec": { + "$ref": "./examples/ContainerExec.json" + } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}/restart": { - "post": { - "operationId": "NGroups_Restart", - "x-ms-examples": {}, - "summary": "Restarts all container groups in the specified NGroups resource.", - "description": "Restarts all container groups in the specified NGroups resource in place. If container image has updates, new image will be downloaded.", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs": { + "get": { + "operationId": "Containers_ListLogs", + "summary": "Get the logs for a specified container instance.", + "description": "Get the logs for a specified container instance in a specified resource group and container group.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/NGroupsNameParameter" + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the container instance.", + "required": true, + "type": "string" + }, + { + "name": "tail", + "in": "query", + "description": "The number of lines to show from the tail of the container instance log. If not provided, all available logs are shown up to 4mb.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "timestamps", + "in": "query", + "description": "If true, adds a timestamp at the beginning of every line of log output. If not provided, defaults to false.", + "required": false, + "type": "boolean" } ], "responses": { - "202": { - "description": "NoContent", - "headers": { - "Azure-AsyncOperation": { - "type": "string" - }, - "Location": { - "type": "string" - } + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Logs" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "x-ms-examples": { + "ContainerListLogs": { + "$ref": "./examples/ContainerListLogs.json" + } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/outboundNetworkDependenciesEndpoints": { "get": { - "operationId": "NGroups_ListByResourceGroup", - "x-ms-examples": {}, - "summary": "GET NGroups under a resource group REST API.", - "description": "Gets a list of all NGroups resources under a resource group.", + "operationId": "ContainerGroups_GetOutboundNetworkDependenciesEndpoints", + "summary": "Get all network dependencies for container group.", + "description": "Gets all the network dependencies for this container group to allow complete control of network setting and configuration. For container groups, this will always be an empty list.", "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, @@ -1182,128 +1171,210 @@ "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/NGroupsListResult" + "$ref": "#/definitions/NetworkDependenciesResponse" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/ngroups": { - "get": { - "operationId": "NGroups_List", - "x-ms-examples": {}, - "summary": "List NGroups in a subscription.", - "description": "Gets a list of all NGroups resources under a subscription.", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart": { + "post": { + "operationId": "ContainerGroups_Restart", + "summary": "Restarts all containers in a container group.", + "description": "Restarts all containers in a container group in place. If container image has updates, new image will be downloaded.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/NGroupsListResult" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. ", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroupProfiles": { - "get": { - "operationId": "CGProfiles_ListBySubscription", "x-ms-examples": { - "ContainerGroupProfilesList": { - "$ref": "./examples/ContainerGroupProfilesList.json" + "ContainerRestart": { + "$ref": "./examples/ContainerGroupsRestart.json" } }, - "summary": "List container group profiles in a subscription.", - "description": "Gets a list of all container group profiles under a subscription.", + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start": { + "post": { + "operationId": "ContainerGroups_Start", + "summary": "Starts all containers in a container group.", + "description": "Starts all containers in a container group. Compute resources will be allocated and billing will start.", "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ContainerGroupProfileListResult" + "202": { + "description": "Resource operation accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } } }, + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles": { - "get": { - "operationId": "CGProfiles_ListByResourceGroup", "x-ms-examples": { - "ContainerGroupProfilesListByResourceGroup": { - "$ref": "./examples/ContainerGroupProfilesListByResourceGroup.json" + "ContainerStart": { + "$ref": "./examples/ContainerGroupsStart.json" } }, - "summary": "List container group profiles in a resource group.", - "description": "Gets a list of all container group profiles under a resource group.", + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop": { + "post": { + "operationId": "ContainerGroups_Stop", + "summary": "Stops all containers in a container group.", + "description": "Stops all containers in a container group. Compute resources will be deallocated and billing will stop.", "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, + { + "name": "containerGroupName", + "in": "path", + "description": "The name of the container group.", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "ContainerStop": { + "$ref": "./examples/ContainerGroupsStop.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups": { + "get": { + "operationId": "NGroups_ListByResourceGroup", + "summary": "GET NGroups under a resource group REST API.", + "description": "Gets a list of all NGroups resources under a resource group.", + "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ContainerGroupProfileListResult" + "$ref": "#/definitions/NGroupsListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } @@ -1314,26 +1385,55 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}": { - "put": { - "operationId": "CGProfile_CreateOrUpdate", - "x-ms-examples": { - "ContainerGroupProfilesCreateOrUpdate": { - "$ref": "./examples/ContainerGroupProfilesCreateOrUpdate.json" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}": { + "get": { + "operationId": "NGroups_Get", + "summary": "NGroups GET REST API", + "description": "Get the properties of the specified NGroups resource.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, - "ContainerGroupProfileCreateWithExtensions": { - "$ref": "./examples/ContainerGroupProfileCreateOrUpdate_Extensions.json" + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, - "ContainerGroupProfileWithEncryptionProperties": { - "$ref": "./examples/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json" + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, - "ConfidentialContainerGroupProfile": { - "$ref": "./examples/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json" + { + "name": "ngroupsName", + "in": "path", + "description": "The NGroups name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" } - }, - "summary": "Create or Update a ContainerGroupProfile", - "description": "Create a CGProfile if it doesn't exist or update an existing CGProfile.", + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/NGroup" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "put": { + "operationId": "NGroups_CreateOrUpdate", + "summary": "NGroup PUT REST API", + "description": "Create or update a NGroups resource.", "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, @@ -1341,62 +1441,75 @@ "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/ContainerGroupProfileNameParameter" + "name": "ngroupsName", + "in": "path", + "description": "The NGroups name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" }, { - "name": "ContainerGroupProfile", + "name": "NGroup", "in": "body", + "description": "The NGroup object.", "required": true, "schema": { - "$ref": "#/definitions/ContainerGroupProfile" - }, - "description": "The ContainerGroupProfile object." - }, - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "#/definitions/NGroup" + } } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/NGroup" + }, "headers": { - "x-ms-correlation-request-id": { + "Azure-AsyncOperation": { "type": "string" } - }, - "schema": { - "$ref": "#/definitions/ContainerGroupProfile" } }, "201": { - "description": "Created", + "description": "Resource 'NGroup' create operation succeeded", "schema": { - "$ref": "#/definitions/ContainerGroupProfile" + "$ref": "#/definitions/NGroup" }, "headers": { - "x-ms-correlation-request-id": { - "type": "string" + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } - } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/NGroup" + }, + "x-ms-long-running-operation": true }, "patch": { - "operationId": "CGProfile_Update", - "x-ms-examples": { - "ContainerGroupProfilesPatch": { - "$ref": "./examples/ContainerGroupProfilesPatch.json" - } - }, - "summary": "Container group profile PATCH REST API.", - "description": "Update a specified container group profile.", + "operationId": "NGroups_Update", + "summary": "NGroups PATCH REST API", + "description": "Update a specified NGroups resource.", "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, @@ -1404,132 +1517,192 @@ "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/ContainerGroupProfileNameParameter" + "name": "ngroupsName", + "in": "path", + "description": "The NGroups name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" }, { - "name": "properties", - "description": "The container group profile properties that need to be updated.", - "required": true, + "name": "NGroup", "in": "body", + "description": "The NGroup object.", + "required": true, "schema": { - "$ref": "#/definitions/ContainerGroupProfilePatch" + "$ref": "#/definitions/NGroupPatch" } - }, - { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/ContainerGroupProfile" + "$ref": "#/definitions/NGroup" }, "headers": { - "x-ms-correlation-request-id": { + "Azure-AsyncOperation": { + "type": "string" + } + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Location": { "type": "string" + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } - } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/NGroup" + }, + "x-ms-long-running-operation": true }, - "get": { - "operationId": "CGProfile_Get", - "x-ms-examples": { - "ContainerGroupProfilesGet_Succeeded": { - "$ref": "./examples/ContainerGroupProfilesGet.json" - }, - "ContainerGroupProfilesGetWithPriority": { - "$ref": "./examples/ContainerGroupProfilesGetPriority.json" - } - }, - "summary": "Display information about a specified ContainerGroupProfile.", - "description": "Get the properties of the specified container group profile.", + "delete": { + "operationId": "NGroups_Delete", + "summary": "NGroups Delete REST API", + "description": "Deletes the NGroups resource.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ContainerGroupProfileNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "ngroupsName", + "in": "path", + "description": "The NGroups name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ContainerGroupProfile" + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Location": { + "type": "string" + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } } }, + "204": { + "description": "Resource does not exist." + }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } - } - }, - "delete": { - "operationId": "CGProfile_Delete", - "x-ms-examples": { - "ContainerGroupProfilesDelete": { - "$ref": "./examples/ContainerGroupProfilesDelete.json" - } }, - "summary": "Container group profile DELETE REST API.", - "description": "Deletes a container group profile.", + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}/restart": { + "post": { + "operationId": "NGroups_Restart", + "summary": "Restarts all container groups in the specified NGroups resource.", + "description": "Restarts all container groups in the specified NGroups resource in place. If container image has updates, new image will be downloaded.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ContainerGroupProfileNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "ngroupsName", + "in": "path", + "description": "The NGroups name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" } ], "responses": { - "200": { - "description": "OK - Delete started" - }, - "204": { - "description": "No Content - the specified container group profile was not found." + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Location": { + "type": "string" + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } - } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions": { - "get": { - "operationId": "CGProfile_ListAllRevisions", - "x-ms-examples": { - "ContainerGroupProfileListAllRevisions": { - "$ref": "./examples/ContainerGroupProfileListAllRevisions.json" - } - }, - "summary": "Get a list of all the revisions of the specified container group profile in the given subscription and resource group.", - "description": "Get a list of all the revisions of the specified container group profile in the given subscription and resource group. This operation returns properties of each revision of the specified container group profile including containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc.", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}/start": { + "post": { + "operationId": "NGroups_Start", + "summary": "Starts all container groups in the specified NGroups resource.", + "description": "Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing will start.", "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, @@ -1537,573 +1710,468 @@ "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/ContainerGroupProfileNameParameter" + "name": "ngroupsName", + "in": "path", + "description": "The NGroups name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Location": { + "type": "string" + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}/stop": { + "post": { + "operationId": "NGroups_Stop", + "summary": "Stops all container groups in the specified NGroups resource.", + "description": "Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing will stop.", + "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ngroupsName", + "in": "path", + "description": "The NGroups name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ContainerGroupProfileListResult" - } + "204": { + "description": "There is no content to send for this request, but the headers may be useful." }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions/{revisionNumber}": { - "get": { - "operationId": "CGProfile_GetByRevisionNumber", - "x-ms-examples": { - "ContainerGroupProfileGetByRevisionNumber": { - "$ref": "./examples/ContainerGroupProfileGetByRevisionNumber.json" - } - }, - "summary": "Get the properties of the specified revision of the container group profile.", - "description": "Gets the properties of the specified revision of the container group profile in the given subscription and resource group. The operation returns the properties of container group profile including containers, image registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc.", + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default": { + "delete": { + "operationId": "SubnetServiceAssociationLink_Delete", + "summary": "Delete container group virtual network association links.", + "description": "Delete container group virtual network association links. The operation does not delete other resources provided by the user.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ContainerGroupProfileNameParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/RevisionNumberParameter" + "name": "virtualNetworkName", + "in": "path", + "description": "The name of the virtual network.", + "required": true, + "type": "string" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "subnetName", + "in": "path", + "description": "The name of the subnet.", + "required": true, + "type": "string" } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ContainerGroupProfile" + "description": "The request has succeeded." + }, + "202": { + "description": "Resource operation accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } } }, + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/CloudError" } } - } + }, + "x-ms-examples": { + "SubnetServiceAssociationLinkDelete": { + "$ref": "./examples/SubnetServiceAssociationLinkDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true } } }, "definitions": { - "SecretReference": { - "description": "A secret reference", + "ApiEntityReference": { "type": "object", - "required": [ - "name", - "identity", - "secretReferenceUri" - ], + "description": "The API entity reference.", "properties": { - "name": { - "description": "The identifier of the secret reference", - "type": "string" - }, - "identity": { - "description": "The ARM resource id of the managed identity that has access to the secret in the key vault", - "type": "string", - "format": "arm-id" - }, - "secretReferenceUri": { - "description": "The URI to the secret in key vault", + "id": { "type": "string", - "format": "uri" + "description": "The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/..." } } }, - "Container": { - "description": "A container instance.", + "ApplicationGateway": { "type": "object", - "required": [ - "properties", - "name" - ], + "description": "Application Gateway the CG profile will use to interact with CGs in a backend pool", "properties": { - "name": { - "description": "The user-provided name of the container instance.", - "type": "string" + "resource": { + "type": "string", + "description": "The Application Gateway ARM resource Id." }, - "properties": { - "x-ms-client-flatten": true, - "description": "The properties of the container instance.", - "$ref": "#/definitions/ContainerProperties" + "backendAddressPools": { + "type": "array", + "description": "List of Application Gateway Backend Address Pools.", + "items": { + "$ref": "#/definitions/ApplicationGatewayBackendAddressPool" + }, + "x-ms-identifiers": [ + "resource" + ] } } }, - "ContainerProperties": { - "description": "The container instance properties.", + "ApplicationGatewayBackendAddressPool": { "type": "object", + "description": "NGroups application gateway backend address pool", "properties": { - "image": { - "description": "The name of the image used to create the container instance.", - "type": "string" - }, - "command": { - "description": "The commands to execute within the container instance in exec form.", - "type": "array", - "items": { - "type": "string" - } - }, - "ports": { - "description": "The exposed ports on the container instance.", - "type": "array", - "items": { - "$ref": "#/definitions/ContainerPort" - }, - "x-ms-identifiers": [ - "port" - ] - }, - "environmentVariables": { - "description": "The environment variables to set in the container instance.", - "type": "array", - "items": { - "$ref": "#/definitions/EnvironmentVariable" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "instanceView": { - "description": "The instance view of the container instance. Only valid in response.", - "readOnly": true, - "type": "object", - "properties": { - "restartCount": { - "readOnly": true, - "type": "integer", - "format": "int32", - "description": "The number of times that the container instance has been restarted." - }, - "currentState": { - "readOnly": true, - "description": "Current container instance state.", - "$ref": "#/definitions/ContainerState" - }, - "previousState": { - "readOnly": true, - "description": "Previous container instance state.", - "$ref": "#/definitions/ContainerState" - }, - "events": { - "readOnly": true, - "description": "The events of the container instance.", - "type": "array", - "items": { - "$ref": "#/definitions/Event" - }, - "x-ms-identifiers": [ - "name", - "type" - ] - } - } - }, - "resources": { - "description": "The resource requirements of the container instance.", - "$ref": "#/definitions/ResourceRequirements" - }, - "volumeMounts": { - "description": "The volume mounts available to the container instance.", - "type": "array", - "items": { - "$ref": "#/definitions/VolumeMount" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "livenessProbe": { - "description": "The liveness probe.", - "$ref": "#/definitions/ContainerProbe" - }, - "readinessProbe": { - "description": "The readiness probe.", - "$ref": "#/definitions/ContainerProbe" - }, - "securityContext": { - "description": "The container security properties.", - "$ref": "#/definitions/SecurityContextDefinition" - }, - "configMap": { - "description": "The config map.", - "$ref": "#/definitions/ConfigMap" + "resource": { + "type": "string", + "description": "The application gateway backend address pool ARM resource Id." } } }, - "ConfigMap": { - "description": "The container config map.", - "type": "object", - "properties": { - "keyValuePairs": { - "type": "object", - "additionalProperties": { - "type": "string", - "description": "The list of key value pairs associated with the config map of the container." + "AzureFileShareAccessType": { + "type": "string", + "description": "Specifies how Container Groups can access the Azure file share i.e. all CG will share same Azure file share or going to have exclusive file share.", + "enum": [ + "Shared", + "Exclusive" + ], + "x-ms-enum": { + "name": "AzureFileShareAccessType", + "modelAsString": false, + "values": [ + { + "name": "Shared", + "value": "Shared", + "description": "Shared" }, - "description": "The key value pairs dictionary in the config map." - } + { + "name": "Exclusive", + "value": "Exclusive", + "description": "Exclusive" + } + ] } }, - "SecurityContextDefinition": { - "description": "The security context for the container.", + "AzureFileVolume": { "type": "object", + "description": "The properties of the Azure File volume. Azure File shares are mounted as volumes.", "properties": { - "privileged": { - "type": "boolean", - "description": "The flag to determine if the container permissions is elevated to Privileged." + "shareName": { + "type": "string", + "description": "The name of the Azure File share to be mounted as a volume." }, - "allowPrivilegeEscalation": { + "readOnly": { "type": "boolean", - "description": "A boolean value indicating whether the init process can elevate its privileges" - }, - "capabilities": { - "description": "The capabilities to add or drop from a container.", - "$ref": "#/definitions/SecurityContextCapabilitiesDefinition" + "description": "The flag indicating whether the Azure File shared mounted as a volume is read-only." }, - "runAsGroup": { - "type": "integer", - "format": "int32", - "description": "Sets the User GID for the container." + "storageAccountName": { + "type": "string", + "description": "The name of the storage account that contains the Azure File share." }, - "runAsUser": { - "type": "integer", - "format": "int32", - "description": "Sets the User UID for the container." + "storageAccountKey": { + "type": "string", + "format": "password", + "description": "The storage account access key used to access the Azure File share.", + "x-ms-secret": true }, - "seccompProfile": { + "storageAccountKeyReference": { "type": "string", - "description": "a base64 encoded string containing the contents of the JSON in the seccomp profile" + "description": "The reference to the storage account access key used to access the Azure File share." } - } + }, + "required": [ + "shareName", + "storageAccountName" + ] }, - "SecurityContextCapabilitiesDefinition": { - "description": "The capabilities to add or drop from a container.", + "CachedImages": { "type": "object", + "description": "The cached image and OS type.", "properties": { - "add": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The capabilities to add to the container." + "osType": { + "type": "string", + "description": "The OS type of the cached image." }, - "drop": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The capabilities to drop from the container." + "image": { + "type": "string", + "description": "The cached image name." } - } + }, + "required": [ + "osType", + "image" + ] }, - "ContainerState": { - "description": "The container instance state.", + "CachedImagesListResult": { "type": "object", - "readOnly": true, + "description": "The response containing cached images.", "properties": { - "state": { - "type": "string", - "readOnly": true, - "description": "The state of the container instance." - }, - "startTime": { - "type": "string", - "readOnly": true, - "format": "date-time", - "description": "The date-time when the container instance state started." - }, - "exitCode": { - "type": "integer", - "format": "int32", - "readOnly": true, - "description": "The container instance exit codes correspond to those from the `docker run` command." - }, - "finishTime": { - "type": "string", - "readOnly": true, - "format": "date-time", - "description": "The date-time when the container instance state finished." + "value": { + "type": "array", + "description": "The cached images.", + "items": { + "$ref": "#/definitions/CachedImages" + }, + "x-ms-identifiers": [ + "image" + ] }, - "detailStatus": { + "nextLink": { "type": "string", - "readOnly": true, - "description": "The human-readable status of the container instance state." + "description": "The URL to get the next set of results." } } }, - "Event": { - "description": "A container group or container instance event.", + "Capabilities": { "type": "object", - "readOnly": true, + "description": "The regional capabilities.", "properties": { - "count": { - "type": "integer", - "format": "int32", - "readOnly": true, - "description": "The count of the event." - }, - "firstTimestamp": { + "resourceType": { "type": "string", - "readOnly": true, - "format": "date-time", - "description": "The date-time of the earliest logged event." + "description": "The resource type that this capability describes.", + "readOnly": true }, - "lastTimestamp": { + "osType": { "type": "string", - "readOnly": true, - "format": "date-time", - "description": "The date-time of the latest logged event." + "description": "The OS type that this capability describes.", + "readOnly": true }, - "name": { + "location": { "type": "string", - "readOnly": true, - "description": "The event name." + "description": "The resource location.", + "readOnly": true }, - "message": { + "ipAddressType": { "type": "string", - "readOnly": true, - "description": "The event message." + "description": "The ip address type that this capability describes.", + "readOnly": true }, - "type": { + "gpu": { "type": "string", - "readOnly": true, - "description": "The event type." - } - } - }, - "ResourceRequirements": { - "description": "The resource requirements.", - "type": "object", - "required": [ - "requests" - ], - "properties": { - "requests": { - "description": "The resource requests of this container instance.", - "$ref": "#/definitions/ResourceRequests" + "description": "The GPU sku that this capability describes.", + "readOnly": true }, - "limits": { - "description": "The resource limits of this container instance.", - "$ref": "#/definitions/ResourceLimits" + "capabilities": { + "$ref": "#/definitions/CapabilitiesCapabilities", + "description": "The supported capabilities.", + "readOnly": true } } }, - "ResourceRequests": { - "description": "The resource requests.", + "CapabilitiesCapabilities": { "type": "object", - "required": [ - "memoryInGB", - "cpu" - ], + "description": "The supported capabilities.", "properties": { - "memoryInGB": { - "description": "The memory request in GB of this container instance.", + "maxMemoryInGB": { "type": "number", - "format": "double" + "format": "float", + "description": "The maximum allowed memory request in GB.", + "readOnly": true }, - "cpu": { - "description": "The CPU request of this container instance.", + "maxCpu": { "type": "number", - "format": "double" + "format": "float", + "description": "The maximum allowed CPU request in cores.", + "readOnly": true }, - "gpu": { - "description": "The GPU request of this container instance.", - "$ref": "#/definitions/GpuResource" + "maxGpuCount": { + "type": "number", + "format": "float", + "description": "The maximum allowed GPU count.", + "readOnly": true } } }, - "ResourceLimits": { - "description": "The resource limits.", + "CapabilitiesListResult": { "type": "object", + "description": "The response containing list of capabilities.", "properties": { - "memoryInGB": { - "description": "The memory limit in GB of this container instance.", - "type": "number", - "format": "double" - }, - "cpu": { - "description": "The CPU limit of this container instance.", - "type": "number", - "format": "double" + "value": { + "type": "array", + "description": "The list of capabilities.", + "items": { + "$ref": "#/definitions/Capabilities" + }, + "x-ms-identifiers": [ + "resourceType", + "location" + ] }, - "gpu": { - "description": "The GPU limit of this container instance.", - "$ref": "#/definitions/GpuResource" + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." } } }, - "GpuResource": { - "description": "The GPU resource.", + "CloudError": { "type": "object", - "required": [ - "count", - "sku" - ], + "description": "An error response from the Container Instance service.", "properties": { - "count": { - "description": "The count of the GPU resource.", - "type": "integer", - "format": "int32" - }, - "sku": { - "type": "string", - "description": "The SKU of the GPU resource.", - "enum": [ - "K80", - "P100", - "V100" - ], - "x-ms-enum": { - "name": "GpuSku", - "modelAsString": true - } + "error": { + "$ref": "#/definitions/CloudErrorBody", + "description": "An error response from the Container Instance service." } - } + }, + "x-ms-external": true }, - "AzureFileVolume": { - "description": "The properties of the Azure File volume. Azure File shares are mounted as volumes.", + "CloudErrorBody": { "type": "object", - "required": [ - "shareName", - "storageAccountName" - ], + "description": "An error response from the Container Instance service.", "properties": { - "shareName": { - "description": "The name of the Azure File share to be mounted as a volume.", - "type": "string" - }, - "readOnly": { - "description": "The flag indicating whether the Azure File shared mounted as a volume is read-only.", - "type": "boolean" + "code": { + "type": "string", + "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." }, - "storageAccountName": { - "description": "The name of the storage account that contains the Azure File share.", - "type": "string" + "message": { + "type": "string", + "description": "A message describing the error, intended to be suitable for display in a user interface." }, - "storageAccountKey": { - "description": "The storage account access key used to access the Azure File share.", - "type": "string" + "target": { + "type": "string", + "description": "The target of the particular error. For example, the name of the property in error." }, - "storageAccountKeyReference": { - "description": "The reference to the storage account access key used to access the Azure File share.", - "type": "string" + "details": { + "type": "array", + "description": "A list of additional details about the error.", + "items": { + "$ref": "#/definitions/CloudErrorBody" + }, + "x-ms-identifiers": [ + "message", + "target" + ] } - } - }, - "EmptyDirVolume": { - "description": "The empty directory volume.", - "type": "object", - "properties": {} + }, + "x-ms-external": true }, - "SecretVolume": { - "description": "The secret volume.", + "ConfidentialComputeProperties": { "type": "object", - "additionalProperties": { - "type": "string" + "description": "The properties for confidential container group", + "properties": { + "ccePolicy": { + "type": "string", + "description": "The base64 encoded confidential compute enforcement policy" + } } }, - "SecretReferenceVolume": { - "description": "The secret reference volume.", + "ConfigMap": { "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "GitRepoVolume": { - "description": "Represents a volume that is populated with the contents of a git repository", - "required": [ - "repository" - ], + "description": "The container config map.", "properties": { - "directory": { - "description": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", - "type": "string" - }, - "repository": { - "description": "Repository URL", - "type": "string" - }, - "revision": { - "description": "Commit hash for the specified revision.", - "type": "string" + "keyValuePairs": { + "type": "object", + "description": "The key value pairs dictionary in the config map.", + "additionalProperties": { + "type": "string" + } } } }, - "Volume": { - "description": "The properties of the volume.", + "Container": { "type": "object", - "required": [ - "name" - ], + "description": "A container instance.", "properties": { "name": { - "description": "The name of the volume.", - "type": "string" - }, - "azureFile": { - "description": "The Azure File volume.", - "$ref": "#/definitions/AzureFileVolume" - }, - "emptyDir": { - "description": "The empty directory volume.", - "$ref": "#/definitions/EmptyDirVolume" - }, - "secret": { - "description": "The secret volume.", - "$ref": "#/definitions/SecretVolume" - }, - "secretReference": { - "description": "The secret reference volume.", - "$ref": "#/definitions/SecretReferenceVolume" + "type": "string", + "description": "The user-provided name of the container instance." }, - "gitRepo": { - "description": "The git repo volume.", - "$ref": "#/definitions/GitRepoVolume" + "properties": { + "$ref": "#/definitions/ContainerProperties", + "description": "The properties of the container instance.", + "x-ms-client-flatten": true } - } - }, - "VolumeMount": { - "description": "The properties of the volume mount.", - "type": "object", + }, "required": [ "name", - "mountPath" - ], + "properties" + ] + }, + "ContainerAttachResponse": { + "type": "object", + "description": "The information for the output stream from container attach.", "properties": { - "name": { - "description": "The name of the volume mount.", - "type": "string" - }, - "mountPath": { - "description": "The path within the container where the volume should be mounted. Must not contain colon (:).", - "type": "string" + "webSocketUri": { + "type": "string", + "description": "The uri for the output stream from the attach." }, - "readOnly": { - "description": "The flag indicating whether the volume mount is read-only.", - "type": "boolean" + "password": { + "type": "string", + "format": "password", + "description": "The password to the output stream from the attach. Send as an Authorization header value when connecting to the websocketUri.", + "x-ms-secret": true } } }, @@ -2112,1095 +2180,1415 @@ "description": "The container execution command, for liveness or readiness probe", "properties": { "command": { - "description": "The commands to execute within the container.", "type": "array", + "description": "The commands to execute within the container.", "items": { "type": "string" } } } }, - "ContainerHttpGet": { + "ContainerExecRequest": { "type": "object", - "description": "The container Http Get settings, for liveness or readiness probe", + "description": "The container exec request.", "properties": { - "path": { - "description": "The path to probe.", - "type": "string" - }, - "port": { - "type": "integer", - "description": "The port number to probe.", - "format": "int32" - }, - "scheme": { - "description": "The scheme.", + "command": { "type": "string", - "enum": [ - "http", - "https" - ], - "x-ms-enum": { - "name": "Scheme", - "modelAsString": true - } + "description": "The command to be executed." }, - "httpHeaders": { - "description": "The HTTP headers.", - "type": "array", - "items": { - "$ref": "#/definitions/HttpHeader" - }, - "x-ms-identifiers": [ - "name" - ] + "terminalSize": { + "$ref": "#/definitions/ContainerExecRequestTerminalSize", + "description": "The size of the terminal." } - }, - "required": [ - "port" - ] + } }, - "ContainerProbe": { + "ContainerExecRequestTerminalSize": { "type": "object", - "description": "The container probe, for liveness or readiness", + "description": "The size of the terminal.", "properties": { - "exec": { - "description": "The execution command to probe", - "$ref": "#/definitions/ContainerExec" - }, - "httpGet": { - "description": "The Http Get settings to probe", - "$ref": "#/definitions/ContainerHttpGet" - }, - "initialDelaySeconds": { - "description": "The initial delay seconds.", - "type": "integer", - "format": "int32" - }, - "periodSeconds": { - "description": "The period seconds.", - "type": "integer", - "format": "int32" - }, - "failureThreshold": { - "description": "The failure threshold.", - "type": "integer", - "format": "int32" - }, - "successThreshold": { - "description": "The success threshold.", + "rows": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The row size of the terminal" }, - "timeoutSeconds": { - "description": "The timeout seconds.", + "cols": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The column size of the terminal" } } }, - "ContainerGroup": { - "description": "A container group.", - "allOf": [ - { - "$ref": "#/definitions/Resource" + "ContainerExecResponse": { + "type": "object", + "description": "The information for the container exec command.", + "properties": { + "webSocketUri": { + "type": "string", + "description": "The uri for the exec websocket." }, - { - "$ref": "#/definitions/ContainerGroupProperties" + "password": { + "type": "string", + "format": "password", + "description": "The password to start the exec command.", + "x-ms-secret": true } - ] + } }, - "ContainerGroupProperties": { - "description": "The container group properties", + "ContainerGroup": { "type": "object", - "required": [ - "properties" - ], + "description": "A container group.", "properties": { + "location": { + "type": "string", + "description": "The resource location." + }, + "tags": { + "type": "object", + "description": "The resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "zones": { + "type": "array", + "description": "The availability zones.", + "items": { + "type": "string" + } + }, "identity": { "$ref": "#/definitions/ContainerGroupIdentity", "description": "The identity of the container group, if configured." }, "properties": { - "x-ms-client-flatten": true, - "type": "object", + "$ref": "#/definitions/ContainerGroupPropertiesProperties", "description": "The container group properties", - "properties": { - "provisioningState": { - "readOnly": true, - "type": "string", - "description": "The provisioning state of the container group. This only appears in the response." - }, - "secretReferences": { - "type": "array", - "description": "The secret references that will be referenced within the container group.", - "items": { - "$ref": "#/definitions/SecretReference" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "containers": { - "type": "array", - "description": "The containers within the container group.", - "items": { - "$ref": "#/definitions/Container" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "imageRegistryCredentials": { - "type": "array", - "description": "The image registry credentials by which the container group is created from.", - "items": { - "$ref": "#/definitions/ImageRegistryCredential" - }, - "x-ms-identifiers": [ - "username" - ] - }, - "restartPolicy": { - "type": "string", - "description": "Restart policy for all containers within the container group. \n- `Always` Always restart\n- `OnFailure` Restart on failure\n- `Never` Never restart\n", - "enum": [ - "Always", - "OnFailure", - "Never" - ], - "x-ms-enum": { - "name": "ContainerGroupRestartPolicy", - "modelAsString": true - } - }, - "ipAddress": { - "description": "The IP address type of the container group.", - "$ref": "#/definitions/IpAddress" - }, - "osType": { - "type": "string", - "description": "The operating system type required by the containers in the container group.", - "enum": [ - "Windows", - "Linux" - ], - "x-ms-enum": { - "name": "OperatingSystemTypes", - "modelAsString": true - } - }, - "volumes": { - "type": "array", - "description": "The list of volumes that can be mounted by containers in this container group.", - "items": { - "$ref": "#/definitions/Volume" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "instanceView": { - "description": "The instance view of the container group. Only valid in response.", - "readOnly": true, - "type": "object", - "properties": { - "events": { - "description": "The events of this container group.", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/Event" - }, - "x-ms-identifiers": [ - "name", - "type" - ] - }, - "state": { - "readOnly": true, - "type": "string", - "description": "The state of the container group. Only valid in response." - } - } - }, - "diagnostics": { - "description": "The diagnostic information for a container group.", - "$ref": "#/definitions/ContainerGroupDiagnostics" - }, - "subnetIds": { - "type": "array", - "description": "The subnet resource IDs for a container group.", - "items": { - "$ref": "#/definitions/ContainerGroupSubnetId" - } - }, - "dnsConfig": { - "description": "The DNS config information for a container group.", - "$ref": "#/definitions/DnsConfiguration" - }, - "sku": { - "description": "The SKU for a container group.", - "$ref": "#/definitions/ContainerGroupSku" - }, - "encryptionProperties": { - "description": "The encryption properties for a container group.", - "$ref": "#/definitions/EncryptionProperties" - }, - "initContainers": { - "type": "array", - "description": "The init containers for a container group.", - "items": { - "$ref": "#/definitions/InitContainerDefinition" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "extensions": { - "type": "array", - "description": "extensions used by virtual kubelet", - "items": { - "$ref": "#/definitions/DeploymentExtensionSpec" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "confidentialComputeProperties": { - "description": "The properties for confidential container group", - "$ref": "#/definitions/ConfidentialComputeProperties" - }, - "priority": { - "type": "string", - "description": "The priority of the container group.", - "$ref": "#/definitions/Priority", - "enum": [ - "Regular", - "Spot" - ], - "x-ms-enum": { - "name": "Priority", - "modelAsString": true - } - }, - "identityAcls": { - "description": "The access control levels of the identities.", - "$ref": "#/definitions/IdentityAcls" - }, - "containerGroupProfile": { - "description": "The reference container group profile properties.", - "$ref": "#/definitions/ContainerGroupProfileReferenceDefinition" - }, - "standbyPoolProfile": { - "description": "The reference standby pool profile properties.", - "$ref": "#/definitions/StandbyPoolProfileDefinition" - }, - "isCreatedFromStandbyPool": { - "readOnly": true, - "type": "boolean", - "description": "The flag to determine whether the container group is created from standby pool." - } - }, - "required": [ - "containers" - ] - } - } - }, - "ListResultContainerGroup": { - "description": "A container group part of the list result.", - "allOf": [ - { - "$ref": "#/definitions/Resource" - }, - { - "$ref": "#/definitions/ListResultContainerGroupProperties" + "x-ms-client-flatten": true } - ] - }, - "ListResultContainerGroupProperties": { - "description": "Properties of container group part of list result", - "type": "object", + }, "required": [ "properties" ], - "properties": { - "identity": { - "$ref": "#/definitions/ContainerGroupIdentity", - "description": "The identity of the container group, if configured." - }, - "properties": { - "x-ms-client-flatten": true, - "type": "object", - "description": "The container group properties", - "properties": { - "provisioningState": { - "readOnly": true, - "type": "string", - "description": "The provisioning state of the container group. This only appears in the response.", - "enum": [ - "NotSpecified", - "Accepted", - "Pending", - "Updating", - "Creating", - "Repairing", - "Unhealthy", - "Failed", - "Canceled", - "Succeeded", - "Deleting", - "NotAccessible", - "PreProvisioned" - ], - "x-ms-enum": { - "name": "ContainerGroupProvisioningState", - "modelAsString": true - } - }, - "secretReferences": { - "type": "array", - "description": "The secret references that will be referenced within the container group.", - "items": { - "$ref": "#/definitions/SecretReference" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "containers": { - "type": "array", - "description": "The containers within the container group.", - "items": { - "$ref": "#/definitions/Container" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "imageRegistryCredentials": { - "type": "array", - "description": "The image registry credentials by which the container group is created from.", - "items": { - "$ref": "#/definitions/ImageRegistryCredential" - }, - "x-ms-identifiers": [ - "username" - ] - }, - "restartPolicy": { - "type": "string", - "description": "Restart policy for all containers within the container group. \n- `Always` Always restart\n- `OnFailure` Restart on failure\n- `Never` Never restart\n", - "enum": [ - "Always", - "OnFailure", - "Never" - ], - "x-ms-enum": { - "name": "ContainerGroupRestartPolicy", - "modelAsString": true - } - }, - "ipAddress": { - "description": "The IP address type of the container group.", - "$ref": "#/definitions/IpAddress" - }, - "osType": { - "type": "string", - "description": "The operating system type required by the containers in the container group.", - "enum": [ - "Windows", - "Linux" - ], - "x-ms-enum": { - "name": "OperatingSystemTypes", - "modelAsString": true - } - }, - "volumes": { - "type": "array", - "description": "The list of volumes that can be mounted by containers in this container group.", - "items": { - "$ref": "#/definitions/Volume" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "diagnostics": { - "description": "The diagnostic information for a container group.", - "$ref": "#/definitions/ContainerGroupDiagnostics" - }, - "subnetIds": { - "type": "array", - "description": "The subnet resource IDs for a container group.", - "items": { - "$ref": "#/definitions/ContainerGroupSubnetId" - } - }, - "dnsConfig": { - "description": "The DNS config information for a container group.", - "$ref": "#/definitions/DnsConfiguration" - }, - "sku": { - "description": "The SKU for a container group.", - "$ref": "#/definitions/ContainerGroupSku" - }, - "encryptionProperties": { - "description": "The encryption properties for a container group.", - "$ref": "#/definitions/EncryptionProperties" - }, - "initContainers": { - "type": "array", - "description": "The init containers for a container group.", - "items": { - "$ref": "#/definitions/InitContainerDefinition" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "extensions": { - "type": "array", - "description": "extensions used by virtual kubelet", - "items": { - "$ref": "#/definitions/DeploymentExtensionSpec" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "confidentialComputeProperties": { - "description": "The properties for confidential container group", - "$ref": "#/definitions/ConfidentialComputeProperties" - }, - "priority": { - "type": "string", - "description": "The priority of the container group.", - "$ref": "#/definitions/Priority", - "enum": [ - "Regular", - "Spot" - ], - "x-ms-enum": { - "name": "Priority", - "modelAsString": true - } - }, - "identityAcls": { - "description": "The access control levels of the identities.", - "$ref": "#/definitions/IdentityAcls" - }, - "containerGroupProfile": { - "description": "The reference container group profile properties.", - "$ref": "#/definitions/ContainerGroupProfileReferenceDefinition" - }, - "standbyPoolProfile": { - "description": "The reference standby pool profile properties.", - "$ref": "#/definitions/StandbyPoolProfileDefinition" - }, - "isCreatedFromStandbyPool": { - "readOnly": true, - "type": "boolean", - "description": "The flag to determine whether the container group is created from standby pool." - } - }, - "required": [ - "containers", - "osType" - ] - } - } - }, - "ContainerGroupProfileReferenceDefinition": { - "description": "The container group profile reference.", - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "arm-id", - "description": "The container group profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}'." - }, - "revision": { - "type": "integer", - "format": "int32", - "description": "The container group profile reference revision." + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } - } + ] }, - "StandbyPoolProfileDefinition": { - "description": "The standby pool profile reference.", + "ContainerGroupDiagnostics": { "type": "object", + "description": "Container group diagnostic information.", "properties": { - "id": { - "type": "string", - "format": "arm-id", - "description": "The standby pool profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyPoolName}'." - }, - "failContainerGroupCreateOnReuseFailure": { - "type": "boolean", - "description": "The flag to determine whether ACI should fail the create request if the container group can not be obtained from standby pool." + "logAnalytics": { + "$ref": "#/definitions/LogAnalytics", + "description": "Container group log analytics information." } } }, - "DeploymentExtensionSpec": { - "description": "Extension sidecars to be added to the deployment.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the extension." - }, - "properties": { - "type": "object", - "x-ms-client-flatten": true, - "description": "Extension specific properties", - "properties": { - "extensionType": { - "type": "string", - "description": "Type of extension to be added." - }, - "version": { - "type": "string", - "description": "Version of the extension being used." - }, - "settings": { - "type": "object", - "description": "Settings for the extension." - }, - "protectedSettings": { - "type": "object", - "description": "Protected settings for the extension." - } - }, - "required": [ - "extensionType", - "version" - ] - } - }, - "required": [ - "name" - ] - }, "ContainerGroupIdentity": { + "type": "object", "description": "Identity for the container group.", "properties": { "principalId": { - "readOnly": true, "type": "string", - "description": "The principal id of the container group identity. This property will only be provided for a system assigned identity." + "description": "The principal id of the container group identity. This property will only be provided for a system assigned identity.", + "readOnly": true }, "tenantId": { - "readOnly": true, "type": "string", - "description": "The tenant id associated with the container group. This property will only be provided for a system assigned identity." + "description": "The tenant id associated with the container group. This property will only be provided for a system assigned identity.", + "readOnly": true }, "type": { - "type": "string", - "description": "The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the container group.", - "enum": [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned", - "None" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } + "$ref": "#/definitions/ResourceIdentityType", + "description": "The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the container group." }, "userAssignedIdentities": { "type": "object", "description": "The list of user identities associated with the container group.", "additionalProperties": { - "description": "The list of user identities associated with the container group. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", "$ref": "#/definitions/UserAssignedIdentities" } } } }, - "UserAssignedIdentities": { + "ContainerGroupIpAddressType": { + "type": "string", + "description": "Specifies if the IP is exposed to the public internet or private VNET.", + "enum": [ + "Public", + "Private" + ], + "x-ms-enum": { + "name": "ContainerGroupIpAddressType", + "modelAsString": true, + "values": [ + { + "name": "Public", + "value": "Public", + "description": "Public" + }, + { + "name": "Private", + "value": "Private", + "description": "Private" + } + ] + } + }, + "ContainerGroupListResult": { "type": "object", - "description": "The list of user identities associated with the container group. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "description": "The response of a container group list operation.", "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "description": "The principal id of user assigned identity." + "value": { + "type": "array", + "description": "The ListResultContainerGroup items on this page", + "items": { + "$ref": "#/definitions/ListResultContainerGroup" + } }, - "clientId": { - "readOnly": true, + "nextLink": { "type": "string", - "description": "The client id of user assigned identity." + "format": "uri", + "description": "The link to the next page of items" } + }, + "required": [ + "value" + ] + }, + "ContainerGroupNetworkProtocol": { + "type": "string", + "description": "The protocol associated with the port.", + "enum": [ + "TCP", + "UDP" + ], + "x-ms-enum": { + "name": "ContainerGroupNetworkProtocol", + "modelAsString": true, + "values": [ + { + "name": "TCP", + "value": "TCP", + "description": "TCP" + }, + { + "name": "UDP", + "value": "UDP", + "description": "UDP" + } + ] } }, - "ImageRegistryCredential": { - "description": "Image registry credential.", + "ContainerGroupPriority": { + "type": "string", + "description": "The priority of the container group.", + "enum": [ + "Regular", + "Spot" + ], + "x-ms-enum": { + "name": "ContainerGroupPriority", + "modelAsString": true, + "values": [ + { + "name": "Regular", + "value": "Regular", + "description": "Regular" + }, + { + "name": "Spot", + "value": "Spot", + "description": "Spot" + } + ] + } + }, + "ContainerGroupProfile": { "type": "object", + "description": "A container group profile object", "properties": { - "server": { - "type": "string", - "description": "The Docker image registry server without a protocol such as \"http\" and \"https\"." - }, - "username": { - "type": "string", - "description": "The username for the private registry." + "properties": { + "$ref": "#/definitions/ContainerGroupProfileProperties", + "description": "The container group profile properties", + "x-ms-client-flatten": true }, - "password": { - "type": "string", - "description": "The password for the private registry.", - "x-ms-secret": true + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } }, - "passwordReference": { + "location": { "type": "string", - "description": "The reference for the private registry password." + "description": "The geo-location where the resource lives", + "x-ms-mutability": [ + "read", + "create" + ] }, - "identity": { - "type": "string", - "description": "The identity for the private registry." + "zones": { + "type": "array", + "description": "The availability zones.", + "items": { + "type": "string" + } + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" + } + ] + }, + "ContainerGroupProfileListResult": { + "type": "object", + "description": "The response of a ContainerGroupProfile list operation.", + "properties": { + "value": { + "type": "array", + "description": "The ContainerGroupProfile items on this page", + "items": { + "$ref": "#/definitions/ContainerGroupProfile" + } }, - "identityUrl": { + "nextLink": { "type": "string", - "description": "The identity URL for the private registry." + "format": "uri", + "description": "The link to the next page of items" } }, "required": [ - "server" + "value" ] }, - "ContainerGroupDiagnostics": { - "description": "Container group diagnostic information.", + "ContainerGroupProfilePatch": { "type": "object", + "description": "Properties of container group profile that need to be patched", "properties": { - "logAnalytics": { - "description": "Container group log analytics information.", - "$ref": "#/definitions/LogAnalytics" + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } } } }, - "LogAnalytics": { - "description": "Container group log analytics information.", + "ContainerGroupProfileProperties": { "type": "object", + "description": "The container group profile properties", "properties": { - "workspaceId": { - "description": "The workspace id for log analytics", - "type": "string" + "sku": { + "$ref": "#/definitions/ContainerGroupSku", + "description": "The SKU for a container group." }, - "workspaceKey": { - "description": "The workspace key for log analytics", - "type": "string", - "x-ms-secret": true + "encryptionProperties": { + "$ref": "#/definitions/EncryptionProperties", + "description": "The encryption properties for a container group." }, - "logType": { + "containers": { + "type": "array", + "description": "The containers within the container group.", + "items": { + "$ref": "#/definitions/Container" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "initContainers": { + "type": "array", + "description": "The init containers for a container group.", + "items": { + "$ref": "#/definitions/InitContainerDefinition" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "extensions": { + "type": "array", + "description": "extensions used by virtual kubelet", + "items": { + "$ref": "#/definitions/DeploymentExtensionSpec" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "imageRegistryCredentials": { + "type": "array", + "description": "The image registry credentials by which the container group is created from.", + "items": { + "$ref": "#/definitions/ImageRegistryCredential" + }, + "x-ms-identifiers": [ + "username" + ] + }, + "restartPolicy": { + "$ref": "#/definitions/ContainerGroupRestartPolicy", + "description": "Restart policy for all containers within the container group.\n- `Always` Always restart\n- `OnFailure` Restart on failure\n- `Never` Never restart" + }, + "shutdownGracePeriod": { "type": "string", - "description": "The log type to be used.", - "enum": [ - "ContainerInsights", - "ContainerInstanceLogs" - ], - "x-ms-enum": { - "name": "LogAnalyticsLogType", - "modelAsString": true - } + "format": "date-time", + "description": "Shutdown grace period for containers in a container group." }, - "metadata": { - "type": "object", - "description": "Metadata for log analytics.", - "additionalProperties": { - "type": "string" - } + "ipAddress": { + "$ref": "#/definitions/IpAddress", + "description": "The IP address type of the container group." }, - "workspaceResourceId": { - "description": "The workspace resource id for log analytics", + "timeToLive": { "type": "string", - "x-ms-secret": true + "format": "date-time", + "description": "Post completion time to live for containers of a CG" + }, + "osType": { + "$ref": "#/definitions/OperatingSystemTypes", + "description": "The operating system type required by the containers in the container group." + }, + "volumes": { + "type": "array", + "description": "The list of volumes that can be mounted by containers in this container group.", + "items": { + "$ref": "#/definitions/Volume" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "diagnostics": { + "$ref": "#/definitions/ContainerGroupDiagnostics", + "description": "The diagnostic information for a container group." + }, + "priority": { + "$ref": "#/definitions/ContainerGroupPriority", + "description": "The priority of the container group." + }, + "confidentialComputeProperties": { + "$ref": "#/definitions/ConfidentialComputeProperties", + "description": "The properties for confidential container group" + }, + "securityContext": { + "$ref": "#/definitions/SecurityContextDefinition", + "description": "The container security properties." + }, + "revision": { + "type": "integer", + "format": "int32", + "description": "Container group profile current revision number", + "readOnly": true + }, + "registeredRevisions": { + "type": "array", + "description": "Registered revisions are calculated at request time based off the records in the table logs.", + "items": { + "type": "integer", + "format": "int32" + }, + "readOnly": true + }, + "useKrypton": { + "type": "boolean", + "description": "Gets or sets Krypton use property." } }, "required": [ - "workspaceId", - "workspaceKey" + "containers", + "osType" ] }, + "ContainerGroupProfileReferenceDefinition": { + "type": "object", + "description": "The container group profile reference.", + "properties": { + "id": { + "type": "string", + "format": "arm-id", + "description": "The container group profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}'." + }, + "revision": { + "type": "integer", + "format": "int32", + "description": "The container group profile reference revision." + } + } + }, + "ContainerGroupProfileStub": { + "type": "object", + "description": "The object that contains a reference to a Container Group Profile and it's other related properties.", + "properties": { + "resource": { + "$ref": "#/definitions/ApiEntityReference", + "description": "A reference to the container group profile ARM resource hosted in ACI RP." + }, + "revision": { + "type": "integer", + "format": "int32", + "description": "The revision of the CG profile is an optional property. If customer does not to provide a revision then NGroups will pickup the latest revision of CGProfile." + }, + "networkProfile": { + "$ref": "#/definitions/NetworkProfile", + "description": "A network profile for network settings of a ContainerGroupProfile." + }, + "storageProfile": { + "$ref": "#/definitions/StorageProfile", + "description": "Storage profile for storage related settings of a container group profile." + }, + "containerGroupProperties": { + "$ref": "#/definitions/NGroupContainerGroupProperties", + "description": "Container Group properties which can be set while creating or updating the NGroups." + } + } + }, + "ContainerGroupPropertiesProperties": { + "type": "object", + "description": "The container group properties", + "properties": { + "provisioningState": { + "type": "string", + "description": "The provisioning state of the container group. This only appears in the response.", + "readOnly": true + }, + "secretReferences": { + "type": "array", + "description": "The secret references that will be referenced within the container group.", + "items": { + "$ref": "#/definitions/SecretReference" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "containers": { + "type": "array", + "description": "The containers within the container group.", + "items": { + "$ref": "#/definitions/Container" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "imageRegistryCredentials": { + "type": "array", + "description": "The image registry credentials by which the container group is created from.", + "items": { + "$ref": "#/definitions/ImageRegistryCredential" + }, + "x-ms-identifiers": [ + "username" + ] + }, + "restartPolicy": { + "$ref": "#/definitions/ContainerGroupRestartPolicy", + "description": "Restart policy for all containers within the container group.\n- `Always` Always restart\n- `OnFailure` Restart on failure\n- `Never` Never restart" + }, + "ipAddress": { + "$ref": "#/definitions/IpAddress", + "description": "The IP address type of the container group." + }, + "osType": { + "$ref": "#/definitions/OperatingSystemTypes", + "description": "The operating system type required by the containers in the container group." + }, + "volumes": { + "type": "array", + "description": "The list of volumes that can be mounted by containers in this container group.", + "items": { + "$ref": "#/definitions/Volume" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "instanceView": { + "$ref": "#/definitions/ContainerGroupPropertiesPropertiesInstanceView", + "description": "The instance view of the container group. Only valid in response.", + "readOnly": true + }, + "diagnostics": { + "$ref": "#/definitions/ContainerGroupDiagnostics", + "description": "The diagnostic information for a container group." + }, + "subnetIds": { + "type": "array", + "description": "The subnet resource IDs for a container group.", + "items": { + "$ref": "#/definitions/ContainerGroupSubnetId" + } + }, + "dnsConfig": { + "$ref": "#/definitions/DnsConfiguration", + "description": "The DNS config information for a container group." + }, + "sku": { + "$ref": "#/definitions/ContainerGroupSku", + "description": "The SKU for a container group." + }, + "encryptionProperties": { + "$ref": "#/definitions/EncryptionProperties", + "description": "The encryption properties for a container group." + }, + "initContainers": { + "type": "array", + "description": "The init containers for a container group.", + "items": { + "$ref": "#/definitions/InitContainerDefinition" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "extensions": { + "type": "array", + "description": "extensions used by virtual kubelet", + "items": { + "$ref": "#/definitions/DeploymentExtensionSpec" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "confidentialComputeProperties": { + "$ref": "#/definitions/ConfidentialComputeProperties", + "description": "The properties for confidential container group" + }, + "priority": { + "$ref": "#/definitions/ContainerGroupPriority", + "description": "The priority of the container group." + }, + "identityAcls": { + "$ref": "#/definitions/IdentityAcls", + "description": "The access control levels of the identities." + }, + "containerGroupProfile": { + "$ref": "#/definitions/ContainerGroupProfileReferenceDefinition", + "description": "The reference container group profile properties." + }, + "standbyPoolProfile": { + "$ref": "#/definitions/StandbyPoolProfileDefinition", + "description": "The reference standby pool profile properties." + }, + "isCreatedFromStandbyPool": { + "type": "boolean", + "description": "The flag to determine whether the container group is created from standby pool.", + "readOnly": true + } + }, + "required": [ + "containers" + ] + }, + "ContainerGroupPropertiesPropertiesInstanceView": { + "type": "object", + "description": "The instance view of the container group. Only valid in response.", + "properties": { + "events": { + "type": "array", + "description": "The events of this container group.", + "items": { + "$ref": "#/definitions/Event" + }, + "readOnly": true, + "x-ms-identifiers": [ + "name", + "type" + ] + }, + "state": { + "type": "string", + "description": "The state of the container group. Only valid in response.", + "readOnly": true + } + } + }, + "ContainerGroupProvisioningState": { + "type": "string", + "description": "The provisioning state of the container group. This only appears in the response.", + "enum": [ + "NotSpecified", + "Accepted", + "Pending", + "Updating", + "Creating", + "Repairing", + "Unhealthy", + "Failed", + "Canceled", + "Succeeded", + "Deleting", + "NotAccessible", + "PreProvisioned" + ], + "x-ms-enum": { + "name": "ContainerGroupProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "NotSpecified", + "value": "NotSpecified", + "description": "NotSpecified" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "Accepted" + }, + { + "name": "Pending", + "value": "Pending", + "description": "Pending" + }, + { + "name": "Updating", + "value": "Updating", + "description": "Updating" + }, + { + "name": "Creating", + "value": "Creating", + "description": "Creating" + }, + { + "name": "Repairing", + "value": "Repairing", + "description": "Repairing" + }, + { + "name": "Unhealthy", + "value": "Unhealthy", + "description": "Unhealthy" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Failed" + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Canceled" + }, + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Succeeded" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "Deleting" + }, + { + "name": "NotAccessible", + "value": "NotAccessible", + "description": "NotAccessible" + }, + { + "name": "PreProvisioned", + "value": "PreProvisioned", + "description": "PreProvisioned" + } + ] + } + }, + "ContainerGroupRestartPolicy": { + "type": "string", + "description": "Restart policy for all containers within the container group.\n- `Always` Always restart\n- `OnFailure` Restart on failure\n- `Never` Never restart", + "enum": [ + "Always", + "OnFailure", + "Never" + ], + "x-ms-enum": { + "name": "ContainerGroupRestartPolicy", + "modelAsString": true, + "values": [ + { + "name": "Always", + "value": "Always", + "description": "Always" + }, + { + "name": "OnFailure", + "value": "OnFailure", + "description": "OnFailure" + }, + { + "name": "Never", + "value": "Never", + "description": "Never" + } + ] + } + }, + "ContainerGroupSku": { + "type": "string", + "description": "The container group SKU.", + "enum": [ + "NotSpecified", + "Standard", + "Dedicated", + "Confidential" + ], + "x-ms-enum": { + "name": "ContainerGroupSku", + "modelAsString": true, + "values": [ + { + "name": "NotSpecified", + "value": "NotSpecified", + "description": "NotSpecified" + }, + { + "name": "Standard", + "value": "Standard", + "description": "Standard" + }, + { + "name": "Dedicated", + "value": "Dedicated", + "description": "Dedicated" + }, + { + "name": "Confidential", + "value": "Confidential", + "description": "Confidential" + } + ] + } + }, "ContainerGroupSubnetId": { - "description": "Container group subnet information.", "type": "object", + "description": "Container group subnet information.", "properties": { "id": { - "description": "Resource ID of virtual network and subnet.", - "type": "string" + "type": "string", + "description": "Resource ID of virtual network and subnet." }, "name": { - "description": "Friendly name for the subnet.", - "type": "string" + "type": "string", + "description": "Friendly name for the subnet." + } + }, + "required": [ + "id" + ] + }, + "ContainerHttpGet": { + "type": "object", + "description": "The container Http Get settings, for liveness or readiness probe", + "properties": { + "path": { + "type": "string", + "description": "The path to probe." + }, + "port": { + "type": "integer", + "format": "int32", + "description": "The port number to probe." + }, + "scheme": { + "$ref": "#/definitions/Scheme", + "description": "The scheme." + }, + "httpHeaders": { + "type": "array", + "description": "The HTTP headers.", + "items": { + "$ref": "#/definitions/HttpHeader" + }, + "x-ms-identifiers": [ + "name" + ] + } + }, + "required": [ + "port" + ] + }, + "ContainerInstanceOperationsOrigin": { + "type": "string", + "description": "The intended executor of the operation.", + "enum": [ + "User", + "System" + ], + "x-ms-enum": { + "name": "ContainerInstanceOperationsOrigin", + "modelAsString": true, + "values": [ + { + "name": "User", + "value": "User", + "description": "User" + }, + { + "name": "System", + "value": "System", + "description": "System" + } + ] + } + }, + "ContainerNetworkProtocol": { + "type": "string", + "description": "The protocol associated with the port.", + "enum": [ + "TCP", + "UDP" + ], + "x-ms-enum": { + "name": "ContainerNetworkProtocol", + "modelAsString": true, + "values": [ + { + "name": "TCP", + "value": "TCP", + "description": "TCP" + }, + { + "name": "UDP", + "value": "UDP", + "description": "UDP" + } + ] + } + }, + "ContainerPort": { + "type": "object", + "description": "The port exposed on the container instance.", + "properties": { + "protocol": { + "$ref": "#/definitions/ContainerNetworkProtocol", + "description": "The protocol associated with the port." + }, + "port": { + "type": "integer", + "format": "int32", + "description": "The port number exposed within the container group." + } + }, + "required": [ + "port" + ] + }, + "ContainerProbe": { + "type": "object", + "description": "The container probe, for liveness or readiness", + "properties": { + "exec": { + "$ref": "#/definitions/ContainerExec", + "description": "The execution command to probe" + }, + "httpGet": { + "$ref": "#/definitions/ContainerHttpGet", + "description": "The Http Get settings to probe" + }, + "initialDelaySeconds": { + "type": "integer", + "format": "int32", + "description": "The initial delay seconds." + }, + "periodSeconds": { + "type": "integer", + "format": "int32", + "description": "The period seconds." + }, + "failureThreshold": { + "type": "integer", + "format": "int32", + "description": "The failure threshold." + }, + "successThreshold": { + "type": "integer", + "format": "int32", + "description": "The success threshold." + }, + "timeoutSeconds": { + "type": "integer", + "format": "int32", + "description": "The timeout seconds." } - }, - "required": [ - "id" - ] + } }, - "IpAddress": { - "description": "IP address for the container group.", + "ContainerProperties": { "type": "object", + "description": "The container instance properties.", "properties": { + "image": { + "type": "string", + "description": "The name of the image used to create the container instance." + }, + "command": { + "type": "array", + "description": "The commands to execute within the container instance in exec form.", + "items": { + "type": "string" + } + }, "ports": { "type": "array", - "description": "The list of ports exposed on the container group.", + "description": "The exposed ports on the container instance.", "items": { - "$ref": "#/definitions/Port" + "$ref": "#/definitions/ContainerPort" }, "x-ms-identifiers": [ "port" ] }, - "type": { - "type": "string", - "description": "Specifies if the IP is exposed to the public internet or private VNET.", - "enum": [ - "Public", - "Private" - ], - "x-ms-enum": { - "name": "ContainerGroupIpAddressType", - "modelAsString": true - } + "environmentVariables": { + "type": "array", + "description": "The environment variables to set in the container instance.", + "items": { + "$ref": "#/definitions/EnvironmentVariable" + }, + "x-ms-identifiers": [ + "name" + ] }, - "ip": { + "instanceView": { + "$ref": "#/definitions/ContainerPropertiesInstanceView", + "description": "The instance view of the container instance. Only valid in response.", + "readOnly": true + }, + "resources": { + "$ref": "#/definitions/ResourceRequirements", + "description": "The resource requirements of the container instance." + }, + "volumeMounts": { + "type": "array", + "description": "The volume mounts available to the container instance.", + "items": { + "$ref": "#/definitions/VolumeMount" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "livenessProbe": { + "$ref": "#/definitions/ContainerProbe", + "description": "The liveness probe." + }, + "readinessProbe": { + "$ref": "#/definitions/ContainerProbe", + "description": "The readiness probe." + }, + "securityContext": { + "$ref": "#/definitions/SecurityContextDefinition", + "description": "The container security properties." + }, + "configMap": { + "$ref": "#/definitions/ConfigMap", + "description": "The config map." + } + } + }, + "ContainerPropertiesInstanceView": { + "type": "object", + "description": "The instance view of the container instance. Only valid in response.", + "properties": { + "restartCount": { + "type": "integer", + "format": "int32", + "description": "The number of times that the container instance has been restarted.", + "readOnly": true + }, + "currentState": { + "$ref": "#/definitions/ContainerState", + "description": "Current container instance state.", + "readOnly": true + }, + "previousState": { + "$ref": "#/definitions/ContainerState", + "description": "Previous container instance state.", + "readOnly": true + }, + "events": { + "type": "array", + "description": "The events of the container instance.", + "items": { + "$ref": "#/definitions/Event" + }, + "readOnly": true, + "x-ms-identifiers": [ + "name", + "type" + ] + } + } + }, + "ContainerState": { + "type": "object", + "description": "The container instance state.", + "properties": { + "state": { "type": "string", - "description": "The IP exposed to the public internet." + "description": "The state of the container instance.", + "readOnly": true }, - "dnsNameLabel": { + "startTime": { "type": "string", - "description": "The Dns name label for the IP." + "format": "date-time", + "description": "The date-time when the container instance state started.", + "readOnly": true }, - "autoGeneratedDomainNameLabelScope": { + "exitCode": { + "type": "integer", + "format": "int32", + "description": "The container instance exit codes correspond to those from the `docker run` command.", + "readOnly": true + }, + "finishTime": { "type": "string", - "description": "The value representing the security enum. The 'Unsecure' value is the default value if not selected and means the object's domain name label is not secured against subdomain takeover. The 'TenantReuse' value is the default value if selected and means the object's domain name label can be reused within the same tenant. The 'SubscriptionReuse' value means the object's domain name label can be reused within the same subscription. The 'ResourceGroupReuse' value means the object's domain name label can be reused within the same resource group. The 'NoReuse' value means the object's domain name label cannot be reused within the same resource group, subscription, or tenant.", - "enum": [ - "Unsecure", - "TenantReuse", - "SubscriptionReuse", - "ResourceGroupReuse", - "Noreuse" - ], - "default": "Unsecure", - "x-ms-enum": { - "name": "dnsNameLabelReusePolicy", - "modelAsString": true - } + "format": "date-time", + "description": "The date-time when the container instance state finished.", + "readOnly": true }, - "fqdn": { - "readOnly": true, + "detailStatus": { "type": "string", - "description": "The FQDN for the IP." + "description": "The human-readable status of the container instance state.", + "readOnly": true } - }, - "required": [ - "ports", - "type" - ] + } }, - "Port": { - "description": "The port exposed on the container group.", + "DeploymentExtensionSpec": { "type": "object", + "description": "Extension sidecars to be added to the deployment.", "properties": { - "protocol": { + "name": { "type": "string", - "description": "The protocol associated with the port.", - "enum": [ - "TCP", - "UDP" - ], - "x-ms-enum": { - "name": "ContainerGroupNetworkProtocol", - "modelAsString": true - } + "description": "Name of the extension." }, - "port": { - "type": "integer", - "description": "The port number.", - "format": "int32" + "properties": { + "$ref": "#/definitions/DeploymentExtensionSpecProperties", + "description": "Extension specific properties", + "x-ms-client-flatten": true } }, "required": [ - "port" + "name" ] }, - "ContainerPort": { - "description": "The port exposed on the container instance.", + "DeploymentExtensionSpecProperties": { "type": "object", + "description": "Extension specific properties", "properties": { - "protocol": { + "extensionType": { "type": "string", - "description": "The protocol associated with the port.", - "enum": [ - "TCP", - "UDP" - ], - "x-ms-enum": { - "name": "ContainerNetworkProtocol", - "modelAsString": true - } + "description": "Type of extension to be added." }, - "port": { - "type": "integer", - "format": "int32", - "description": "The port number exposed within the container group." + "version": { + "type": "string", + "description": "Version of the extension being used." + }, + "settings": { + "description": "Settings for the extension." + }, + "protectedSettings": { + "description": "Protected settings for the extension." } }, "required": [ - "port" + "extensionType", + "version" ] }, - "EnvironmentVariable": { - "description": "The environment variable to set within the container instance.", + "DnsConfiguration": { "type": "object", + "description": "DNS configuration for the container group.", "properties": { - "name": { - "type": "string", - "description": "The name of the environment variable." - }, - "value": { - "type": "string", - "description": "The value of the environment variable." + "nameServers": { + "type": "array", + "description": "The DNS servers for the container group.", + "items": { + "type": "string" + } }, - "secureValue": { + "searchDomains": { "type": "string", - "description": "The value of the secure environment variable.", - "x-ms-secret": true + "description": "The DNS search domains for hostname lookup in the container group." }, - "secureValueReference": { + "options": { "type": "string", - "description": "The reference of the secure environment variable." + "description": "The DNS options for the container group." } }, "required": [ - "name" + "nameServers" ] }, - "OperationListResult": { - "description": "The operation list response that contains all operations for Azure Container Instance service.", + "ElasticProfile": { "type": "object", + "description": "Describes the elastic profile of the NGroup", "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "x-ms-identifiers": [ - "name" - ], - "description": "The list of operations." + "desiredCount": { + "type": "integer", + "format": "int32" }, - "nextLink": { + "maintainDesiredCount": { + "type": "boolean", + "description": "Flag that indicates whether desiredCount should be maintained when customer deletes SPECIFIC container groups (CGs) from the NGroups. In this case, new CGs will be created by NGroup to compensate for the specific deleted ones." + }, + "containerGroupNamingPolicy": { + "$ref": "#/definitions/ElasticProfileContainerGroupNamingPolicy", + "description": "Container Groups are named on a generic guid based naming scheme/policy. Customer can modify naming policy to add prefix to CG names during scale out operation." + } + } + }, + "ElasticProfileContainerGroupNamingPolicy": { + "type": "object", + "description": "Container Groups are named on a generic guid based naming scheme/policy. Customer can modify naming policy to add prefix to CG names during scale out operation.", + "properties": { + "guidNamingPolicy": { + "$ref": "#/definitions/ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy" + } + } + }, + "ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy": { + "type": "object", + "properties": { + "prefix": { "type": "string", - "description": "The URI to fetch the next page of operations." + "description": "The prefix can be used when there are tooling limitations (e.g. on the Azure portal where CGs from multiple NGroups exist in the same RG). The prefix with the suffixed resource name must still follow Azure resource naming guidelines." } } }, - "Operation": { - "description": "An operation for Azure Container Instance service.", + "EncryptionProperties": { + "type": "object", + "description": "The container group encryption properties.", + "properties": { + "vaultBaseUrl": { + "type": "string", + "description": "The keyvault base url." + }, + "keyName": { + "type": "string", + "description": "The encryption key name." + }, + "keyVersion": { + "type": "string", + "description": "The encryption key version." + }, + "identity": { + "type": "string", + "description": "The keyvault managed identity." + } + }, + "required": [ + "vaultBaseUrl", + "keyName", + "keyVersion" + ] + }, + "EnvironmentVariable": { "type": "object", + "description": "The environment variable to set within the container instance.", "properties": { "name": { "type": "string", - "description": "The name of the operation." + "description": "The name of the environment variable." }, - "display": { - "description": "The display information of the operation.", - "type": "object", - "properties": { - "provider": { - "description": "The name of the provider of the operation.", - "type": "string" - }, - "resource": { - "type": "string", - "description": "The name of the resource type of the operation." - }, - "operation": { - "description": "The friendly name of the operation.", - "type": "string" - }, - "description": { - "description": "The description of the operation.", - "type": "string" - } - } + "value": { + "type": "string", + "description": "The value of the environment variable." }, - "properties": { - "type": "object", - "description": "The additional properties.", - "x-ms-client-flatten": true + "secureValue": { + "type": "string", + "format": "password", + "description": "The value of the secure environment variable.", + "x-ms-secret": true }, - "origin": { + "secureValueReference": { "type": "string", - "description": "The intended executor of the operation.", - "enum": [ - "User", - "System" - ], - "x-ms-enum": { - "name": "ContainerInstanceOperationsOrigin", - "modelAsString": true - } + "description": "The reference of the secure environment variable." } }, "required": [ - "name", - "display" + "name" ] }, - "UsageListResult": { - "description": "The response containing the usage data", - "type": "object", - "properties": { - "value": { - "readOnly": true, - "type": "array", - "description": "The usage data.", - "items": { - "$ref": "#/definitions/Usage" - }, - "x-ms-identifiers": [ - "name" - ] - } - } - }, - "Usage": { - "description": "A single usage result", + "Event": { "type": "object", + "description": "A container group or container instance event.", "properties": { - "id": { - "readOnly": true, + "count": { + "type": "integer", + "format": "int32", + "description": "The count of the event.", + "readOnly": true + }, + "firstTimestamp": { "type": "string", - "description": "Id of the usage result" + "format": "date-time", + "description": "The date-time of the earliest logged event.", + "readOnly": true }, - "unit": { - "readOnly": true, + "lastTimestamp": { "type": "string", - "description": "Unit of the usage result" + "format": "date-time", + "description": "The date-time of the latest logged event.", + "readOnly": true }, - "currentValue": { - "readOnly": true, - "type": "integer", - "format": "int32", - "description": "The current usage of the resource" + "name": { + "type": "string", + "description": "The event name.", + "readOnly": true }, - "limit": { - "readOnly": true, - "type": "integer", - "format": "int32", - "description": "The maximum permitted usage of the resource." + "message": { + "type": "string", + "description": "The event message.", + "readOnly": true }, - "name": { - "readOnly": true, - "type": "object", - "description": "The name object of the resource", - "properties": { - "value": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "localizedValue": { - "readOnly": true, - "type": "string", - "description": "The localized name of the resource" - } - } + "type": { + "type": "string", + "description": "The event type.", + "readOnly": true } } }, - "ContainerGroupListResult": { - "description": "The container group list response that contains the container group properties.", + "FileShare": { "type": "object", + "description": "File shares that can be mounted on container groups.", "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/ListResultContainerGroup" - }, - "description": "The list of container groups." + "name": { + "type": "string" }, - "nextLink": { - "type": "string", - "description": "The URI to fetch the next page of container groups." + "resourceGroupName": { + "type": "string" + }, + "storageAccountName": { + "type": "string" + }, + "properties": { + "$ref": "#/definitions/FileShareProperties" } } }, - "Logs": { - "description": "The logs.", + "FileShareProperties": { "type": "object", "properties": { - "content": { + "shareAccessType": { + "$ref": "#/definitions/AzureFileShareAccessType", + "description": "Specifies how Container Groups can access the Azure file share i.e. all CG will share same Azure file share or going to have exclusive file share." + }, + "shareAccessTier": { "type": "string", - "description": "The content of the log." + "description": "Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Learn more at: https://learn.microsoft.com/en-us/rest/api/storagerp/file-shares/create?tabs=HTTP#shareaccesstier", + "default": "TransactionOptimized", + "enum": [ + "Cool", + "Hot", + "Premium", + "TransactionOptimized" + ], + "x-ms-enum": { + "name": "AzureFileShareAccessTier", + "modelAsString": false, + "values": [ + { + "name": "Cool", + "value": "Cool", + "description": "Cool" + }, + { + "name": "Hot", + "value": "Hot", + "description": "Hot" + }, + { + "name": "Premium", + "value": "Premium", + "description": "Premium" + }, + { + "name": "TransactionOptimized", + "value": "TransactionOptimized", + "description": "TransactionOptimized" + } + ] + } } } }, - "ContainerExecRequest": { - "description": "The container exec request.", + "GitRepoVolume": { "type": "object", + "description": "Represents a volume that is populated with the contents of a git repository", "properties": { - "command": { + "directory": { "type": "string", - "description": "The command to be executed." + "description": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name." }, - "terminalSize": { - "type": "object", - "description": "The size of the terminal.", - "properties": { - "rows": { - "type": "integer", - "format": "int32", - "description": "The row size of the terminal" - }, - "cols": { - "type": "integer", - "format": "int32", - "description": "The column size of the terminal" - } - } - } - } - }, - "ContainerExecResponse": { - "description": "The information for the container exec command.", - "type": "object", - "properties": { - "webSocketUri": { + "repository": { "type": "string", - "description": "The uri for the exec websocket." + "description": "Repository URL" }, - "password": { + "revision": { "type": "string", - "description": "The password to start the exec command.", - "x-ms-secret": true + "description": "Commit hash for the specified revision." } - } + }, + "required": [ + "repository" + ] }, - "ContainerAttachResponse": { - "description": "The information for the output stream from container attach.", + "GpuResource": { "type": "object", + "description": "The GPU resource.", "properties": { - "webSocketUri": { - "type": "string", - "description": "The uri for the output stream from the attach." + "count": { + "type": "integer", + "format": "int32", + "description": "The count of the GPU resource." }, - "password": { - "type": "string", - "description": "The password to the output stream from the attach. Send as an Authorization header value when connecting to the websocketUri.", - "x-ms-secret": true + "sku": { + "$ref": "#/definitions/GpuSku", + "description": "The SKU of the GPU resource." } + }, + "required": [ + "count", + "sku" + ] + }, + "GpuSku": { + "type": "string", + "description": "The SKU of the GPU resource.", + "enum": [ + "K80", + "P100", + "V100" + ], + "x-ms-enum": { + "name": "GpuSku", + "modelAsString": true, + "values": [ + { + "name": "K80", + "value": "K80", + "description": "K80" + }, + { + "name": "P100", + "value": "P100", + "description": "P100" + }, + { + "name": "V100", + "value": "V100", + "description": "V100" + } + ] } }, "HttpHeader": { - "description": "The HTTP header.", "type": "object", + "description": "The HTTP header.", "properties": { "name": { "type": "string", @@ -3212,546 +3600,729 @@ } } }, - "DnsConfiguration": { - "description": "DNS configuration for the container group.", + "IdentityAccessControl": { "type": "object", - "required": [ - "nameServers" + "description": "The access control for an identity", + "properties": { + "access": { + "$ref": "#/definitions/IdentityAccessLevel", + "description": "The access level of the identity." + }, + "identity": { + "type": "string", + "format": "arm-id", + "description": "An identity." + } + } + }, + "IdentityAccessLevel": { + "type": "string", + "description": "The access level of an identity.", + "enum": [ + "All", + "System", + "User" ], + "x-ms-enum": { + "name": "IdentityAccessLevel", + "modelAsString": true, + "values": [ + { + "name": "All", + "value": "All", + "description": "All" + }, + { + "name": "System", + "value": "System", + "description": "System" + }, + { + "name": "User", + "value": "User", + "description": "User" + } + ] + } + }, + "IdentityAcls": { + "type": "object", + "description": "The access control levels of the identities.", "properties": { - "nameServers": { - "description": "The DNS servers for the container group.", + "defaultAccess": { + "$ref": "#/definitions/IdentityAccessLevel", + "description": "The default access level." + }, + "acls": { "type": "array", + "description": "The access control levels for each identity.", "items": { - "type": "string" - } + "$ref": "#/definitions/IdentityAccessControl" + }, + "x-ms-identifiers": [ + "identity" + ] + } + } + }, + "ImageRegistryCredential": { + "type": "object", + "description": "Image registry credential.", + "properties": { + "server": { + "type": "string", + "description": "The Docker image registry server without a protocol such as \"http\" and \"https\"." }, - "searchDomains": { - "description": "The DNS search domains for hostname lookup in the container group.", - "type": "string" + "username": { + "type": "string", + "description": "The username for the private registry." }, - "options": { - "description": "The DNS options for the container group.", - "type": "string" + "password": { + "type": "string", + "format": "password", + "description": "The password for the private registry.", + "x-ms-secret": true + }, + "passwordReference": { + "type": "string", + "description": "The reference for the private registry password." + }, + "identity": { + "type": "string", + "description": "The identity for the private registry." + }, + "identityUrl": { + "type": "string", + "description": "The identity URL for the private registry." } - } + }, + "required": [ + "server" + ] }, - "Resource": { + "InitContainerDefinition": { "type": "object", - "description": "The Resource model definition.", + "description": "The init container definition.", "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "The resource id." - }, "name": { - "readOnly": true, - "type": "string", - "description": "The resource name." - }, - "type": { - "readOnly": true, "type": "string", - "description": "The resource type." + "description": "The name for the init container." }, - "location": { + "properties": { + "$ref": "#/definitions/InitContainerPropertiesDefinition", + "description": "The properties for the init container.", + "x-ms-client-flatten": true + } + }, + "required": [ + "name", + "properties" + ] + }, + "InitContainerPropertiesDefinition": { + "type": "object", + "description": "The init container definition properties.", + "properties": { + "image": { "type": "string", - "description": "The resource location." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "The resource tags." + "description": "The image of the init container." }, - "zones": { - "description": "The zones for the container group.", + "command": { "type": "array", + "description": "The command to execute within the init container in exec form.", "items": { "type": "string" } - } - }, - "x-ms-azure-resource": true - }, - "CachedImagesListResult": { - "description": "The response containing cached images.", - "type": "object", - "properties": { - "value": { + }, + "environmentVariables": { "type": "array", + "description": "The environment variables to set in the init container.", "items": { - "$ref": "#/definitions/cachedImages" + "$ref": "#/definitions/EnvironmentVariable" }, "x-ms-identifiers": [ - "image" - ], - "description": "The list of cached images." + "name" + ] }, - "nextLink": { - "type": "string", - "description": "The URI to fetch the next page of cached images." - } - } - }, - "cachedImages": { - "description": "The cached image and OS type.", - "type": "object", - "required": [ - "osType", - "image" - ], - "properties": { - "osType": { - "type": "string", - "description": "The OS type of the cached image." + "instanceView": { + "$ref": "#/definitions/InitContainerPropertiesDefinitionInstanceView", + "description": "The instance view of the init container. Only valid in response.", + "readOnly": true }, - "image": { - "type": "string", - "description": "The cached image name." + "volumeMounts": { + "type": "array", + "description": "The volume mounts available to the init container.", + "items": { + "$ref": "#/definitions/VolumeMount" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "securityContext": { + "$ref": "#/definitions/SecurityContextDefinition", + "description": "The container security properties." } } }, - "CapabilitiesListResult": { - "description": "The response containing list of capabilities.", + "InitContainerPropertiesDefinitionInstanceView": { "type": "object", + "description": "The instance view of the init container. Only valid in response.", "properties": { - "value": { + "restartCount": { + "type": "integer", + "format": "int32", + "description": "The number of times that the init container has been restarted.", + "readOnly": true + }, + "currentState": { + "$ref": "#/definitions/ContainerState", + "description": "The current state of the init container.", + "readOnly": true + }, + "previousState": { + "$ref": "#/definitions/ContainerState", + "description": "The previous state of the init container.", + "readOnly": true + }, + "events": { "type": "array", + "description": "The events of the init container.", "items": { - "$ref": "#/definitions/Capabilities" + "$ref": "#/definitions/Event" }, + "readOnly": true, "x-ms-identifiers": [ - "resourceType", - "location" - ], - "description": "The list of capabilities." - }, - "nextLink": { - "type": "string", - "description": "The URI to fetch the next page of capabilities." + "name", + "type" + ] } } }, - "Capabilities": { - "description": "The regional capabilities.", + "IpAddress": { "type": "object", + "description": "IP address for the container group.", "properties": { - "resourceType": { - "type": "string", - "readOnly": true, - "description": "The resource type that this capability describes." + "ports": { + "type": "array", + "description": "The list of ports exposed on the container group.", + "items": { + "$ref": "#/definitions/Port" + }, + "x-ms-identifiers": [ + "port" + ] }, - "osType": { - "type": "string", - "readOnly": true, - "description": "The OS type that this capability describes." + "type": { + "$ref": "#/definitions/ContainerGroupIpAddressType", + "description": "Specifies if the IP is exposed to the public internet or private VNET." }, - "location": { + "ip": { "type": "string", - "readOnly": true, - "description": "The resource location." + "description": "The IP exposed to the public internet." }, - "ipAddressType": { + "dnsNameLabel": { "type": "string", - "readOnly": true, - "description": "The ip address type that this capability describes." + "description": "The Dns name label for the IP." }, - "gpu": { + "autoGeneratedDomainNameLabelScope": { "type": "string", - "readOnly": true, - "description": "The GPU sku that this capability describes." - }, - "capabilities": { - "type": "object", - "readOnly": true, - "description": "The supported capabilities.", - "properties": { - "maxMemoryInGB": { - "type": "number", - "readOnly": true, - "description": "The maximum allowed memory request in GB." - }, - "maxCpu": { - "type": "number", - "readOnly": true, - "description": "The maximum allowed CPU request in cores." - }, - "maxGpuCount": { - "type": "number", - "readOnly": true, - "description": "The maximum allowed GPU count." - } + "description": "The value representing the security enum. The 'Unsecure' value is the default value if not selected and means the object's domain name label is not secured against subdomain takeover. The 'TenantReuse' value is the default value if selected and means the object's domain name label can be reused within the same tenant. The 'SubscriptionReuse' value means the object's domain name label can be reused within the same subscription. The 'ResourceGroupReuse' value means the object's domain name label can be reused within the same resource group. The 'NoReuse' value means the object's domain name label cannot be reused within the same resource group, subscription, or tenant.", + "default": "Unsecure", + "enum": [ + "Unsecure", + "TenantReuse", + "SubscriptionReuse", + "ResourceGroupReuse", + "Noreuse" + ], + "x-ms-enum": { + "name": "DnsNameLabelReusePolicy", + "modelAsString": true, + "values": [ + { + "name": "Unsecure", + "value": "Unsecure", + "description": "Unsecure" + }, + { + "name": "TenantReuse", + "value": "TenantReuse", + "description": "TenantReuse" + }, + { + "name": "SubscriptionReuse", + "value": "SubscriptionReuse", + "description": "SubscriptionReuse" + }, + { + "name": "ResourceGroupReuse", + "value": "ResourceGroupReuse", + "description": "ResourceGroupReuse" + }, + { + "name": "Noreuse", + "value": "Noreuse", + "description": "Noreuse" + } + ] } - } - } - }, - "ContainerGroupSku": { - "description": "The container group SKU.", - "type": "string", - "enum": [ - "NotSpecified", - "Standard", - "Dedicated", - "Confidential" - ], - "x-ms-enum": { - "name": "ContainerGroupSku", - "modelAsString": true - } - }, - "ContainerGroupRestartPolicy": { - "type": "string", - "description": "Restart policy for all containers within the container group. \n- `Always` Always restart\n- `OnFailure` Restart on failure\n- `Never` Never restart\n", - "enum": [ - "Always", - "OnFailure", - "Never" - ], - "x-ms-enum": { - "name": "ContainerGroupRestartPolicy", - "modelAsString": true - } - }, - "OSType": { - "type": "string", - "description": "The operating system type required by the containers in the container group.", - "enum": [ - "Windows", - "Linux" - ], - "x-ms-enum": { - "name": "OperatingSystemTypes", - "modelAsString": true - } - }, - "EncryptionProperties": { - "description": "The container group encryption properties.", - "type": "object", - "properties": { - "vaultBaseUrl": { - "description": "The keyvault base url.", - "type": "string" - }, - "keyName": { - "description": "The encryption key name.", - "type": "string" - }, - "keyVersion": { - "description": "The encryption key version.", - "type": "string" }, - "identity": { + "fqdn": { "type": "string", - "description": "The keyvault managed identity." + "description": "The FQDN for the IP.", + "readOnly": true } }, "required": [ - "vaultBaseUrl", - "keyName", - "keyVersion" + "ports", + "type" ] }, - "InitContainerDefinition": { - "description": "The init container definition.", + "ListResultContainerGroup": { "type": "object", + "description": "A container group part of the list result.", "properties": { + "id": { + "type": "string", + "description": "The resource id.", + "readOnly": true + }, "name": { - "description": "The name for the init container.", - "type": "string" + "type": "string", + "description": "The resource name.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "The resource type.", + "readOnly": true + }, + "location": { + "type": "string", + "description": "The resource location." + }, + "tags": { + "type": "object", + "description": "The resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "zones": { + "type": "array", + "description": "The zones for the container group.", + "items": { + "type": "string" + } + }, + "identity": { + "$ref": "#/definitions/ContainerGroupIdentity", + "description": "The identity of the container group, if configured." }, "properties": { - "description": "The properties for the init container.", - "x-ms-client-flatten": true, - "$ref": "#/definitions/InitContainerPropertiesDefinition" + "$ref": "#/definitions/ListResultContainerGroupPropertiesProperties", + "description": "The container group properties", + "x-ms-client-flatten": true } }, "required": [ - "name", "properties" ] }, - "InitContainerPropertiesDefinition": { - "description": "The init container definition properties.", + "ListResultContainerGroupPropertiesProperties": { "type": "object", + "description": "The container group properties", "properties": { - "image": { - "description": "The image of the init container.", - "type": "string" + "provisioningState": { + "$ref": "#/definitions/ContainerGroupProvisioningState", + "description": "The provisioning state of the container group. This only appears in the response.", + "readOnly": true }, - "command": { - "description": "The command to execute within the init container in exec form.", + "secretReferences": { "type": "array", + "description": "The secret references that will be referenced within the container group.", "items": { - "type": "string" - } + "$ref": "#/definitions/SecretReference" + }, + "x-ms-identifiers": [ + "name" + ] }, - "environmentVariables": { - "description": "The environment variables to set in the init container.", + "containers": { "type": "array", + "description": "The containers within the container group.", "items": { - "$ref": "#/definitions/EnvironmentVariable" + "$ref": "#/definitions/Container" }, "x-ms-identifiers": [ "name" ] }, - "instanceView": { - "description": "The instance view of the init container. Only valid in response.", - "readOnly": true, - "type": "object", - "properties": { - "restartCount": { - "readOnly": true, - "type": "integer", - "format": "int32", - "description": "The number of times that the init container has been restarted." - }, - "currentState": { - "readOnly": true, - "description": "The current state of the init container.", - "$ref": "#/definitions/ContainerState" - }, - "previousState": { - "readOnly": true, - "description": "The previous state of the init container.", - "$ref": "#/definitions/ContainerState" - }, - "events": { - "readOnly": true, - "description": "The events of the init container.", - "type": "array", - "items": { - "$ref": "#/definitions/Event" - }, - "x-ms-identifiers": [ - "name", - "type" - ] - } - } + "imageRegistryCredentials": { + "type": "array", + "description": "The image registry credentials by which the container group is created from.", + "items": { + "$ref": "#/definitions/ImageRegistryCredential" + }, + "x-ms-identifiers": [ + "username" + ] }, - "volumeMounts": { - "description": "The volume mounts available to the init container.", + "restartPolicy": { + "$ref": "#/definitions/ContainerGroupRestartPolicy", + "description": "Restart policy for all containers within the container group.\n- `Always` Always restart\n- `OnFailure` Restart on failure\n- `Never` Never restart" + }, + "ipAddress": { + "$ref": "#/definitions/IpAddress", + "description": "The IP address type of the container group." + }, + "osType": { + "$ref": "#/definitions/OperatingSystemTypes", + "description": "The operating system type required by the containers in the container group." + }, + "volumes": { "type": "array", + "description": "The list of volumes that can be mounted by containers in this container group.", "items": { - "$ref": "#/definitions/VolumeMount" + "$ref": "#/definitions/Volume" }, "x-ms-identifiers": [ "name" ] }, - "securityContext": { - "description": "The container security properties.", - "$ref": "#/definitions/SecurityContextDefinition" - } - } - }, - "CloudError": { - "x-ms-external": true, - "properties": { - "error": { - "$ref": "#/definitions/CloudErrorBody" - } - }, - "description": "An error response from the Container Instance service." - }, - "CloudErrorBody": { - "x-ms-external": true, - "properties": { - "code": { - "type": "string", - "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." + "diagnostics": { + "$ref": "#/definitions/ContainerGroupDiagnostics", + "description": "The diagnostic information for a container group." }, - "message": { - "type": "string", - "description": "A message describing the error, intended to be suitable for display in a user interface." + "subnetIds": { + "type": "array", + "description": "The subnet resource IDs for a container group.", + "items": { + "$ref": "#/definitions/ContainerGroupSubnetId" + } }, - "target": { - "type": "string", - "description": "The target of the particular error. For example, the name of the property in error." + "dnsConfig": { + "$ref": "#/definitions/DnsConfiguration", + "description": "The DNS config information for a container group." }, - "details": { + "sku": { + "$ref": "#/definitions/ContainerGroupSku", + "description": "The SKU for a container group." + }, + "encryptionProperties": { + "$ref": "#/definitions/EncryptionProperties", + "description": "The encryption properties for a container group." + }, + "initContainers": { + "type": "array", + "description": "The init containers for a container group.", + "items": { + "$ref": "#/definitions/InitContainerDefinition" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "extensions": { "type": "array", + "description": "extensions used by virtual kubelet", "items": { - "$ref": "#/definitions/CloudErrorBody" + "$ref": "#/definitions/DeploymentExtensionSpec" }, "x-ms-identifiers": [ - "message", - "target" - ], - "description": "A list of additional details about the error." + "name" + ] + }, + "confidentialComputeProperties": { + "$ref": "#/definitions/ConfidentialComputeProperties", + "description": "The properties for confidential container group" + }, + "priority": { + "$ref": "#/definitions/ContainerGroupPriority", + "description": "The priority of the container group." + }, + "identityAcls": { + "$ref": "#/definitions/IdentityAcls", + "description": "The access control levels of the identities." + }, + "containerGroupProfile": { + "$ref": "#/definitions/ContainerGroupProfileReferenceDefinition", + "description": "The reference container group profile properties." + }, + "standbyPoolProfile": { + "$ref": "#/definitions/StandbyPoolProfileDefinition", + "description": "The reference standby pool profile properties." + }, + "isCreatedFromStandbyPool": { + "type": "boolean", + "description": "The flag to determine whether the container group is created from standby pool.", + "readOnly": true } }, - "description": "An error response from the Container Instance service." - }, - "NetworkDependenciesResponse": { - "description": "Response for network dependencies, always empty list.", - "type": "array", - "items": { - "type": "string" - } - }, - "ConfidentialComputeProperties": { - "description": "The properties for confidential container group", - "type": "object", - "properties": { - "ccePolicy": { - "type": "string", - "description": "The base64 encoded confidential compute enforcement policy" - } - } + "required": [ + "containers", + "osType" + ] }, - "IdentityAcls": { - "description": "The access control levels of the identities.", + "LoadBalancer": { "type": "object", + "description": "LoadBalancer the CG profile will use to interact with CGs in a backend pool", "properties": { - "defaultAccess": { - "description": "The default access level.", - "$ref": "#/definitions/IdentityAccessLevel" - }, - "acls": { - "description": "The access control levels for each identity.", + "backendAddressPools": { "type": "array", + "description": "List of Load Balancer Backend Address Pools.", "items": { - "$ref": "#/definitions/IdentityAccessControl" + "$ref": "#/definitions/LoadBalancerBackendAddressPool" }, "x-ms-identifiers": [ - "identity" + "resource" ] } } }, - "IdentityAccessControl": { - "description": "The access control for an identity", + "LoadBalancerBackendAddressPool": { "type": "object", + "description": "NGroups load balancer backend address pool", "properties": { - "access": { - "description": "The access level of the identity.", - "$ref": "#/definitions/IdentityAccessLevel" - }, - "identity": { - "description": "An identity.", + "resource": { "type": "string", - "format": "arm-id" + "description": "The Load Balancer backend address pool ARM resource Id." } } }, - "IdentityAccessLevel": { - "description": "The access level of an identity.", + "LogAnalytics": { + "type": "object", + "description": "Container group log analytics information.", + "properties": { + "workspaceId": { + "type": "string", + "description": "The workspace id for log analytics" + }, + "workspaceKey": { + "type": "string", + "format": "password", + "description": "The workspace key for log analytics", + "x-ms-secret": true + }, + "logType": { + "$ref": "#/definitions/LogAnalyticsLogType", + "description": "The log type to be used." + }, + "metadata": { + "type": "object", + "description": "Metadata for log analytics.", + "additionalProperties": { + "type": "string" + } + }, + "workspaceResourceId": { + "type": "string", + "format": "password", + "description": "The workspace resource id for log analytics", + "x-ms-secret": true + } + }, + "required": [ + "workspaceId", + "workspaceKey" + ] + }, + "LogAnalyticsLogType": { "type": "string", + "description": "The log type to be used.", "enum": [ - "All", - "System", - "User" + "ContainerInsights", + "ContainerInstanceLogs" ], "x-ms-enum": { - "name": "IdentityAccessLevel", - "modelAsString": true + "name": "LogAnalyticsLogType", + "modelAsString": true, + "values": [ + { + "name": "ContainerInsights", + "value": "ContainerInsights", + "description": "ContainerInsights" + }, + { + "name": "ContainerInstanceLogs", + "value": "ContainerInstanceLogs", + "description": "ContainerInstanceLogs" + } + ] } }, - "Priority": { - "type": "string", - "description": "The priority of the container group.", - "enum": [ - "Regular", - "Spot" - ], - "x-ms-enum": { - "name": "ContainerGroupPriority", - "modelAsString": true + "Logs": { + "type": "object", + "description": "The logs.", + "properties": { + "content": { + "type": "string", + "description": "The content of the log." + } + } + }, + "NGroup": { + "type": "object", + "description": "Describes the NGroups resource.", + "properties": { + "properties": { + "$ref": "#/definitions/NGroupProperties", + "description": "Describes the properties of the NGroups resource.", + "x-ms-client-flatten": true + }, + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "zones": { + "type": "array", + "description": "The availability zones.", + "items": { + "type": "string" + } + }, + "identity": { + "$ref": "#/definitions/NGroupIdentity", + "description": "The identity of the NGroup, if configured." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" + } + ] + }, + "NGroupCGPropertyContainer": { + "type": "object", + "description": "Container properties that can be provided with NGroups object.", + "properties": { + "name": { + "type": "string", + "description": "container name" + }, + "properties": { + "$ref": "#/definitions/NGroupCGPropertyContainerProperties", + "description": "container properties" + } } }, - "NGroupsSkusList": { - "description": "List of SKU definitions. NGroups offer a single sku", + "NGroupCGPropertyContainerProperties": { "type": "object", + "description": "container properties", "properties": { - "value": { + "volumeMounts": { "type": "array", "items": { - "$ref": "#/definitions/NGroupSkus" + "$ref": "#/definitions/VolumeMount" }, - "description": "The list of NGroups SKUs.", "x-ms-identifiers": [ - "sku" + "name" ] - }, - "nextLink": { - "type": "string", - "description": "The URI to fetch the next page of NGroups SKUs." } } }, - "NGroupSkus": { - "description": "The container probe, for liveness or readiness.", + "NGroupCGPropertyVolume": { "type": "object", + "description": "Contains information about the volumes that can be mounted by Containers in the Container Groups.", "properties": { - "resourceType": { - "type": "string", - "description": "The type of resource the sku is applied to." - }, - "sku": { + "name": { "type": "string", - "description": "The sku of the resource type" + "description": "The name of the volume." }, - "skuCapacity": { - "type": "string", - "description": "The number of container groups of the NGroups." + "azureFile": { + "$ref": "#/definitions/AzureFileVolume", + "description": "The Azure File volume." } - } + }, + "required": [ + "name" + ] }, - "NGroupsListResult": { - "description": "The NGroups list response that contains the NGroups properties.", + "NGroupContainerGroupProperties": { "type": "object", + "description": "Container Group properties which can be set while creating or updating the NGroups.", "properties": { - "value": { + "subnetIds": { "type": "array", + "description": "Contains information about Virtual Network Subnet ARM Resource", "items": { - "$ref": "#/definitions/NGroup" + "$ref": "#/definitions/ContainerGroupSubnetId" + } + }, + "volumes": { + "type": "array", + "description": "Contains information about the volumes that can be mounted by Containers in the Container Groups.", + "items": { + "$ref": "#/definitions/NGroupCGPropertyVolume" }, - "description": "The list of NGroups." + "x-ms-identifiers": [ + "name" + ] }, - "nextLink": { - "type": "string", - "description": "The URI to fetch the next page of NGroups." + "containers": { + "type": "array", + "description": "Contains information about Container which can be set while creating or updating the NGroups.", + "items": { + "$ref": "#/definitions/NGroupCGPropertyContainer" + }, + "x-ms-identifiers": [ + "name" + ] } } }, - "NGroup": { + "NGroupIdentity": { "type": "object", + "description": "Identity for the NGroup.", "properties": { - "systemData": { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/systemData", + "principalId": { + "type": "string", + "description": "The principal id of the NGroup identity. This property will only be provided for a system assigned identity.", "readOnly": true }, - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/NGroupProperties" + "tenantId": { + "type": "string", + "description": "The tenant id associated with the NGroup. This property will only be provided for a system assigned identity.", + "readOnly": true }, - "identity": { - "$ref": "#/definitions/NGroupIdentity", - "description": "The identity of the NGroup, if configured." - } - }, - "allOf": [ - { - "$ref": "#/definitions/Resource" + "type": { + "$ref": "#/definitions/ResourceIdentityType", + "description": "The type of identity used for the NGroup. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the NGroup." + }, + "userAssignedIdentities": { + "type": "object", + "description": "The list of user identities associated with the NGroup.", + "additionalProperties": { + "$ref": "#/definitions/UserAssignedIdentities" + } } - ], - "description": "Describes the NGroups resource." + } }, "NGroupPatch": { "type": "object", + "description": "Describes the NGroups resource.", "properties": { "systemData": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/systemData", + "description": "Metadata pertaining to creation and last modification of the resource.", "readOnly": true }, "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/NGroupProperties" + "$ref": "#/definitions/NGroupProperties", + "description": "Describes the properties of the NGroups resource.", + "x-ms-client-flatten": true }, "identity": { "$ref": "#/definitions/NGroupIdentity", @@ -3759,61 +4330,23 @@ }, "tags": { "type": "object", + "description": "The resource tags.", "additionalProperties": { "type": "string" - }, - "description": "The resource tags." + } }, "zones": { "type": "array", + "description": "The zones for the NGroup.", "items": { "type": "string" - }, - "description": "The zones for the NGroup." - } - }, - "description": "Describes the NGroups resource." - }, - "NGroupIdentity": { - "type": "object", - "description": "Identity for the NGroup.", - "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "description": "The principal id of the NGroup identity. This property will only be provided for a system assigned identity." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant id associated with the NGroup. This property will only be provided for a system assigned identity." - }, - "type": { - "type": "string", - "description": "The type of identity used for the NGroup. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the NGroup.", - "enum": [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned", - "None" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } - }, - "userAssignedIdentities": { - "type": "object", - "description": "The list of user identities associated with the NGroup.", - "additionalProperties": { - "description": "The list of user identities associated with the container group. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", - "$ref": "#/definitions/UserAssignedIdentities" } } } }, "NGroupProperties": { "type": "object", + "description": "Describes the properties of the NGroups resource.", "properties": { "elasticProfile": { "$ref": "#/definitions/ElasticProfile", @@ -3825,77 +4358,234 @@ }, "containerGroupProfiles": { "type": "array", + "description": "The Container Group Profiles that could be used in the NGroups resource.", "items": { "$ref": "#/definitions/ContainerGroupProfileStub" }, - "x-ms-identifiers": [], - "description": "The Container Group Profiles that could be used in the NGroups resource." + "x-ms-identifiers": [] }, "provisioningState": { - "readOnly": true, - "type": "string", - "enum": [ - "Creating", - "Updating", - "Failed", - "Succeeded", - "Canceled", - "Deleting", - "Migrating" - ], + "$ref": "#/definitions/NGroupProvisioningState", "description": "The provisioning state, which only appears in the response.", - "x-ms-enum": { - "name": "NGroupProvisioningState", - "modelAsString": true - } + "readOnly": true }, "updateProfile": { "$ref": "#/definitions/UpdateProfile", "description": "Used by the customer to specify the way to update the Container Groups in NGroup." } + } + }, + "NGroupProvisioningState": { + "type": "string", + "description": "The provisioning state, which only appears in the response.", + "enum": [ + "Creating", + "Updating", + "Failed", + "Succeeded", + "Canceled", + "Deleting", + "Migrating" + ], + "x-ms-enum": { + "name": "NGroupProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Creating", + "value": "Creating", + "description": "Creating" + }, + { + "name": "Updating", + "value": "Updating", + "description": "Updating" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Failed" + }, + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Succeeded" + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Canceled" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "Deleting" + }, + { + "name": "Migrating", + "value": "Migrating", + "description": "Migrating" + } + ] + } + }, + "NGroupUpdateMode": { + "type": "string", + "enum": [ + "Manual", + "Rolling" + ], + "x-ms-enum": { + "name": "NGroupUpdateMode", + "modelAsString": true, + "values": [ + { + "name": "Manual", + "value": "Manual", + "description": "Manual" + }, + { + "name": "Rolling", + "value": "Rolling", + "description": "Rolling" + } + ] + } + }, + "NGroupsListResult": { + "type": "object", + "description": "The response of a NGroups list operation.", + "properties": { + "value": { + "type": "array", + "description": "The NGroup items on this page", + "items": { + "$ref": "#/definitions/NGroup" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } }, - "description": "Describes the properties of the NGroups resource." + "required": [ + "value" + ] }, - "UpdateProfile": { + "NetworkDependenciesResponse": { + "type": "array", + "description": "Response for network dependencies, always empty list.", + "items": { + "type": "string" + } + }, + "NetworkProfile": { "type": "object", - "description": "Used by the customer to specify the way to update the Container Groups in NGroup.", + "description": "A network profile for network settings of a ContainerGroupProfile. Used to manage load balancer and application gateway backend pools, specifically updating the IP addresses of CGs within the backend pool.", "properties": { - "updateMode": { + "loadBalancer": { + "$ref": "#/definitions/LoadBalancer", + "description": "LoadBalancer the CG profile will use to interact with CGs in a backend pool" + }, + "applicationGateway": { + "$ref": "#/definitions/ApplicationGateway", + "description": "Application Gateway the CG profile will use to interact with CGs in a backend pool" + } + } + }, + "OperatingSystemTypes": { + "type": "string", + "description": "The operating system type required by the containers in the container group.", + "enum": [ + "Windows", + "Linux" + ], + "x-ms-enum": { + "name": "OperatingSystemTypes", + "modelAsString": true, + "values": [ + { + "name": "Windows", + "value": "Windows", + "description": "Windows" + }, + { + "name": "Linux", + "value": "Linux", + "description": "Linux" + } + ] + } + }, + "Operation": { + "type": "object", + "description": "An operation for Azure Container Instance service.", + "properties": { + "name": { "type": "string", - "enum": [ - "Manual", - "Rolling" - ], - "x-ms-enum": { - "name": "NGroupUpdateMode", - "modelAsString": true + "description": "The name of the operation." + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "The display information of the operation." + }, + "properties": { + "description": "The additional properties.", + "x-ms-client-flatten": true + }, + "origin": { + "$ref": "#/definitions/ContainerInstanceOperationsOrigin", + "description": "The intended executor of the operation." + } + }, + "required": [ + "name", + "display" + ] + }, + "OperationDisplay": { + "type": "object", + "description": "The display information of the operation.", + "properties": { + "provider": { + "type": "string", + "description": "The name of the provider of the operation." + }, + "resource": { + "type": "string", + "description": "The name of the resource type of the operation." + }, + "operation": { + "type": "string", + "description": "The friendly name of the operation." + }, + "description": { + "type": "string", + "description": "The description of the operation." + } + } + }, + "OperationListResult": { + "type": "object", + "description": "Paged collection of Operation items", + "properties": { + "value": { + "type": "array", + "description": "The Operation items on this page", + "items": { + "$ref": "#/definitions/Operation" } }, - "rollingUpdateProfile": { - "type": "object", - "description": "This profile allows the customers to customize the rolling update.", - "properties": { - "maxBatchPercent": { - "type": "integer", - "format": "int32", - "description": "Maximum percentage of total Container Groups which can be updated simultaneously by rolling update in one batch." - }, - "maxUnhealthyPercent": { - "type": "integer", - "format": "int32", - "description": "Maximum percentage of the updated Container Groups which can be in unhealthy state after each batch is updated." - }, - "pauseTimeBetweenBatches": { - "type": "string", - "description": "The wait time between batches after completing the one batch of the rolling update and starting the next batch. The time duration should be specified in ISO 8601 format for duration." - }, - "inPlaceUpdate": { - "type": "boolean", - "description": "Default is false. If set to true, the CGs will be updated in-place instead of creating new CG and deleting old ones." - } - } + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" } - } + }, + "required": [ + "value" + ] }, "PlacementProfile": { "type": "object", @@ -3908,517 +4598,474 @@ } } }, - "ElasticProfile": { + "Port": { "type": "object", + "description": "The port exposed on the container group.", "properties": { - "desiredCount": { - "type": "integer", - "format": "int32" - }, - "maintainDesiredCount": { - "type": "boolean", - "description": "Flag that indicates whether desiredCount should be maintained when customer deletes SPECIFIC container groups (CGs) from the NGroups. In this case, new CGs will be created by NGroup to compensate for the specific deleted ones." + "protocol": { + "$ref": "#/definitions/ContainerGroupNetworkProtocol", + "description": "The protocol associated with the port." }, - "containerGroupNamingPolicy": { - "type": "object", - "description": "Container Groups are named on a generic guid based naming scheme/policy. Customer can modify naming policy to add prefix to CG names during scale out operation.", - "properties": { - "guidNamingPolicy": { - "type": "object", - "properties": { - "prefix": { - "description": "The prefix can be used when there are tooling limitations (e.g. on the Azure portal where CGs from multiple NGroups exist in the same RG). The prefix with the suffixed resource name must still follow Azure resource naming guidelines.", - "type": "string" - } - } - } - } + "port": { + "type": "integer", + "format": "int32", + "description": "The port number." } }, - "description": "Describes the elastic profile of the NGroup" + "required": [ + "port" + ] }, - "ContainerGroupProfileStub": { + "Resource": { "type": "object", + "description": "The Resource model definition.", "properties": { - "resource": { - "$ref": "#/definitions/ApiEntityReference", - "description": "A reference to the container group profile ARM resource hosted in ACI RP." + "id": { + "type": "string", + "description": "The resource id.", + "readOnly": true }, - "revision": { - "type": "integer", - "format": "int32", - "description": "The revision of the CG profile is an optional property. If customer does not to provide a revision then NGroups will pickup the latest revision of CGProfile." + "name": { + "type": "string", + "description": "The resource name.", + "readOnly": true }, - "networkProfile": { - "$ref": "#/definitions/NetworkProfile", - "description": "A network profile for network settings of a ContainerGroupProfile." + "type": { + "type": "string", + "description": "The resource type.", + "readOnly": true }, - "storageProfile": { - "$ref": "#/definitions/StorageProfile", - "description": "Storage profile for storage related settings of a container group profile." + "location": { + "type": "string", + "description": "The resource location." }, - "containerGroupProperties": { - "$ref": "#/definitions/NGroupContainerGroupProperties", - "description": " Container Group properties which can be set while creating or updating the NGroups." - } - }, - "description": "The object that contains a reference to a Container Group Profile and it's other related properties." - }, - "NGroupContainerGroupProperties": { - "type": "object", - "description": "Container Group properties which can be set while creating or updating the NGroups.", - "properties": { - "subnetIds": { - "type": "array", - "description": "Contains information about Virtual Network Subnet ARM Resource", - "items": { - "$ref": "#/definitions/ContainerGroupSubnetId" + "tags": { + "type": "object", + "description": "The resource tags.", + "additionalProperties": { + "type": "string" } }, - "volumes": { + "zones": { "type": "array", - "description": "Contains information about the volumes that can be mounted by Containers in the Container Groups.", + "description": "The zones for the container group.", "items": { - "$ref": "#/definitions/NGroupCGPropertyVolume" + "type": "string" + } + } + } + }, + "ResourceIdentityType": { + "type": "string", + "description": "The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the container group.", + "enum": [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false, + "values": [ + { + "name": "SystemAssigned", + "value": "SystemAssigned", + "description": "SystemAssigned" }, - "x-ms-identifiers": [ - "name" - ] - }, - "containers": { - "type": "array", - "description": "Contains information about Container which can be set while creating or updating the NGroups.", - "items": { - "$ref": "#/definitions/NGroupCGPropertyContainer" + { + "name": "UserAssigned", + "value": "UserAssigned", + "description": "UserAssigned" }, - "x-ms-identifiers": [ - "name" - ] - } + { + "name": "SystemAssigned, UserAssigned", + "value": "SystemAssigned, UserAssigned", + "description": "SystemAssigned, UserAssigned" + }, + { + "name": "None", + "value": "None", + "description": "None" + } + ] } }, - "NGroupCGPropertyContainer": { + "ResourceLimits": { "type": "object", - "description": "Container properties that can be provided with NGroups object.", + "description": "The resource limits.", "properties": { - "name": { - "type": "string", - "description": "container name" + "memoryInGB": { + "type": "number", + "format": "double", + "description": "The memory limit in GB of this container instance." }, - "properties": { - "type": "object", - "description": "container properties", - "properties": { - "volumeMounts": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeMount" - }, - "x-ms-identifiers": [ - "name" - ] - } - } + "cpu": { + "type": "number", + "format": "double", + "description": "The CPU limit of this container instance." + }, + "gpu": { + "$ref": "#/definitions/GpuResource", + "description": "The GPU limit of this container instance." } } }, - "NGroupCGPropertyVolume": { - "description": "Contains information about the volumes that can be mounted by Containers in the Container Groups.", + "ResourceRequests": { "type": "object", - "required": [ - "name" - ], + "description": "The resource requests.", "properties": { - "name": { - "description": "The name of the volume.", - "type": "string" + "memoryInGB": { + "type": "number", + "format": "double", + "description": "The memory request in GB of this container instance." }, - "azureFile": { - "description": "The Azure File volume.", - "$ref": "#/definitions/AzureFileVolume" + "cpu": { + "type": "number", + "format": "double", + "description": "The CPU request of this container instance." + }, + "gpu": { + "$ref": "#/definitions/GpuResource", + "description": "The GPU request of this container instance." } - } + }, + "required": [ + "memoryInGB", + "cpu" + ] }, - "StorageProfile": { + "ResourceRequirements": { "type": "object", - "description": "Storage profile for storage related settings of a container group profile.", + "description": "The resource requirements.", "properties": { - "fileShares": { - "type": "array", - "items": { - "$ref": "#/definitions/FileShare", - "description": "List of file shares that will be created and mounted on CGs." - }, - "x-ms-identifiers": [ - "name" - ] + "requests": { + "$ref": "#/definitions/ResourceRequests", + "description": "The resource requests of this container instance." + }, + "limits": { + "$ref": "#/definitions/ResourceLimits", + "description": "The resource limits of this container instance." } + }, + "required": [ + "requests" + ] + }, + "Scheme": { + "type": "string", + "description": "The scheme.", + "enum": [ + "http", + "https" + ], + "x-ms-enum": { + "name": "Scheme", + "modelAsString": true, + "values": [ + { + "name": "http", + "value": "http", + "description": "http" + }, + { + "name": "https", + "value": "https", + "description": "https" + } + ] } }, - "FileShare": { + "SecretReference": { "type": "object", - "description": "File shares that can be mounted on container groups.", + "description": "A secret reference", "properties": { "name": { - "type": "string" + "type": "string", + "description": "The identifier of the secret reference" }, - "resourceGroupName": { - "type": "string" + "identity": { + "type": "string", + "format": "arm-id", + "description": "The ARM resource id of the managed identity that has access to the secret in the key vault" }, - "storageAccountName": { - "type": "string" + "secretReferenceUri": { + "type": "string", + "format": "uri", + "description": "The URI to the secret in key vault" + } + }, + "required": [ + "name", + "identity", + "secretReferenceUri" + ] + }, + "SecurityContextCapabilitiesDefinition": { + "type": "object", + "description": "The capabilities to add or drop from a container.", + "properties": { + "add": { + "type": "array", + "description": "The capabilities to add to the container.", + "items": { + "type": "string" + } }, - "properties": { - "type": "object", - "properties": { - "shareAccessType": { - "type": "string", - "description": " Specifies how Container Groups can access the Azure file share i.e. all CG will share same Azure file share or going to have exclusive file share.", - "enum": [ - "Shared", - "Exclusive" - ], - "x-ms-enum": { - "name": "AzureFileShareAccessType", - "modelAsString": false - } - }, - "shareAccessTier": { - "type": "string", - "description": "Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Learn more at: https://learn.microsoft.com/en-us/rest/api/storagerp/file-shares/create?tabs=HTTP#shareaccesstier", - "enum": [ - "Cool", - "Hot", - "Premium", - "TransactionOptimized" - ], - "default": "TransactionOptimized", - "x-ms-enum": { - "name": "AzureFileShareAccessTier", - "modelAsString": false - } - } + "drop": { + "type": "array", + "description": "The capabilities to drop from the container.", + "items": { + "type": "string" } } } }, - "NetworkProfile": { + "SecurityContextDefinition": { "type": "object", - "description": "A network profile for network settings of a ContainerGroupProfile. Used to manage load balancer and application gateway backend pools, specifically updating the IP addresses of CGs within the backend pool.", + "description": "The security context for the container.", "properties": { - "loadBalancer": { - "$ref": "#/definitions/LoadBalancer", - "description": "LoadBalancer the CG profile will use to interact with CGs in a backend pool" + "privileged": { + "type": "boolean", + "description": "The flag to determine if the container permissions is elevated to Privileged." }, - "applicationGateway": { - "$ref": "#/definitions/ApplicationGateway", - "description": "Application Gateway the CG profile will use to interact with CGs in a backend pool" + "allowPrivilegeEscalation": { + "type": "boolean", + "description": "A boolean value indicating whether the init process can elevate its privileges" + }, + "capabilities": { + "$ref": "#/definitions/SecurityContextCapabilitiesDefinition", + "description": "The capabilities to add or drop from a container." + }, + "runAsGroup": { + "type": "integer", + "format": "int32", + "description": "Sets the User GID for the container." + }, + "runAsUser": { + "type": "integer", + "format": "int32", + "description": "Sets the User UID for the container." + }, + "seccompProfile": { + "type": "string", + "description": "a base64 encoded string containing the contents of the JSON in the seccomp profile" } } }, - "ApplicationGateway": { + "StandbyPoolProfileDefinition": { "type": "object", - "description": "Application Gateway the CG profile will use to interact with CGs in a backend pool", + "description": "The standby pool profile reference.", "properties": { - "resource": { + "id": { "type": "string", - "description": "The Application Gateway ARM resource Id." + "format": "arm-id", + "description": "The standby pool profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyPoolName}'." }, - "backendAddressPools": { - "type": "array", - "description": "List of Application Gateway Backend Address Pools.", - "items": { - "$ref": "#/definitions/ApplicationGatewayBackendAddressPool" - }, - "x-ms-identifiers": [ - "resource" - ] + "failContainerGroupCreateOnReuseFailure": { + "type": "boolean", + "description": "The flag to determine whether ACI should fail the create request if the container group can not be obtained from standby pool." } } }, - "LoadBalancer": { + "StorageProfile": { "type": "object", - "description": "LoadBalancer the CG profile will use to interact with CGs in a backend pool", + "description": "Storage profile for storage related settings of a container group profile.", "properties": { - "backendAddressPools": { + "fileShares": { "type": "array", - "description": "List of Load Balancer Backend Address Pools.", "items": { - "$ref": "#/definitions/LoadBalancerBackendAddressPool" + "$ref": "#/definitions/FileShare" }, "x-ms-identifiers": [ - "resource" + "name" ] } } }, - "LoadBalancerBackendAddressPool": { + "UpdateProfile": { "type": "object", - "description": "NGroups load balancer backend address pool", + "description": "Used by the customer to specify the way to update the Container Groups in NGroup.", "properties": { - "resource": { - "type": "string", - "description": "The Load Balancer backend address pool ARM resource Id." + "updateMode": { + "$ref": "#/definitions/NGroupUpdateMode" + }, + "rollingUpdateProfile": { + "$ref": "#/definitions/UpdateProfileRollingUpdateProfile", + "description": "This profile allows the customers to customize the rolling update." } } }, - "ApplicationGatewayBackendAddressPool": { + "UpdateProfileRollingUpdateProfile": { "type": "object", - "description": "NGroups application gateway backend address pool", + "description": "This profile allows the customers to customize the rolling update.", "properties": { - "resource": { + "maxBatchPercent": { + "type": "integer", + "format": "int32", + "description": "Maximum percentage of total Container Groups which can be updated simultaneously by rolling update in one batch." + }, + "maxUnhealthyPercent": { + "type": "integer", + "format": "int32", + "description": "Maximum percentage of the updated Container Groups which can be in unhealthy state after each batch is updated." + }, + "pauseTimeBetweenBatches": { "type": "string", - "description": "The application gateway backend address pool ARM resource Id." + "description": "The wait time between batches after completing the one batch of the rolling update and starting the next batch. The time duration should be specified in ISO 8601 format for duration." + }, + "inPlaceUpdate": { + "type": "boolean", + "description": "Default is false. If set to true, the CGs will be updated in-place instead of creating new CG and deleting old ones." } } }, - "ApiEntityReference": { + "Usage": { "type": "object", + "description": "A single usage result", "properties": { "id": { "type": "string", - "description": "The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/..." + "description": "Id of the usage result", + "readOnly": true + }, + "unit": { + "type": "string", + "description": "Unit of the usage result", + "readOnly": true + }, + "currentValue": { + "type": "integer", + "format": "int32", + "description": "The current usage of the resource", + "readOnly": true + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The maximum permitted usage of the resource.", + "readOnly": true + }, + "name": { + "$ref": "#/definitions/UsageName", + "description": "The name object of the resource", + "readOnly": true } - }, - "description": "The API entity reference." + } }, - "ContainerGroupProfileListResult": { - "description": "The container group profile list response", + "UsageListResult": { "type": "object", + "description": "The response containing the usage data", "properties": { "value": { "type": "array", + "description": "The usage data.", "items": { - "$ref": "#/definitions/ContainerGroupProfile" + "$ref": "#/definitions/Usage" }, - "description": "The list of ContainerGroupProfiles under a subscription or resource group." + "readOnly": true, + "x-ms-identifiers": [ + "name" + ] }, "nextLink": { "type": "string", - "description": "The URI to fetch the next page of Container Group Profiles." + "description": "The URL to get the next set of results." } } }, - "ContainerGroupProfilePatch": { + "UsageName": { "type": "object", - "description": "Properties of container group profile that need to be patched", + "description": "The name object of the resource", "properties": { - "tags": { - "type": "object", - "description": "Resource tags.", - "additionalProperties": { - "type": "string" - } + "value": { + "type": "string", + "description": "The name of the resource", + "readOnly": true + }, + "localizedValue": { + "type": "string", + "description": "The localized name of the resource", + "readOnly": true } } }, - "ContainerGroupProfile": { - "description": "A container group profile object", + "UserAssignedIdentities": { "type": "object", + "description": "The list of user identities associated with the container group. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", "properties": { - "systemData": { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/systemData", + "principalId": { + "type": "string", + "description": "The principal id of user assigned identity.", "readOnly": true }, - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ContainerGroupProfileProperties" - } - }, - "allOf": [ - { - "$ref": "#/definitions/Resource" + "clientId": { + "type": "string", + "description": "The client id of user assigned identity.", + "readOnly": true } - ] + } }, - "ContainerGroupProfileProperties": { + "Volume": { "type": "object", - "description": "The container group profile properties", - "required": [ - "containers", - "osType" - ], + "description": "The properties of the volume.", "properties": { - "sku": { - "description": "The SKU for a container group.", - "$ref": "#/definitions/ContainerGroupSku" - }, - "encryptionProperties": { - "description": "The encryption properties for a container group.", - "$ref": "#/definitions/EncryptionProperties" - }, - "containers": { - "type": "array", - "description": "The containers within the container group.", - "items": { - "$ref": "#/definitions/Container" - }, - "x-ms-identifiers": [ - "name" - ] + "name": { + "type": "string", + "description": "The name of the volume." }, - "initContainers": { - "type": "array", - "description": "The init containers for a container group.", - "items": { - "$ref": "#/definitions/InitContainerDefinition" - }, - "x-ms-identifiers": [ - "name" - ] + "azureFile": { + "$ref": "#/definitions/AzureFileVolume", + "description": "The Azure File volume." }, - "extensions": { - "type": "array", - "description": "extensions used by virtual kubelet", - "items": { - "$ref": "#/definitions/DeploymentExtensionSpec" - }, - "x-ms-identifiers": [ - "name" - ] + "emptyDir": { + "description": "The empty directory volume." }, - "imageRegistryCredentials": { - "type": "array", - "description": "The image registry credentials by which the container group is created from.", - "items": { - "$ref": "#/definitions/ImageRegistryCredential" - }, - "x-ms-identifiers": [ - "username" - ] + "secret": { + "type": "object", + "description": "The secret volume.", + "additionalProperties": { + "type": "string" + } }, - "restartPolicy": { - "description": "Restart policy for all containers within the container group. \n- `Always` Always restart\n- `OnFailure` Restart on failure\n- `Never` Never restart\n", - "$ref": "#/definitions/ContainerGroupRestartPolicy" + "secretReference": { + "type": "object", + "description": "The secret reference volume.", + "additionalProperties": { + "type": "string" + } }, - "shutdownGracePeriod": { - "description": "Shutdown grace period for containers in a container group.", + "gitRepo": { + "$ref": "#/definitions/GitRepoVolume", + "description": "The git repo volume." + } + }, + "required": [ + "name" + ] + }, + "VolumeMount": { + "type": "object", + "description": "The properties of the volume mount.", + "properties": { + "name": { "type": "string", - "format": "date-time" - }, - "ipAddress": { - "description": "The IP address type of the container group.", - "$ref": "#/definitions/IpAddress" + "description": "The name of the volume mount." }, - "timeToLive": { - "description": "Post completion time to live for containers of a CG", + "mountPath": { "type": "string", - "format": "date-time" - }, - "osType": { - "description": "The operating system type required by the containers in the container group.", - "$ref": "#/definitions/OSType" - }, - "volumes": { - "type": "array", - "description": "The list of volumes that can be mounted by containers in this container group.", - "items": { - "$ref": "#/definitions/Volume" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "diagnostics": { - "description": "The diagnostic information for a container group.", - "$ref": "#/definitions/ContainerGroupDiagnostics" - }, - "priority": { - "description": "The priority of the container group.", - "$ref": "#/definitions/Priority" - }, - "confidentialComputeProperties": { - "description": "The properties for confidential container group", - "$ref": "#/definitions/ConfidentialComputeProperties" - }, - "securityContext": { - "description": "The container security properties.", - "$ref": "#/definitions/SecurityContextDefinition" - }, - "revision": { - "readOnly": true, - "description": "Container group profile current revision number", - "type": "integer", - "format": "int32" - }, - "registeredRevisions": { - "readOnly": true, - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Registered revisions are calculated at request time based off the records in the table logs." + "description": "The path within the container where the volume should be mounted. Must not contain colon (:)." }, - "useKrypton": { + "readOnly": { "type": "boolean", - "description": "Gets or sets Krypton use property." + "description": "The flag indicating whether the volume mount is read-only." } - } + }, + "required": [ + "name", + "mountPath" + ] } }, - "parameters": { - "ContainerGroupNameParameter": { - "name": "containerGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the container group.", - "x-ms-parameter-location": "method" - }, - "VirtualNetworkNameParameter": { - "name": "virtualNetworkName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the virtual network.", - "x-ms-parameter-location": "method" - }, - "SubnetNameParameter": { - "name": "subnetName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the subnet.", - "x-ms-parameter-location": "method" - }, - "OperationIdParameter": { - "name": "operationId", - "in": "path", - "required": true, - "type": "string", - "description": "The operation Id.", - "x-ms-parameter-location": "method" - }, - "NGroupsNameParameter": { - "name": "ngroupsName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - "minLength": 1, - "maxLength": 63, - "description": "The NGroups name.", - "x-ms-parameter-location": "method" - }, - "ContainerGroupProfileNameParameter": { - "name": "containerGroupProfileName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - "minLength": 1, - "maxLength": 63, - "description": "ContainerGroupProfile name.", - "x-ms-parameter-location": "method" - }, - "RevisionNumberParameter": { - "name": "revisionNumber", - "in": "path", - "required": true, - "type": "string", - "description": "The revision number of the container group profile.", - "x-ms-parameter-location": "method" - } - } + "parameters": {} } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/CachedImagesList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/CachedImagesList.json index 70fce22c2b1f..11e46040369d 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/CachedImagesList.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/CachedImagesList.json @@ -1,27 +1,29 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2025-09-01", "location": "westcentralus", - "api-version": "2025-09-01" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { "value": [ { - "osType": "Linux", - "image": "ubuntu:16.04" + "image": "ubuntu:16.04", + "osType": "Linux" }, { - "osType": "Linux", - "image": "alpine:3.6" + "image": "alpine:3.6", + "osType": "Linux" }, { - "osType": "Windows", - "image": "microsoft/nanoserver:10.0.14393.2485" + "image": "microsoft/nanoserver:10.0.14393.2485", + "osType": "Windows" } ] } } - } + }, + "operationId": "Location_ListCachedImages", + "title": "CachedImages" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/CapabilitiesList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/CapabilitiesList.json index 704b7ca8a3df..26220d254122 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/CapabilitiesList.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/CapabilitiesList.json @@ -1,39 +1,41 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2025-09-01", "location": "westus", - "api-version": "2025-09-01" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { "value": [ { - "resourceType": "containerGroups", - "osType": "Linux", - "location": "West US", - "ipAddressType": "Public", - "gpu": "K80", "capabilities": { - "maxMemoryInGB": 14, "maxCpu": 4, - "maxGpuCount": 4 - } + "maxGpuCount": 4, + "maxMemoryInGB": 14 + }, + "gpu": "K80", + "ipAddressType": "Public", + "location": "West US", + "osType": "Linux", + "resourceType": "containerGroups" }, { - "resourceType": "containerGroups", - "osType": "Windows", - "location": "West US", - "ipAddressType": "Public", - "gpu": "None", "capabilities": { - "maxMemoryInGB": 14, "maxCpu": 4, - "maxGpuCount": 0 - } + "maxGpuCount": 0, + "maxMemoryInGB": 14 + }, + "gpu": "None", + "ipAddressType": "Public", + "location": "West US", + "osType": "Windows", + "resourceType": "containerGroups" } ] } } - } + }, + "operationId": "Location_ListCapabilities", + "title": "GetCapabilities" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerAttach.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerAttach.json index 9507d5fe7ee8..b938f2a16bd9 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerAttach.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerAttach.json @@ -1,17 +1,19 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", "containerGroupName": "demo1", - "containerName": "container1" + "containerName": "container1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { - "webSocketUri": "wss://web-socket-uri", - "password": "password" + "password": "password", + "webSocketUri": "wss://web-socket-uri" } } - } + }, + "operationId": "Containers_Attach", + "title": "ContainerAttach" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerExec.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerExec.json index 11b317480cab..8140f1188c88 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerExec.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerExec.json @@ -1,24 +1,26 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupName": "demo1", - "containerName": "container1", "containerExecRequest": { "command": "/bin/bash", "terminalSize": { - "rows": 12, - "cols": 12 + "cols": 12, + "rows": 12 } - } + }, + "containerGroupName": "demo1", + "containerName": "container1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { - "webSocketUri": "wss://web-socket-uri", - "password": "password" + "password": "password", + "webSocketUri": "wss://web-socket-uri" } } - } + }, + "operationId": "Containers_ExecuteCommand", + "title": "ContainerExec" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupCreateConfidential.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupCreateConfidential.json index 2bc36269a62f..d789db88362c 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupCreateConfidential.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupCreateConfidential.json @@ -1,15 +1,12 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupName": "demo1", - "zones": [ - "1" - ], "containerGroup": { "location": "westeurope", "properties": { + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, "containers": [ { "name": "accdemo", @@ -29,156 +26,161 @@ } }, "securityContext": { - "privileged": false, "capabilities": { "add": [ "CAP_NET_ADMIN" ] - } + }, + "privileged": false } } } ], "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 8000 + "port": 8000, + "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", - "sku": "Confidential", - "confidentialComputeProperties": { - "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" - } + "sku": "Confidential" } - } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "westeurope", "properties": { - "sku": "Confidential", - "isCreatedFromStandbyPool": false, - "provisioningState": "Succeeded", + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, "containers": [ { "name": "accdemo", "properties": { - "image": "confiimage", "command": [], + "environmentVariables": [], + "image": "confiimage", "ports": [ { "port": 8000 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } }, "securityContext": { - "privileged": false, "capabilities": { "add": [ "CAP_NET_ADMIN" ] - } + }, + "privileged": false } } } ], + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Running" + }, "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 8000 + "port": 8000, + "protocol": "TCP" } - ], - "type": "Public" + ] }, - "initContainers": [], - "imageRegistryCredentials": [], + "isCreatedFromStandbyPool": false, "osType": "Linux", - "instanceView": { - "events": [], - "state": "Running" - }, - "confidentialComputeProperties": { - "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" - } - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "westeurope" + "provisioningState": "Succeeded", + "sku": "Confidential" + } } }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "westeurope", "properties": { - "sku": "Confidential", - "isCreatedFromStandbyPool": false, - "provisioningState": "Succeeded", + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, "containers": [ { "name": "accdemo", "properties": { - "image": "confiimage", "command": [], + "environmentVariables": [], + "image": "confiimage", "ports": [ { "port": 8000 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } }, "securityContext": { - "privileged": false, "capabilities": { "add": [ "CAP_NET_ADMIN" ] - } + }, + "privileged": false } } } ], + "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Running" + }, "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 8000 + "port": 8000, + "protocol": "TCP" } - ], - "type": "Public" + ] }, - "initContainers": [], - "imageRegistryCredentials": [], + "isCreatedFromStandbyPool": false, "osType": "Linux", - "instanceView": { - "events": [], - "state": "Running" - }, - "confidentialComputeProperties": { - "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" - } - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "westeurope" + "provisioningState": "Succeeded", + "sku": "Confidential" + } } } - } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ConfidentialContainerGroup" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupCreateOrUpdateStandbyPool.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupCreateOrUpdateStandbyPool.json index c644cf17a5ac..1851f95a318f 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupCreateOrUpdateStandbyPool.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupCreateOrUpdateStandbyPool.json @@ -1,15 +1,13 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupName": "demo1", - "zones": [ - "1" - ], "containerGroup": { "location": "west us", "properties": { + "containerGroupProfile": { + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp", + "revision": 1 + }, "containers": [ { "name": "demo1", @@ -22,116 +20,120 @@ } } ], - "containerGroupProfile": { - "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp", - "revision": 1 - }, "standbyPoolProfile": { "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.StandbyPool/standbyContainerGroupPools/demopool" } } - } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus2", "properties": { - "sku": "Standard", - "isCreatedFromStandbyPool": true, - "provisioningState": "Succeeded", + "containerGroupProfile": { + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp", + "revision": 1 + }, "containers": [ { "name": "demo1", "properties": { - "image": "nginx", + "command": [], "configMap": { "keyValuePairs": { "Newkey": "value" } }, - "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], - "initContainers": [], "imageRegistryCredentials": [], - "containerGroupProfile": { - "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp", - "revision": 1 - }, - "osType": "Linux", + "initContainers": [], "instanceView": { "events": [], "state": "Running" - } - }, - "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "eastus2" + }, + "isCreatedFromStandbyPool": true, + "osType": "Linux", + "provisioningState": "Succeeded", + "sku": "Standard" + } } }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus2", "properties": { - "sku": "Standard", - "isCreatedFromStandbyPool": true, - "provisioningState": "Succeeded", + "containerGroupProfile": { + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp", + "revision": 1 + }, "containers": [ { "name": "demo1", "properties": { - "image": "nginx", + "command": [], "configMap": { "keyValuePairs": { "Newkey": "value" } }, - "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], - "initContainers": [], "imageRegistryCredentials": [], - "containerGroupProfile": { - "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp", - "revision": 1 - }, - "osType": "Linux", + "initContainers": [], "instanceView": { "events": [], "state": "Running" - } - }, - "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "eastus2" + }, + "isCreatedFromStandbyPool": true, + "osType": "Linux", + "provisioningState": "Succeeded", + "sku": "Standard" + } } } - } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupCreateOrUpdateWithStandbyPool" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupEncryptionProperties.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupEncryptionProperties.json index afe89f0ccef5..85faa40ac0ff 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupEncryptionProperties.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupEncryptionProperties.json @@ -1,20 +1,14 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupName": "demo1", - "zones": [ - "1" - ], "containerGroup": { - "location": "eastus2", "identity": { "type": "UserAssigned", "userAssignedIdentities": { "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity": {} } }, + "location": "eastus2", "properties": { "containers": [ { @@ -37,158 +31,166 @@ } } ], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net" + }, "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Public" + ] }, - "osType": "Linux", - "encryptionProperties": { - "vaultBaseUrl": "https://testkeyvault.vault.azure.net", - "keyName": "test-key", - "keyVersion": "", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity" - } + "osType": "Linux" } - } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "identity": { + "type": "UserAssigned", + "tenantId": "", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity": { + "clientId": "", + "principalId": "" + } + } + }, + "location": "eastus2", "properties": { - "sku": "Standard", - "isCreatedFromStandbyPool": false, - "encryptionProperties": { - "vaultBaseUrl": "https://testkeyvault.vault.azure.net/", - "keyName": "test-key", - "keyVersion": "", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity" - }, - "provisioningState": "Pending", "containers": [ { "name": "demo1", "properties": { - "image": "nginx", "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], - "initContainers": [], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net/" + }, "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Pending" + }, "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Public" + ] }, + "isCreatedFromStandbyPool": false, "osType": "Linux", - "instanceView": { - "events": [], - "state": "Pending" - } - }, + "provisioningState": "Pending", + "sku": "Standard" + } + } + }, + "201": { + "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", "identity": { + "type": "UserAssigned", + "tenantId": "", "userAssignedIdentities": { "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity": { - "principalId": "", - "clientId": "" + "clientId": "", + "principalId": "" } - }, - "tenantId": "", - "type": "UserAssigned" + } }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "eastus2" - } - }, - "201": { - "body": { + "location": "eastus2", "properties": { - "sku": "Standard", - "isCreatedFromStandbyPool": false, - "encryptionProperties": { - "vaultBaseUrl": "https://testkeyvault.vault.azure.net/", - "keyName": "test-key", - "keyVersion": "key version", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity" - }, - "provisioningState": "Running", "containers": [ { "name": "demo1", "properties": { - "image": "nginx", "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], - "initContainers": [], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "key version", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net/" + }, "imageRegistryCredentials": [], + "initContainers": [], + "instanceView": { + "events": [], + "state": "Pending" + }, "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Public" + ] }, + "isCreatedFromStandbyPool": false, "osType": "Linux", - "instanceView": { - "events": [], - "state": "Pending" - } - }, - "identity": { - "userAssignedIdentities": { - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity": { - "principalId": "", - "clientId": "" - } - }, - "tenantId": "", - "type": "UserAssigned" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "eastus2" + "provisioningState": "Running", + "sku": "Standard" + } } } - } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupWithEncryptionProperties" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupExtensions.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupExtensions.json index 23c2d723525e..18b51bfdf2f9 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupExtensions.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupExtensions.json @@ -1,12 +1,6 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupName": "demo1", - "zones": [ - "1" - ], "containerGroup": { "location": "eastus2", "properties": { @@ -33,13 +27,13 @@ ], "imageRegistryCredentials": [], "ipAddress": { + "type": "Private", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Private" + ] }, "osType": "Linux", "subnetIds": [ @@ -52,14 +46,14 @@ "name": "kube-proxy", "properties": { "extensionType": "kube-proxy", - "version": "1.0", + "protectedSettings": { + "kubeConfig": "" + }, "settings": { "clusterCidr": "10.240.0.0/16", "kubeVersion": "v1.9.10" }, - "protectedSettings": { - "kubeConfig": "" - } + "version": "1.0" } }, { @@ -71,47 +65,68 @@ } ] } - } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus2", "properties": { - "sku": "Standard", - "isCreatedFromStandbyPool": false, - "provisioningState": "Pending", "containers": [ { "name": "demo1", "properties": { - "image": "nginx", "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], + "imageRegistryCredentials": [], "initContainers": [], + "instanceView": { + "events": [], + "state": "Pending" + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Pending", + "sku": "Standard", + "subnetIds": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/test-subnet" + } + ], "extensions": [ { "name": "kube-proxy", "properties": { "extensionType": "kube-proxy", - "version": "1.0", "settings": { "clusterCidr": "10.240.0.0/16", "kubeVersion": "v1.9.10" - } + }, + "version": "1.0" } }, { @@ -121,63 +136,63 @@ "version": "1.0" } } - ], - "imageRegistryCredentials": [], - "osType": "Linux", - "instanceView": { - "events": [], - "state": "Pending" - }, - "subnetIds": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/test-subnet" - } ] - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "eastus2" + } } }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus2", "properties": { - "sku": "Standard", - "isCreatedFromStandbyPool": false, - "provisioningState": "Pending", "containers": [ { "name": "demo1", "properties": { - "image": "nginx", "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], + "imageRegistryCredentials": [], "initContainers": [], + "instanceView": { + "events": [], + "state": "Running" + }, + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "provisioningState": "Pending", + "sku": "Standard", + "subnetIds": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/test-subnet" + } + ], "extensions": [ { "name": "kube-proxy", "properties": { "extensionType": "kube-proxy", - "version": "1.0", "settings": { "clusterCidr": "10.240.0.0/16", "kubeVersion": "v1.9.10" - } + }, + "version": "1.0" } }, { @@ -187,24 +202,11 @@ "version": "1.0" } } - ], - "imageRegistryCredentials": [], - "osType": "Linux", - "instanceView": { - "events": [], - "state": "Running" - }, - "subnetIds": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/test-subnet" - } ] - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "eastus2" + } } } - } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupCreateWithExtensions" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json index 11c03af97182..ae0a4af79480 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json @@ -1,15 +1,11 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupProfileName": "demo1", "ContainerGroupProfile": { "location": "westeurope", - "zones": [ - "1" - ], "properties": { + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, "containers": [ { "name": "accdemo", @@ -29,89 +25,93 @@ } }, "securityContext": { - "privileged": false, "capabilities": { "add": [ "CAP_NET_ADMIN" ] - } + }, + "privileged": false } } } ], "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 8000 + "port": 8000, + "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", - "sku": "Confidential", - "confidentialComputeProperties": { - "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" - } - } - } + "sku": "Confidential" + }, + "zones": [ + "1" + ] + }, + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "westeurope", "properties": { - "sku": "Confidential", + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, "containers": [ { "name": "accdemo", "properties": { - "image": "confiimage", "command": [], + "environmentVariables": [], + "image": "confiimage", "ports": [ { "port": 8000 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } }, "securityContext": { - "privileged": false, "capabilities": { "add": [ "CAP_NET_ADMIN" ] - } + }, + "privileged": false } } } ], + "imageRegistryCredentials": [], + "initContainers": [], "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 8000 + "port": 8000, + "protocol": "TCP" } - ], - "type": "Public" + ] }, - "initContainers": [], - "imageRegistryCredentials": [], "osType": "Linux", - "confidentialComputeProperties": { - "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" - }, - "revision": 0 + "revision": 0, + "sku": "Confidential" }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroupProfiles", - "location": "westeurope", "zones": [ "1" ] @@ -119,62 +119,64 @@ }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "westeurope", "properties": { - "sku": "Confidential", + "confidentialComputeProperties": { + "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" + }, "containers": [ { "name": "accdemo", "properties": { - "image": "confiimage", "command": [], + "environmentVariables": [], + "image": "confiimage", "ports": [ { "port": 8000 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } }, "securityContext": { - "privileged": false, "capabilities": { "add": [ "CAP_NET_ADMIN" ] - } + }, + "privileged": false } } } ], + "imageRegistryCredentials": [], + "initContainers": [], "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 8000 + "port": 8000, + "protocol": "TCP" } - ], - "type": "Public" + ] }, - "initContainers": [], - "imageRegistryCredentials": [], "osType": "Linux", - "confidentialComputeProperties": { - "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" - }, - "revision": 1 + "revision": 1, + "sku": "Confidential" }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroupProfiles", - "location": "westeurope", "zones": [ "1" ] } } - } + }, + "operationId": "CGProfile_CreateOrUpdate", + "title": "ConfidentialContainerGroupProfile" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json index 8f7475a59fba..b10d29af4eac 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json @@ -1,14 +1,7 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupProfileName": "demo1", "ContainerGroupProfile": { "location": "eastus2", - "zones": [ - "1" - ], "properties": { "containers": [ { @@ -31,76 +24,83 @@ } } ], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net" + }, "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Public" + ] }, - "osType": "Linux", - "encryptionProperties": { - "vaultBaseUrl": "https://testkeyvault.vault.azure.net", - "keyName": "test-key", - "keyVersion": "", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity" - } - } - } + "osType": "Linux" + }, + "zones": [ + "1" + ] + }, + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "eastus2", "properties": { - "sku": "Standard", - "encryptionProperties": { - "vaultBaseUrl": "https://testkeyvault.vault.azure.net/", - "keyName": "test-key", - "keyVersion": "", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity" - }, "containers": [ { "name": "demo1", "properties": { - "image": "nginx", "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], - "initContainers": [], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net/" + }, "imageRegistryCredentials": [], + "initContainers": [], "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", - "revision": 0 + "revision": 0, + "sku": "Standard" }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroupProfiles", - "location": "eastus2", "zones": [ "1" ] @@ -108,57 +108,59 @@ }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "eastus2", "properties": { - "sku": "Standard", - "encryptionProperties": { - "vaultBaseUrl": "https://testkeyvault.vault.azure.net/", - "keyName": "test-key", - "keyVersion": "key version", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity" - }, "containers": [ { "name": "demo1", "properties": { - "image": "nginx", "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], - "initContainers": [], + "encryptionProperties": { + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", + "keyName": "test-key", + "keyVersion": "key version", + "vaultBaseUrl": "https://testkeyvault.vault.azure.net/" + }, "imageRegistryCredentials": [], + "initContainers": [], "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", - "revision": 1 + "revision": 1, + "sku": "Standard" }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroupProfiles", - "location": "eastus2", "zones": [ "1" ] } } - } + }, + "operationId": "CGProfile_CreateOrUpdate", + "title": "ContainerGroupProfileWithEncryptionProperties" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_Extensions.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_Extensions.json index 077628838281..9558b682a8ca 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_Extensions.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileCreateOrUpdate_Extensions.json @@ -1,14 +1,7 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupProfileName": "demo1", "ContainerGroupProfile": { "location": "eastus2", - "zones": [ - "1" - ], "properties": { "containers": [ { @@ -33,13 +26,13 @@ ], "imageRegistryCredentials": [], "ipAddress": { + "type": "Private", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Private" + ] }, "osType": "Linux", "extensions": [ @@ -47,14 +40,14 @@ "name": "kube-proxy", "properties": { "extensionType": "kube-proxy", - "version": "1.0", + "protectedSettings": { + "kubeConfig": "" + }, "settings": { "clusterCidr": "10.240.0.0/16", "kubeVersion": "v1.9.10" }, - "protectedSettings": { - "kubeConfig": "" - } + "version": "1.0" } }, { @@ -65,46 +58,60 @@ } } ] - } - } + }, + "zones": [ + "1" + ] + }, + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "eastus2", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", "properties": { - "image": "nginx", "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], + "imageRegistryCredentials": [], "initContainers": [], + "osType": "Linux", + "revision": 0, + "sku": "Standard", "extensions": [ { "name": "kube-proxy", "properties": { "extensionType": "kube-proxy", - "version": "1.0", "settings": { "clusterCidr": "10.240.0.0/16", "kubeVersion": "v1.9.10" - } + }, + "version": "1.0" } }, { @@ -114,15 +121,8 @@ "version": "1.0" } } - ], - "imageRegistryCredentials": [], - "osType": "Linux", - "revision": 0 + ] }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroupProfiles", - "location": "eastus2", "zones": [ "1" ] @@ -130,40 +130,47 @@ }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", + "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "eastus2", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", "properties": { - "image": "nginx", "command": [], + "environmentVariables": [], + "image": "nginx", "ports": [ { "port": 80 } ], - "environmentVariables": [], "resources": { "requests": { - "memoryInGB": 1.5, - "cpu": 1.0 + "cpu": 1, + "memoryInGB": 1.5 } } } } ], + "imageRegistryCredentials": [], "initContainers": [], + "osType": "Linux", + "revision": 1, + "sku": "Standard", "extensions": [ { "name": "kube-proxy", "properties": { "extensionType": "kube-proxy", - "version": "1.0", "settings": { "clusterCidr": "10.240.0.0/16", "kubeVersion": "v1.9.10" - } + }, + "version": "1.0" } }, { @@ -173,19 +180,14 @@ "version": "1.0" } } - ], - "imageRegistryCredentials": [], - "osType": "Linux", - "revision": 1 + ] }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroupProfiles", - "location": "eastus2", "zones": [ "1" ] } } - } + }, + "operationId": "CGProfile_CreateOrUpdate", + "title": "ContainerGroupProfileCreateWithExtensions" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileGetByRevisionNumber.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileGetByRevisionNumber.json index 7e9faedfe3d9..1ca406fa3a3b 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileGetByRevisionNumber.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileGetByRevisionNumber.json @@ -1,22 +1,19 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "demo", + "api-version": "2025-09-01", "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", "revisionNumber": "1", - "api-version": "2025-09-01" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", @@ -37,8 +34,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -52,30 +49,35 @@ } ], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", + "revision": 1, + "sku": "Standard", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } - ], - "revision": 1 + ] }, - "type": "Microsoft.ContainerInstance/containerGroupProfiles" + "zones": [ + "1" + ] } } - } + }, + "operationId": "CGProfile_GetByRevisionNumber", + "title": "ContainerGroupProfileGetByRevisionNumber" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileListAllRevisions.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileListAllRevisions.json index 547a8fc6e2d6..97053203ca4a 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileListAllRevisions.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfileListAllRevisions.json @@ -80,5 +80,7 @@ ] } } - } + }, + "title": "ContainerGroupProfileListAllRevisions", + "operationId": "CGProfile_ListAllRevisions" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesCreateOrUpdate.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesCreateOrUpdate.json index 04cf5671f1ef..9d0321fd5eb5 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesCreateOrUpdate.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesCreateOrUpdate.json @@ -1,14 +1,7 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupProfileName": "demo1", "ContainerGroupProfile": { "location": "west us", - "zones": [ - "1" - ], "properties": { "containers": [ { @@ -25,11 +18,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5, "gpu": { "count": 1, "sku": "K80" - } + }, + "memoryInGB": 1.5 } }, "volumeMounts": [ @@ -54,24 +47,24 @@ ], "diagnostics": { "logAnalytics": { - "workspaceId": "workspaceid", - "workspaceKey": "workspaceKey", "logType": "ContainerInsights", "metadata": { "pod-uuid": "test-metadata-value" }, + "workspaceId": "workspaceid", + "workspaceKey": "workspaceKey", "workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/microsoft.operationalinsights/workspaces/workspace" } }, "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", "volumes": [ @@ -79,8 +72,8 @@ "name": "volume1", "azureFile": { "shareName": "shareName", - "storageAccountName": "accountName", - "storageAccountKey": "accountKey" + "storageAccountKey": "accountKey", + "storageAccountName": "accountName" } }, { @@ -95,20 +88,24 @@ } } ] - } - } + }, + "zones": [ + "1" + ] + }, + "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", @@ -124,11 +121,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5, "gpu": { "count": 1, "sku": "K80" - } + }, + "memoryInGB": 1.5 } }, "volumeMounts": [ @@ -153,25 +150,27 @@ ], "diagnostics": { "logAnalytics": { - "workspaceId": "workspaceid", "logType": "ContainerInsights", "metadata": { "pod-uuid": "test-metadata-value" - } + }, + "workspaceId": "workspaceid" } }, "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", + "revision": 0, + "sku": "Standard", "volumes": [ { "name": "volume1", @@ -188,22 +187,20 @@ "name": "volume3", "secret": {} } - ], - "revision": 0 + ] }, - "type": "Microsoft.ContainerInstance/containerGroupProfiles" + "zones": [ + "1" + ] } }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", @@ -219,11 +216,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5, "gpu": { "count": 1, "sku": "K80" - } + }, + "memoryInGB": 1.5 } }, "volumeMounts": [ @@ -246,27 +243,29 @@ } } ], + "diagnostics": { + "logAnalytics": { + "logType": "ContainerInsights", + "metadata": { + "pod-uuid": "test-metadata-value" + }, + "workspaceId": "workspaceid" + } + }, "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", - "diagnostics": { - "logAnalytics": { - "workspaceId": "workspaceid", - "logType": "ContainerInsights", - "metadata": { - "pod-uuid": "test-metadata-value" - } - } - }, + "revision": 1, + "sku": "Standard", "volumes": [ { "name": "volume1", @@ -283,11 +282,14 @@ "name": "volume3", "secret": {} } - ], - "revision": 1 + ] }, - "type": "Microsoft.ContainerInstance/containerGroupProfiles" + "zones": [ + "1" + ] } } - } + }, + "operationId": "CGProfile_CreateOrUpdate", + "title": "ContainerGroupProfilesCreateOrUpdate" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesDelete.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesDelete.json index 60bc6f56ceaa..7767d4a28efb 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesDelete.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesDelete.json @@ -1,12 +1,14 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", + "containerGroupProfileName": "demo1", "resourceGroupName": "demo", - "containerGroupProfileName": "demo1" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": {}, "204": {} - } + }, + "operationId": "CGProfile_Delete", + "title": "ContainerGroupProfilesDelete" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesGet.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesGet.json index 262de84f78b3..036e329df118 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesGet.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesGet.json @@ -1,21 +1,18 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "demo", + "api-version": "2025-09-01", "containerGroupProfileName": "demo1", - "api-version": "2025-09-01" + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", @@ -36,8 +33,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -51,30 +48,35 @@ } ], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", + "revision": 1, + "sku": "Standard", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } - ], - "revision": 1 + ] }, - "type": "Microsoft.ContainerInstance/containerGroupProfiles" + "zones": [ + "1" + ] } } - } + }, + "operationId": "CGProfile_Get", + "title": "ContainerGroupProfilesGet_Succeeded" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesGetPriority.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesGetPriority.json index 85d05fa743bd..c89c2aade616 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesGetPriority.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesGetPriority.json @@ -1,21 +1,18 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "demo", + "api-version": "2025-09-01", "containerGroupProfileName": "demo1", - "api-version": "2025-09-01" + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", @@ -36,8 +33,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -51,31 +48,36 @@ } ], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", "priority": "Spot", + "revision": 1, + "sku": "Standard", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } - ], - "revision": 1 + ] }, - "type": "Microsoft.ContainerInstance/containerGroupProfiles" + "zones": [ + "1" + ] } } - } + }, + "operationId": "CGProfile_Get", + "title": "ContainerGroupProfilesGetWithPriority" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesList.json index 15c092525ea8..d0e70b060588 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesList.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesList.json @@ -1,21 +1,18 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "api-version": "2025-09-01" + "api-version": "2025-09-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { "value": [ { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", @@ -36,8 +33,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -51,32 +48,37 @@ } ], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", + "revision": 1, + "sku": "Standard", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } - ], - "revision": 1 + ] }, - "type": "Microsoft.ContainerInstance/containerGroupProfiles" + "zones": [ + "1" + ] } ] } } - } + }, + "operationId": "CGProfiles_ListBySubscription", + "title": "ContainerGroupProfilesList" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesListByResourceGroup.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesListByResourceGroup.json index f4bff2ef2215..ee179a58af88 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesListByResourceGroup.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesListByResourceGroup.json @@ -1,22 +1,19 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2025-09-01", "resourceGroupName": "demo", - "api-version": "2025-09-01" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { "value": [ { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroupProfiles", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", @@ -37,8 +34,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -52,32 +49,37 @@ } ], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", + "revision": 1, + "sku": "Standard", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } - ], - "revision": 1 + ] }, - "type": "Microsoft.ContainerInstance/containerGroupProfiles" + "zones": [ + "1" + ] } ] } } - } + }, + "operationId": "CGProfiles_ListByResourceGroup", + "title": "ContainerGroupProfilesListByResourceGroup" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesPatch.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesPatch.json index c1fd490d4079..14fa8f307599 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesPatch.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupProfilesPatch.json @@ -1,29 +1,24 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demoResource", "containerGroupProfileName": "demo1", "properties": { "tags": { "tag1key": "tag1Value", "tag2key": "tag2Value" } - } + }, + "resourceGroupName": "demoResource", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { - "id": "/subscriptions/subid/resourceGroups/demoResource/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", - "location": "WestUs", "name": "demo1", "type": "Microsoft.ContainerInstance/containerGroupProfiles", - "tags": { - "tag1key": "tag1Value", - "tag2key": "tag2Value" - }, + "id": "/subscriptions/subid/resourceGroups/demoResource/providers/Microsoft.ContainerInstance/containerGroupProfiles/demo1", + "location": "WestUs", "properties": { - "sku": "Standard", "containers": [ { "name": "demo1", @@ -64,16 +59,18 @@ ], "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", + "revision": 2, + "sku": "Standard", "volumes": [ { "name": "volume1", @@ -90,10 +87,15 @@ "name": "volume3", "secret": {} } - ], - "revision": 2 + ] + }, + "tags": { + "tag1key": "tag1Value", + "tag2key": "tag2Value" } } } - } + }, + "operationId": "CGProfile_Update", + "title": "ContainerGroupProfilesPatch" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupUsage.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupUsage.json index 59057b874276..ce153593d108 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupUsage.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupUsage.json @@ -1,24 +1,26 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2025-09-01", "location": "westcentralus", - "api-version": "2025-09-01" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { "value": [ { - "unit": "Count", + "name": { + "localizedValue": "Container Groups", + "value": "ContainerGroups" + }, "currentValue": 1, "limit": 2000, - "name": { - "value": "ContainerGroups", - "localizedValue": "Container Groups" - } + "unit": "Count" } ] } } - } + }, + "operationId": "Location_ListUsage", + "title": "ContainerUsage" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreateOrUpdate.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreateOrUpdate.json index a4d3fb444c5c..05438f81b666 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreateOrUpdate.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreateOrUpdate.json @@ -1,20 +1,14 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupName": "demo1", - "zones": [ - "1" - ], "containerGroup": { - "location": "west us", "identity": { "type": "SystemAssigned, UserAssigned", "userAssignedIdentities": { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name": {} } }, + "location": "west us", "properties": { "containers": [ { @@ -31,11 +25,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5, "gpu": { "count": 1, "sku": "K80" - } + }, + "memoryInGB": 1.5 } }, "volumeMounts": [ @@ -60,47 +54,47 @@ ], "diagnostics": { "logAnalytics": { - "workspaceId": "workspaceid", - "workspaceKey": "workspaceKey", "logType": "ContainerInsights", "metadata": { "test-key": "test-metadata-value" }, + "workspaceId": "workspaceid", + "workspaceKey": "workspaceKey", "workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/microsoft.operationalinsights/workspaces/workspace" } }, - "subnetIds": [ - { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" - } - ], "dnsConfig": { "nameServers": [ "1.1.1.1" ], - "searchDomains": "cluster.local svc.cluster.local", - "options": "ndots:2" + "options": "ndots:2", + "searchDomains": "cluster.local svc.cluster.local" }, "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Public", - "dnsNameLabel": "dnsnamelabel1", - "autoGeneratedDomainNameLabelScope": "Unsecure" + ] }, "osType": "Linux", + "subnetIds": [ + { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" + } + ], "volumes": [ { "name": "volume1", "azureFile": { "shareName": "shareName", - "storageAccountName": "accountName", - "storageAccountKey": "accountKey" + "storageAccountKey": "accountKey", + "storageAccountName": "accountName" } }, { @@ -116,17 +110,21 @@ } ] } - } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { "containers": [ { @@ -143,11 +141,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5, "gpu": { "count": 1, "sku": "K80" - } + }, + "memoryInGB": 1.5 } }, "volumeMounts": [ @@ -179,25 +177,25 @@ "nameServers": [ "1.1.1.1" ], - "searchDomains": "cluster.local svc.cluster.local", - "options": "ndots:2" + "options": "ndots:2", + "searchDomains": "cluster.local svc.cluster.local" }, "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public", - "dnsNameLabel": "dnsnamelabel1", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "fqdn": "dnsnamelabel1.azure-container.io" + ] }, - "osType": "Linux", "isCreatedFromStandbyPool": false, + "osType": "Linux", "provisioningState": "Succeeded", "volumes": [ { @@ -217,17 +215,17 @@ } ] }, - "type": "Microsoft.ContainerInstance/containerGroups" + "zones": [ + "1" + ] } }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { "containers": [ { @@ -244,11 +242,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5, "gpu": { "count": 1, "sku": "K80" - } + }, + "memoryInGB": 1.5 } }, "volumeMounts": [ @@ -278,20 +276,20 @@ }, "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public", - "dnsNameLabel": "dnsnamelabel1", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "fqdn": "dnsnamelabel1.azure-container.io" + ] }, - "osType": "Linux", "isCreatedFromStandbyPool": false, + "osType": "Linux", "provisioningState": "Succeeded", "volumes": [ { @@ -311,8 +309,12 @@ } ] }, - "type": "Microsoft.ContainerInstance/containerGroups" + "zones": [ + "1" + ] } } - } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupsCreateOrUpdate" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreateOrUpdateSecretReference.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreateOrUpdateSecretReference.json index 1f3ab028b5d1..5f2abc02ba4c 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreateOrUpdateSecretReference.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreateOrUpdateSecretReference.json @@ -1,43 +1,15 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupName": "demo1", - "zones": [ - "1" - ], "containerGroup": { - "location": "west us", "identity": { "type": "UserAssigned", "userAssignedIdentities": { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name": {} } }, + "location": "west us", "properties": { - "secretReferences": [ - { - "name": "envSecretRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/envSecret" - }, - { - "name": "accountKeyRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/accountKey" - }, - { - "name": "volumeSecretRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/volumeSecret" - }, - { - "name": "privateRegistryKeyRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/privateRegistryKey" - } - ], "containers": [ { "name": "demo1", @@ -58,11 +30,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5, "gpu": { "count": 1, "sku": "K80" - } + }, + "memoryInGB": 1.5 } }, "volumeMounts": [ @@ -87,53 +59,75 @@ ], "diagnostics": { "logAnalytics": { - "workspaceId": "workspaceid", - "workspaceKey": "workspaceKey", "logType": "ContainerInsights", "metadata": { "test-key": "test-metadata-value" }, + "workspaceId": "workspaceid", + "workspaceKey": "workspaceKey", "workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/microsoft.operationalinsights/workspaces/workspace" } }, - "subnetIds": [ - { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" - } - ], "dnsConfig": { "nameServers": [ "1.1.1.1" ], - "searchDomains": "cluster.local svc.cluster.local", - "options": "ndots:2" + "options": "ndots:2", + "searchDomains": "cluster.local svc.cluster.local" }, "imageRegistryCredentials": [ { + "passwordReference": "privateRegistryKeyRef", "server": "demoregistry.azurecr.io", - "username": "registryUserName", - "passwordReference": "privateRegistryKeyRef" + "username": "registryUserName" } ], "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", "ports": [ { - "protocol": "TCP", - "port": 80 + "port": 80, + "protocol": "TCP" } - ], - "type": "Public", - "dnsNameLabel": "dnsnamelabel1", - "autoGeneratedDomainNameLabelScope": "Unsecure" + ] }, "osType": "Linux", + "secretReferences": [ + { + "name": "envSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/envSecret" + }, + { + "name": "accountKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/accountKey" + }, + { + "name": "volumeSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/volumeSecret" + }, + { + "name": "privateRegistryKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/privateRegistryKey" + } + ], + "subnetIds": [ + { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" + } + ], "volumes": [ { "name": "volume1", "azureFile": { "shareName": "shareName", - "storageAccountName": "accountName", - "storageAccountKeyReference": "accountKeyRef" + "storageAccountKeyReference": "accountKeyRef", + "storageAccountName": "accountName" } }, { @@ -151,50 +145,32 @@ } ] } - } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "zones": [ + "1" + ] }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "location": "WestUs", "identity": { + "type": "UserAssigned", + "tenantId": "00000000-0000-0000-0000-000000000000", "userAssignedIdentities": { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name": { - "principalId": "00000000-0000-0000-0000-000000000000", - "clientId": "00000000-0000-0000-0000-000000000000" + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" } - }, - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "UserAssigned" + } }, - "zones": [ - "1" - ], - "name": "demo1", + "location": "WestUs", "properties": { - "secretReferences": [ - { - "name": "envSecretRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/envSecret" - }, - { - "name": "accountKeyRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/accountKey" - }, - { - "name": "volumeSecretRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/volumeSecret" - }, - { - "name": "privateRegistryKeyRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/privateRegistryKey" - } - ], "containers": [ { "name": "demo1", @@ -215,11 +191,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5, "gpu": { "count": 1, "sku": "K80" - } + }, + "memoryInGB": 1.5 } }, "volumeMounts": [ @@ -251,39 +227,61 @@ "nameServers": [ "1.1.1.1" ], - "searchDomains": "cluster.local svc.cluster.local", - "options": "ndots:2" + "options": "ndots:2", + "searchDomains": "cluster.local svc.cluster.local" }, "imageRegistryCredentials": [ { + "passwordReference": "privateRegistryKeyRef", "server": "demoregistry.azurecr.io", - "username": "registryUserName", - "passwordReference": "privateRegistryKeyRef" + "username": "registryUserName" } ], "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public", - "dnsNameLabel": "dnsnamelabel1", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "fqdn": "dnsnamelabel1.azure-container.io" + ] }, - "osType": "Linux", "isCreatedFromStandbyPool": false, + "osType": "Linux", "provisioningState": "Succeeded", + "secretReferences": [ + { + "name": "envSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/envSecret" + }, + { + "name": "accountKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/accountKey" + }, + { + "name": "volumeSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/volumeSecret" + }, + { + "name": "privateRegistryKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/privateRegistryKey" + } + ], "volumes": [ { "name": "volume1", "azureFile": { "shareName": "shareName", - "storageAccountName": "accountName", - "storageAccountKeyReference": "accountKeyRef" + "storageAccountKeyReference": "accountKeyRef", + "storageAccountName": "accountName" } }, { @@ -299,50 +297,28 @@ } ] }, - "type": "Microsoft.ContainerInstance/containerGroups" + "zones": [ + "1" + ] } }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "location": "WestUs", "identity": { + "type": "UserAssigned", + "tenantId": "00000000-0000-0000-0000-000000000000", "userAssignedIdentities": { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name": { - "principalId": "00000000-0000-0000-0000-000000000000", - "clientId": "00000000-0000-0000-0000-000000000000" + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" } - }, - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "UserAssigned" + } }, - "zones": [ - "1" - ], - "name": "demo1", + "location": "WestUs", "properties": { - "secretReferences": [ - { - "name": "envSecretRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/envSecret" - }, - { - "name": "accountKeyRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/accountKey" - }, - { - "name": "volumeSecretRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/volumeSecret" - }, - { - "name": "privateRegistryKeyRef", - "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/privateRegistryKey" - } - ], "containers": [ { "name": "demo1", @@ -363,11 +339,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5, "gpu": { "count": 1, "sku": "K80" - } + }, + "memoryInGB": 1.5 } }, "volumeMounts": [ @@ -397,34 +373,56 @@ }, "imageRegistryCredentials": [ { + "passwordReference": "privateRegistryKeyRef", "server": "demoregistry.azurecr.io", - "username": "registryUserName", - "passwordReference": "privateRegistryKeyRef" + "username": "registryUserName" } ], "ipAddress": { + "type": "Public", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public", - "dnsNameLabel": "dnsnamelabel1", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "fqdn": "dnsnamelabel1.azure-container.io" + ] }, - "osType": "Linux", "isCreatedFromStandbyPool": false, + "osType": "Linux", "provisioningState": "Succeeded", + "secretReferences": [ + { + "name": "envSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/envSecret" + }, + { + "name": "accountKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/accountKey" + }, + { + "name": "volumeSecretRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/volumeSecret" + }, + { + "name": "privateRegistryKeyRef", + "identity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", + "secretReferenceUri": "https://keyvaultname.vault.azure.net/secrets/privateRegistryKey" + } + ], "volumes": [ { "name": "volume1", "azureFile": { "shareName": "shareName", - "storageAccountName": "accountName", - "storageAccountKeyReference": "accountKeyRef" + "storageAccountKeyReference": "accountKeyRef", + "storageAccountName": "accountName" } }, { @@ -440,8 +438,12 @@ } ] }, - "type": "Microsoft.ContainerInstance/containerGroups" + "zones": [ + "1" + ] } } - } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupsCreateOrUpdateSecretReference" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreatePriority.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreatePriority.json index a0bcd3f69362..12b47f3497b2 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreatePriority.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsCreatePriority.json @@ -1,122 +1,124 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", - "containerGroupName": "demo1", "containerGroup": { + "location": "eastus", "properties": { - "sku": "Standard", "containers": [ { "name": "test-container-001", "properties": { - "image": "alpine:latest", "command": [ "/bin/sh", "-c", "sleep 10" ], + "image": "alpine:latest", "resources": { "requests": { - "memoryInGB": 1, - "cpu": 1 + "cpu": 1, + "memoryInGB": 1 } } } } ], - "restartPolicy": "Never", "osType": "Linux", - "priority": "Spot" - }, - "location": "eastus" - } + "priority": "Spot", + "restartPolicy": "Never", + "sku": "Standard" + } + }, + "containerGroupName": "demo1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus", "properties": { - "sku": "Standard", - "isCreatedFromStandbyPool": false, - "provisioningState": "Succeeded", "containers": [ { "name": "test-container-001", "properties": { - "image": "alpine:latest", "command": [ "/bin/sh", "-c", "sleep 10" ], - "ports": [], "environmentVariables": [], + "image": "alpine:latest", + "ports": [], "resources": { "requests": { - "memoryInGB": 1, - "cpu": 1 + "cpu": 1, + "memoryInGB": 1 } } } } ], "initContainers": [], - "restartPolicy": "Never", - "osType": "Linux", "instanceView": { "events": [], "state": "Succeeded" }, - "priority": "Spot" - }, - "id": "/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "eastus" + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "priority": "Spot", + "provisioningState": "Succeeded", + "restartPolicy": "Never", + "sku": "Standard" + } } }, "201": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus", "properties": { - "sku": "Standard", - "isCreatedFromStandbyPool": false, - "provisioningState": "Created", "containers": [ { "name": "test-container-001", "properties": { - "image": "alpine:latest", "command": [ "/bin/sh", "-c", "sleep 10" ], - "ports": [], "environmentVariables": [], + "image": "alpine:latest", + "ports": [], "resources": { "requests": { - "memoryInGB": 1, - "cpu": 1 + "cpu": 1, + "memoryInGB": 1 } } } } ], "initContainers": [], - "restartPolicy": "Never", - "osType": "Linux", "instanceView": { "events": [], "state": "Created" }, - "priority": "Spot" - }, - "id": "/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "eastus" + "isCreatedFromStandbyPool": false, + "osType": "Linux", + "priority": "Spot", + "provisioningState": "Created", + "restartPolicy": "Never", + "sku": "Standard" + } } } - } + }, + "operationId": "ContainerGroups_CreateOrUpdate", + "title": "ContainerGroupsCreateWithPriority" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsDelete.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsDelete.json index 13f00a14a45e..8fe4921b8a56 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsDelete.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsDelete.json @@ -1,19 +1,17 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", + "containerGroupName": "demo1", "resourceGroupName": "demo", - "containerGroupName": "demo1" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { "containers": [ { @@ -35,8 +33,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -50,29 +48,31 @@ } ], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", "provisioningState": "Succeeded", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } ] }, - "type": "Microsoft.ContainerInstance/containerGroups" + "zones": [ + "1" + ] } }, "202": { @@ -81,5 +81,7 @@ } }, "204": {} - } + }, + "operationId": "ContainerGroups_Delete", + "title": "ContainerGroupsDelete" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGetPriority.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGetPriority.json index 973cfafab44c..037f8df7ea30 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGetPriority.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGetPriority.json @@ -1,87 +1,89 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "demo", + "api-version": "2025-09-01", "containerGroupName": "demo1", - "api-version": "2025-09-01" + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", + "id": "/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "eastus", "properties": { - "sku": "Standard", - "provisioningState": "Succeeded", "containers": [ { "name": "test-container-001", "properties": { - "image": "alpine:latest", "command": [ "/bin/sh", "-c", "sleep 10" ], - "ports": [], "environmentVariables": [], + "image": "alpine:latest", "instanceView": { - "restartCount": 0, "currentState": { - "state": "Terminated", - "startTime": "2022-11-11T19:33:44.217Z", + "detailStatus": "Completed", "exitCode": 0, "finishTime": "2022-11-11T19:33:55.565Z", - "detailStatus": "Completed" + "startTime": "2022-11-11T19:33:44.217Z", + "state": "Terminated" }, "events": [ { + "name": "Pulling", + "type": "Normal", "count": 2, "firstTimestamp": "2022-11-11T19:28:22Z", "lastTimestamp": "2022-11-11T19:32:09Z", - "name": "Pulling", - "message": "pulling image \"alpine@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870\"", - "type": "Normal" + "message": "pulling image \"alpine@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870\"" }, { + "name": "Pulled", + "type": "Normal", "count": 2, "firstTimestamp": "2022-11-11T19:32:08Z", "lastTimestamp": "2022-11-11T19:32:38Z", - "name": "Pulled", - "message": "Successfully pulled image \"alpine@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870\"", - "type": "Normal" + "message": "Successfully pulled image \"alpine@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870\"" }, { + "name": "Started", + "type": "Normal", "count": 1, "firstTimestamp": "2022-11-11T19:33:44Z", "lastTimestamp": "2022-11-11T19:33:44Z", - "name": "Started", - "message": "Started container", - "type": "Normal" + "message": "Started container" } - ] + ], + "restartCount": 0 }, + "ports": [], "resources": { "requests": { - "memoryInGB": 1, - "cpu": 1 + "cpu": 1, + "memoryInGB": 1 } } } } ], "initContainers": [], - "restartPolicy": "Never", - "osType": "Linux", "instanceView": { "events": [], "state": "Succeeded" }, - "priority": "Spot" - }, - "id": "/subscriptions/subId/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "name": "demo1", - "type": "Microsoft.ContainerInstance/containerGroups", - "location": "eastus" + "osType": "Linux", + "priority": "Spot", + "provisioningState": "Succeeded", + "restartPolicy": "Never", + "sku": "Standard" + } } } - } + }, + "operationId": "ContainerGroups_Get", + "title": "ContainerGroupsGetWithPriority" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGet_Failed.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGet_Failed.json index cb8e795af28a..81dd19180bd7 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGet_Failed.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGet_Failed.json @@ -1,16 +1,17 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "demo", + "api-version": "2025-09-01", "containerGroupName": "demo1", - "api-version": "2025-09-01" + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", "location": "WestUs", - "name": "demo1", "properties": { "containers": [ { @@ -20,30 +21,30 @@ "environmentVariables": [], "image": "nginx", "instanceView": { - "restartCount": 0, "currentState": { - "state": "Waiting", + "detailStatus": "", "startTime": "2017-08-08T00:09:10Z", - "detailStatus": "" + "state": "Waiting" }, "events": [ { + "name": "Pulling", + "type": "Normal", "count": 1, "firstTimestamp": "2017-08-08T00:09:01Z", "lastTimestamp": "2017-08-08T00:09:01Z", - "message": "pulling image \"nginx\"", - "name": "Pulling", - "type": "Normal" + "message": "pulling image \"nginx\"" }, { + "name": "Pulled", + "type": "Normal", "count": 1, "firstTimestamp": "2017-08-08T00:09:10Z", "lastTimestamp": "2017-08-08T00:09:10Z", - "message": "Successfully pulled image \"nginx\"", - "name": "Pulled", - "type": "Normal" + "message": "Successfully pulled image \"nginx\"" } - ] + ], + "restartCount": 0 }, "ports": [ { @@ -58,8 +59,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -75,41 +76,42 @@ "instanceView": { "events": [ { + "name": "FailedMount", + "type": "Normal", "count": 1, "firstTimestamp": "2017-10-08T00:19:10Z", "lastTimestamp": "2017-10-08T00:19:10Z", - "message": "Output: mount error(2): Permission denied", - "name": "FailedMount", - "type": "Normal" + "message": "Output: mount error(2): Permission denied" } ], "state": "Pending" }, "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", "provisioningState": "Failed", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } ] - }, - "type": "Microsoft.ContainerInstance/containerGroups" + } } } - } + }, + "operationId": "ContainerGroups_Get", + "title": "ContainerGroupsGet_Failed" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGet_Succeeded.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGet_Succeeded.json index c0bfd6f76312..19cc7724ff17 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGet_Succeeded.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsGet_Succeeded.json @@ -1,19 +1,17 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "demo", + "api-version": "2025-09-01", "containerGroupName": "demo1", - "api-version": "2025-09-01" + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { "containers": [ { @@ -35,8 +33,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -50,30 +48,34 @@ } ], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", "provisioningState": "Succeeded", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } ] }, - "type": "Microsoft.ContainerInstance/containerGroups" + "zones": [ + "1" + ] } } - } + }, + "operationId": "ContainerGroups_Get", + "title": "ContainerGroupsGet_Succeeded" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsList.json index f14e5358d953..0329e49535cc 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsList.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsList.json @@ -1,19 +1,17 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "api-version": "2025-09-01" + "api-version": "2025-09-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { "value": [ { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { "containers": [ { @@ -35,8 +33,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -50,32 +48,36 @@ } ], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", "provisioningState": "Succeeded", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } ] }, - "type": "Microsoft.ContainerInstance/containerGroups" + "zones": [ + "1" + ] } ] } } - } + }, + "operationId": "ContainerGroups_List", + "title": "ContainerGroupsList" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsListByResourceGroup.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsListByResourceGroup.json index a4e9a268c071..caad9fb6ac6d 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsListByResourceGroup.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsListByResourceGroup.json @@ -1,20 +1,18 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2025-09-01", "resourceGroupName": "demo", - "api-version": "2025-09-01" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { "value": [ { + "name": "demo1", + "type": "Microsoft.ContainerInstance/containerGroups", "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", "location": "WestUs", - "zones": [ - "1" - ], - "name": "demo1", "properties": { "containers": [ { @@ -36,8 +34,8 @@ }, "volumeMounts": [ { - "mountPath": "/mnt/volume1", "name": "volume1", + "mountPath": "/mnt/volume1", "readOnly": false } ] @@ -51,32 +49,36 @@ } ], "ipAddress": { + "type": "Public", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public" + ] }, "osType": "Linux", "provisioningState": "Succeeded", "volumes": [ { + "name": "volume1", "azureFile": { "readOnly": false, "shareName": "share1", "storageAccountName": "storage1" - }, - "name": "volume1" + } } ] }, - "type": "Microsoft.ContainerInstance/containerGroups" + "zones": [ + "1" + ] } ] } } - } + }, + "operationId": "ContainerGroups_ListByResourceGroup", + "title": "ContainerGroupsListByResourceGroup" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsRestart.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsRestart.json index 6a32ae8adf9c..30623a648b77 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsRestart.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsRestart.json @@ -1,11 +1,13 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", + "containerGroupName": "demo1", "resourceGroupName": "demo", - "containerGroupName": "demo1" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "204": {} - } + }, + "operationId": "ContainerGroups_Restart", + "title": "ContainerRestart" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsStart.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsStart.json index dc9265a9c0b7..23a226fd2a8e 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsStart.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsStart.json @@ -1,9 +1,9 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", + "containerGroupName": "demo1", "resourceGroupName": "demo", - "containerGroupName": "demo1" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "202": { @@ -12,5 +12,7 @@ } }, "204": {} - } + }, + "operationId": "ContainerGroups_Start", + "title": "ContainerStart" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsStop.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsStop.json index 6a32ae8adf9c..62005c890abc 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsStop.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsStop.json @@ -1,11 +1,13 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", + "containerGroupName": "demo1", "resourceGroupName": "demo", - "containerGroupName": "demo1" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "204": {} - } + }, + "operationId": "ContainerGroups_Stop", + "title": "ContainerStop" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsUpdate.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsUpdate.json index aba67aabe93d..3587164a9c27 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsUpdate.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerGroupsUpdate.json @@ -1,27 +1,23 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "api-version": "2025-09-01", - "resourceGroupName": "demoResource", - "containerGroupName": "demo1", "Resource": { "tags": { "tag1key": "tag1Value", "tag2key": "tag2Value" } - } + }, + "api-version": "2025-09-01", + "containerGroupName": "demo1", + "resourceGroupName": "demoResource", + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { - "id": "/subscriptions/subid/resourceGroups/demoResource/providers/Microsoft.ContainerInstance/containerGroups/demo1", - "location": "WestUs", "name": "demo1", "type": "Microsoft.ContainerInstance/containerGroups", - "tags": { - "tag1key": "tag1Value", - "tag2key": "tag2Value" - }, + "id": "/subscriptions/subid/resourceGroups/demoResource/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "location": "WestUs", "properties": { "containers": [ { @@ -63,16 +59,16 @@ ], "imageRegistryCredentials": [], "ipAddress": { + "type": "Public", + "dnsNameLabel": "dnsnamelabel1", + "fqdn": "dnsnamelabel1.azure-container.io", "ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP" } - ], - "type": "Public", - "dnsNameLabel": "dnsnamelabel1", - "fqdn": "dnsnamelabel1.azure-container.io" + ] }, "osType": "Linux", "provisioningState": "Succeeded", @@ -93,8 +89,14 @@ "secret": {} } ] + }, + "tags": { + "tag1key": "tag1Value", + "tag2key": "tag2Value" } } } - } + }, + "operationId": "ContainerGroups_Update", + "title": "ContainerGroupsUpdate" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerListLogs.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerListLogs.json index b45def46a667..56b91d6d2157 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerListLogs.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/ContainerListLogs.json @@ -1,10 +1,10 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", - "resourceGroupName": "demo", "containerGroupName": "demo1", "containerName": "container1", + "resourceGroupName": "demo", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "tail": 10 }, "responses": { @@ -13,5 +13,7 @@ "content": "log content" } } - } + }, + "operationId": "Containers_ListLogs", + "title": "ContainerListLogs" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/OperationsList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/OperationsList.json index 168b5203da29..afe82c4b9dee 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/OperationsList.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/OperationsList.json @@ -9,15 +9,17 @@ { "name": "Microsoft.ContainerInstance/containerGroups/read", "display": { - "provider": "Microsoft Container Instance", - "resource": "Container Group", + "description": "Get all container goups.", "operation": "Get Container Groups", - "description": "Get all container goups." + "provider": "Microsoft Container Instance", + "resource": "Container Group" }, "origin": "User" } ] } } - } + }, + "operationId": "Operations_List", + "title": "OperationsList" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/SubnetServiceAssociationLinkDelete.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/SubnetServiceAssociationLinkDelete.json index 24162a2b226c..362cac870937 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/SubnetServiceAssociationLinkDelete.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2025-09-01/examples/SubnetServiceAssociationLinkDelete.json @@ -1,10 +1,10 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2025-09-01", "resourceGroupName": "demo", - "virtualNetworkName": "demo2", - "subnetName": "demo3" + "subnetName": "demo3", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "virtualNetworkName": "demo2" }, "responses": { "200": {}, @@ -14,5 +14,7 @@ } }, "204": {} - } + }, + "operationId": "SubnetServiceAssociationLink_Delete", + "title": "SubnetServiceAssociationLinkDelete" } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/tspconfig.yaml b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/tspconfig.yaml new file mode 100644 index 000000000000..c146679a63bd --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/tspconfig.yaml @@ -0,0 +1,51 @@ +parameters: + "service-dir": + default: "sdk/containerinstance" +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + omit-unreachable-types: true + emitter-output-dir: "{project-root}" + output-file: "{version-status}/{version}/containerInstance.json" + emit-lro-options: "all" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" + examples-dir: "{project-root}/examples" + "@azure-tools/typespec-python": + emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-containerinstance" + namespace: "azure.mgmt.containerinstance" + generate-test: true + generate-sample: true + flavor: "azure" + "@azure-tools/typespec-java": + emitter-output-dir: "{output-dir}/{service-dir}/azure-resourcemanager-containerinstance" + namespace: "com.azure.resourcemanager.containerinstance" + service-name: "ContainerInstance" + flavor: azure + premium: true + generate-tests: false + client-side-validations: true + enable-sync-stack: false + use-object-for-unknown: true + float32-as-double: false + remove-inner: Container,Operation,CachedImages,Capabilities + "@azure-tools/typespec-ts": + emitter-output-dir: "{output-dir}/{service-dir}/arm-containerinstance" + flavor: azure + experimental-extensible-enums: true + compatibility-lro: true + package-details: + name: "@azure/arm-containerinstance" + "@azure-tools/typespec-go": + service-dir: "sdk/resourcemanager/containerinstance" + emitter-output-dir: "{output-dir}/{service-dir}/armcontainerinstance" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/armcontainerinstance" + fix-const-stuttering: false + flavor: "azure" + generate-samples: true + generate-fakes: true + head-as-boolean: true + inject-spans: true +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/resource-manager" From 59bb5eb80d6d63f2b9aa175809937e4622859171 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 3 Apr 2026 17:18:22 +0800 Subject: [PATCH 007/103] Add ARM resource @@clientName renames for C# compute migration - Disk -> ManagedDisk (ManagedDiskResource, ManagedDiskData) - Image -> DiskImage (DiskImageResource, DiskImageData) - RestorePointCollection -> RestorePointGroup (RestorePointGroupResource, RestorePointGroupData) - PrivateEndpointConnection -> ComputePrivateEndpointConnection (RP-prefix convention) - SshPublicKeyResource -> SshPublicKey (SshPublicKeyResource, SshPublicKeyData) - VirtualMachineScaleSetVMRunCommands -> VirtualMachineScaleSetVmRunCommands (VM->Vm casing) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 17 +++++++++++++++++ .../Compute/ComputeDisk/client.tsp | 10 ++++++++++ 2 files changed, 27 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 2b4185f986e7..bee369de710f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -489,3 +489,20 @@ using Compute; "VirtualMachineScaleSetRollingUpgradeProperties", "csharp" ); + +// ── ARM resource renames for backward compatibility ── + +// Image → DiskImage (old: DiskImageResource, DiskImageData, DiskImageCollection) +@@clientName(Image, "DiskImage", "csharp"); + +// RestorePointCollection → RestorePointGroup (old: RestorePointGroupResource, RestorePointGroupData) +@@clientName(RestorePointCollection, "RestorePointGroup", "csharp"); + +// SshPublicKeyResource → SshPublicKey (old: SshPublicKeyResource, SshPublicKeyData, SshPublicKeyCollection) +@@clientName(SshPublicKeyResource, "SshPublicKey", "csharp"); + +// VirtualMachineScaleSetVMRunCommands interface → Vm casing (old: VirtualMachineScaleSetVmRunCommandResource) +@@clientName(VirtualMachineScaleSetVMRunCommands, + "VirtualMachineScaleSetVmRunCommands", + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index b1b09844256d..c68c40e1f771 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -38,3 +38,13 @@ using ComputeDisk; @@clientName(PublicNetworkAccess, "DiskPublicNetworkAccess", "csharp"); @@clientName(EncryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); @@clientName(Encryption, "DiskEncryption", "csharp"); + +// ARM resource renames for backward compatibility +// Disk → ManagedDisk (old: ManagedDiskResource, ManagedDiskData, ManagedDiskCollection) +@@clientName(Disk, "ManagedDisk", "csharp"); + +// PrivateEndpointConnection → ComputePrivateEndpointConnection (old RP-prefix convention) +@@clientName(PrivateEndpointConnection, + "ComputePrivateEndpointConnection", + "csharp" +); From d66bedc4c2a1306d7c313a4d7e6934f58db0167e Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 7 Apr 2026 17:37:49 +0800 Subject: [PATCH 008/103] Fix SshPublicKey name collision and add RestorePointGroupSource rename - Remove @@clientName(SshPublicKeyResource, 'SshPublicKey') that collides with existing model SshPublicKey in models.tsp - Add @@clientName(RestorePointCollectionSourceProperties, 'RestorePointGroupSource') to match old SDK naming convention Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index bee369de710f..e4479a02256b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -497,9 +497,13 @@ using Compute; // RestorePointCollection → RestorePointGroup (old: RestorePointGroupResource, RestorePointGroupData) @@clientName(RestorePointCollection, "RestorePointGroup", "csharp"); +@@clientName(RestorePointCollectionSourceProperties, + "RestorePointGroupSource", + "csharp" +); -// SshPublicKeyResource → SshPublicKey (old: SshPublicKeyResource, SshPublicKeyData, SshPublicKeyCollection) -@@clientName(SshPublicKeyResource, "SshPublicKey", "csharp"); +// NOTE: Cannot rename SshPublicKeyResource to SshPublicKey because model SshPublicKey already exists in models.tsp +// The resource will remain as SshPublicKeyResourceResource — needs SDK-side [CodeGenType] customization // VirtualMachineScaleSetVMRunCommands interface → Vm casing (old: VirtualMachineScaleSetVmRunCommandResource) @@clientName(VirtualMachineScaleSetVMRunCommands, From 12a3dfc002c762e30af0b90a15e9a6864f4fbd7f Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 8 Apr 2026 13:34:20 +0800 Subject: [PATCH 009/103] Add markAsPageable for VM extension list operations VirtualMachineExtensions.list and VirtualMachineScaleSetVMExtensions.list return a single-page list result but need to be treated as pageable for the C# SDK to generate proper IEnumerable/IAsyncEnumerable support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index e4479a02256b..0f19beeca28c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -510,3 +510,12 @@ using Compute; "VirtualMachineScaleSetVmRunCommands", "csharp" ); + +// Mark non-pageable list operations as pageable for backward compatibility +// These return a single-page list result but the SDK expects them to be enumerable +@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineExtensions.list, + "csharp" +); +@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineScaleSetVMExtensions.list, + "csharp" +); From 3480fba4f2aa1a953334907dac1b8d7045ea8617 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 8 Apr 2026 15:55:11 +0800 Subject: [PATCH 010/103] Convert SharedGallery/CommunityGallery from ARM resources to raw operations These 6 types were deprecated as ARM resources in the .NET SDK and replaced with hand-written custom code. Convert their TypeSpec definitions from ARM resource patterns (@parentResource, @armResourceOperations) to raw @route operations so the C# generator no longer treats them as ARM resources. - SharedGallery, SharedGalleryImage, SharedGalleryImageVersion - CommunityGallery, CommunityGalleryImage, CommunityGalleryImageVersion - Add @@clientName for operations to match old SDK method names - Swagger changes are description-only (no route/schema changes) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ComputeGallery/CommunityGallery.tsp | 26 ++++---- .../ComputeGallery/CommunityGalleryImage.tsp | 45 +++++++++---- .../CommunityGalleryImageVersion.tsp | 53 +++++++++++---- .../Compute/ComputeGallery/SharedGallery.tsp | 55 +++++++++------- .../ComputeGallery/SharedGalleryImage.tsp | 58 +++++++++++----- .../SharedGalleryImageVersion.tsp | 66 ++++++++++++++----- .../Compute/ComputeGallery/client.tsp | 28 ++++++++ .../Compute/stable/2024-03-03/GalleryRP.json | 10 +-- .../Compute/stable/2025-03-03/GalleryRP.json | 10 +-- 9 files changed, 249 insertions(+), 102 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGallery.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGallery.tsp index 14c661545928..9a11074d0d62 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGallery.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGallery.tsp @@ -4,19 +4,13 @@ import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; -using TypeSpec.Rest; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; -using Common; namespace ComputeGallery; /** * Specifies information about the Community Gallery that you want to create or update. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -@subscriptionResource -@parentResource(SubscriptionLocationResource) model CommunityGallery is ProxyResourceCommunity { ...Azure.ResourceManager.Legacy.ResourceNameParameter< Resource = CommunityGallery, @@ -26,15 +20,25 @@ model CommunityGallery is ProxyResourceCommunity { >; } -@armResourceOperations +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface CommunityGalleries { /** * Get a community gallery by gallery public name. */ - get is ComputeResourceRead< - CommunityGallery, - Azure.ResourceManager.Foundations.SubscriptionBaseParameters - >; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}") + @get + @tag("CommunityGalleries") + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The public name of the community gallery. */ + @path + publicGalleryName: string, + ): ArmResponse | Common.CloudError; } @@doc(CommunityGallery.name, "The public name of the community gallery."); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImage.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImage.tsp index dfc62dbefedd..2346b28a70de 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImage.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImage.tsp @@ -5,18 +5,13 @@ import "@typespec/rest"; import "./models.tsp"; import "./CommunityGallery.tsp"; -using TypeSpec.Rest; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; -using Common; namespace ComputeGallery; /** * Specifies information about the gallery image definition that you want to create or update. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -@parentResource(CommunityGallery) model CommunityGalleryImage is ProxyResourceCommunity { ...Azure.ResourceManager.Legacy.ResourceNameParameter< @@ -27,20 +22,48 @@ model CommunityGalleryImage >; } -@armResourceOperations +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface CommunityGalleryImages { /** * Get a community gallery image. */ - get is ComputeResourceRead; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}") + @get + @tag("CommunityGalleryImages") + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The public name of the community gallery. */ + @path + publicGalleryName: string, + + /** The name of the community gallery image definition. */ + @path + galleryImageName: string, + ): ArmResponse | Common.CloudError; /** * List community gallery images inside a gallery. */ - list is Azure.ResourceManager.Legacy.ComputeArmResourceListByParent< - CommunityGalleryImage, - Response = CommunityGalleryImageList - >; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images") + @get + @list + @tag("CommunityGalleryImages") + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The public name of the community gallery. */ + @path + publicGalleryName: string, + ): ArmResponse | Common.CloudError; } @@doc(CommunityGalleryImage.name, diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImageVersion.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImageVersion.tsp index e56ea6b0cda6..da4432977c2e 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImageVersion.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImageVersion.tsp @@ -5,18 +5,13 @@ import "@typespec/rest"; import "./models.tsp"; import "./CommunityGalleryImage.tsp"; -using TypeSpec.Rest; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; -using Common; namespace ComputeGallery; /** * Specifies information about the gallery image version that you want to create or update. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -@parentResource(CommunityGalleryImage) model CommunityGalleryImageVersion is ProxyResourceCommunity { ...Azure.ResourceManager.Legacy.ResourceNameParameter< @@ -27,20 +22,56 @@ model CommunityGalleryImageVersion >; } -@armResourceOperations +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface CommunityGalleryImageVersions { /** * Get a community gallery image version. */ - get is ComputeResourceRead; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") + @get + @tag("CommunityGalleryImageVersions") + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The public name of the community gallery. */ + @path + publicGalleryName: string, + + /** The name of the community gallery image definition. */ + @path + galleryImageName: string, + + /** The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. */ + @path + galleryImageVersionName: string, + ): ArmResponse | Common.CloudError; /** * List community gallery image versions inside an image. */ - list is Azure.ResourceManager.Legacy.ComputeArmResourceListByParent< - CommunityGalleryImageVersion, - Response = CommunityGalleryImageVersionList - >; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions") + @get + @list + @tag("CommunityGalleryImageVersions") + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The public name of the community gallery. */ + @path + publicGalleryName: string, + + /** The name of the community gallery image definition. */ + @path + galleryImageName: string, + ): ArmResponse | Common.CloudError; } @@doc(CommunityGalleryImageVersion.name, diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGallery.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGallery.tsp index f74278706cd4..1662b6098e70 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGallery.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGallery.tsp @@ -4,19 +4,13 @@ import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; -using TypeSpec.Rest; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; -using Common; namespace ComputeGallery; /** * Specifies information about the Shared Gallery that you want to create or update. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -@subscriptionResource -@parentResource(SubscriptionLocationResource) model SharedGallery is ProxyResourceShared { ...Azure.ResourceManager.Legacy.ResourceNameParameter< Resource = SharedGallery, @@ -26,31 +20,46 @@ model SharedGallery is ProxyResourceShared { >; } -@armResourceOperations +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface SharedGalleries { /** * Get a shared gallery by subscription id or tenant id. */ - get is ComputeResourceRead< - SharedGallery, - Azure.ResourceManager.Foundations.SubscriptionBaseParameters - >; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}") + @get + @tag("SharedGalleries") + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The unique name of the Shared Gallery. */ + @path + galleryUniqueName: string, + ): ArmResponse | Common.CloudError; /** * List shared galleries by subscription id or tenant id. */ - list is Azure.ResourceManager.Legacy.ComputeArmResourceListByParent< - SharedGallery, - Azure.ResourceManager.Foundations.SubscriptionBaseParameters, - Parameters = { - /** - * The query parameter to decide what shared galleries to fetch when doing listing operations. - */ - @query("sharedTo") - sharedTo?: SharedToValues; - }, - Response = SharedGalleryList - >; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries") + @get + @list + @tag("SharedGalleries") + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** + * The query parameter to decide what shared galleries to fetch when doing listing operations. + */ + @query("sharedTo") + sharedTo?: SharedToValues, + ): ArmResponse | Common.CloudError; } @@doc(SharedGallery.name, "The unique name of the Shared Gallery."); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImage.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImage.tsp index 84bf038417f1..0f84b1ee586e 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImage.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImage.tsp @@ -5,18 +5,13 @@ import "@typespec/rest"; import "./models.tsp"; import "./SharedGallery.tsp"; -using TypeSpec.Rest; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; -using Common; namespace ComputeGallery; /** * Specifies information about the gallery image definition that you want to create or update. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -@parentResource(SharedGallery) model SharedGalleryImage is ProxyResourceShared { ...Azure.ResourceManager.Legacy.ResourceNameParameter< Resource = SharedGalleryImage, @@ -26,27 +21,54 @@ model SharedGalleryImage is ProxyResourceShared { >; } -@armResourceOperations +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface SharedGalleryImages { /** * Get a shared gallery image by subscription id or tenant id. */ - get is ComputeResourceRead; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}") + @get + @tag("SharedGalleryImages") + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The unique name of the Shared Gallery. */ + @path + galleryUniqueName: string, + + /** The name of the Shared Gallery Image Definition from which the Image Versions are to be listed. */ + @path + galleryImageName: string, + ): ArmResponse | Common.CloudError; /** * List shared gallery images by subscription id or tenant id. */ - list is Azure.ResourceManager.Legacy.ComputeArmResourceListByParent< - SharedGalleryImage, - Parameters = { - /** - * The query parameter to decide what shared galleries to fetch when doing listing operations. - */ - @query("sharedTo") - sharedTo?: SharedToValues; - }, - Response = SharedGalleryImageList - >; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images") + @get + @list + @tag("SharedGalleryImages") + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The unique name of the Shared Gallery. */ + @path + galleryUniqueName: string, + + /** + * The query parameter to decide what shared galleries to fetch when doing listing operations. + */ + @query("sharedTo") + sharedTo?: SharedToValues, + ): ArmResponse | Common.CloudError; } @@doc(SharedGalleryImage.name, diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImageVersion.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImageVersion.tsp index 1cb3d2ce0062..4340e01e562c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImageVersion.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImageVersion.tsp @@ -5,18 +5,13 @@ import "@typespec/rest"; import "./models.tsp"; import "./SharedGalleryImage.tsp"; -using TypeSpec.Rest; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; -using Common; namespace ComputeGallery; /** * Specifies information about the gallery image version that you want to create or update. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -@parentResource(SharedGalleryImage) model SharedGalleryImageVersion is ProxyResourceShared { ...Azure.ResourceManager.Legacy.ResourceNameParameter< @@ -27,27 +22,62 @@ model SharedGalleryImageVersion >; } -@armResourceOperations +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface SharedGalleryImageVersions { /** * Get a shared gallery image version by subscription id or tenant id. */ - get is ComputeResourceRead; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}") + @get + @tag("SharedGalleryImageVersions") + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The unique name of the Shared Gallery. */ + @path + galleryUniqueName: string, + + /** The name of the Shared Gallery Image Definition from which the Image Versions are to be listed. */ + @path + galleryImageName: string, + + /** The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. */ + @path + galleryImageVersionName: string, + ): ArmResponse | Common.CloudError; /** * List shared gallery image versions by subscription id or tenant id. */ - list is Azure.ResourceManager.Legacy.ComputeArmResourceListByParent< - SharedGalleryImageVersion, - Parameters = { - /** - * The query parameter to decide what shared galleries to fetch when doing listing operations. - */ - @query("sharedTo") - sharedTo?: SharedToValues; - }, - Response = SharedGalleryImageVersionList - >; + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions") + @get + @list + @tag("SharedGalleryImageVersions") + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** The name of the Azure region. */ + ...Azure.ResourceManager.LocationResourceParameter, + + /** The unique name of the Shared Gallery. */ + @path + galleryUniqueName: string, + + /** The name of the Shared Gallery Image Definition from which the Image Versions are to be listed. */ + @path + galleryImageName: string, + + /** + * The query parameter to decide what shared galleries to fetch when doing listing operations. + */ + @query("sharedTo") + sharedTo?: SharedToValues, + ): ArmResponse | Common.CloudError; } @@doc(SharedGalleryImageVersion.name, diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 110588322f85..d99fa59c5c1c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -93,3 +93,31 @@ using ComputeGallery; "ImageIdentifier", "csharp" ); + +// Rename raw gallery operations to match old SDK method names +@@clientName(SharedGalleries.get, "GetSharedGallery", "csharp"); +@@clientName(SharedGalleries.list, "GetSharedGalleries", "csharp"); +@@clientName(SharedGalleryImages.get, "GetSharedGalleryImage", "csharp"); +@@clientName(SharedGalleryImages.list, "GetSharedGalleryImages", "csharp"); +@@clientName(SharedGalleryImageVersions.get, + "GetSharedGalleryImageVersion", + "csharp" +); +@@clientName(SharedGalleryImageVersions.list, + "GetSharedGalleryImageVersions", + "csharp" +); +@@clientName(CommunityGalleries.get, "GetCommunityGallery", "csharp"); +@@clientName(CommunityGalleryImages.get, "GetCommunityGalleryImage", "csharp"); +@@clientName(CommunityGalleryImages.list, + "GetCommunityGalleryImages", + "csharp" +); +@@clientName(CommunityGalleryImageVersions.get, + "GetCommunityGalleryImageVersion", + "csharp" +); +@@clientName(CommunityGalleryImageVersions.list, + "GetCommunityGalleryImageVersions", + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json index bf5e31462330..a123af4a88eb 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json @@ -192,7 +192,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/CommunityGalleryImageList" } @@ -301,7 +301,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/CommunityGalleryImageVersionList" } @@ -423,7 +423,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SharedGalleryList" } @@ -538,7 +538,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SharedGalleryImageList" } @@ -667,7 +667,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SharedGalleryImageVersionList" } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json index 351bf26df4d0..75645e53b099 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json @@ -198,7 +198,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/CommunityGalleryImageList" } @@ -307,7 +307,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/CommunityGalleryImageVersionList" } @@ -429,7 +429,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SharedGalleryList" } @@ -544,7 +544,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SharedGalleryImageList" } @@ -673,7 +673,7 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SharedGalleryImageVersionList" } From ee09126eb15e5ab434362b7a4f23424861b7a459 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 8 Apr 2026 16:23:30 +0800 Subject: [PATCH 011/103] Rename SshPublicKey model to SshPublicKeyConfiguration, resource to SshPublicKey Free up the 'SshPublicKey' name for the ARM resource by renaming the non-resource model (SSH key path/keyData) to SshPublicKeyConfiguration, matching the old AutoRest-generated SDK name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 0f19beeca28c..8dc844bc3675 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -502,8 +502,10 @@ using Compute; "csharp" ); -// NOTE: Cannot rename SshPublicKeyResource to SshPublicKey because model SshPublicKey already exists in models.tsp -// The resource will remain as SshPublicKeyResourceResource — needs SDK-side [CodeGenType] customization +// Rename non-resource model SshPublicKey → SshPublicKeyConfiguration to free the name, +// then rename the resource model SshPublicKeyResource → SshPublicKey +@@clientName(Compute.SshPublicKey, "SshPublicKeyConfiguration", "csharp"); +@@clientName(SshPublicKeyResource, "SshPublicKey", "csharp"); // VirtualMachineScaleSetVMRunCommands interface → Vm casing (old: VirtualMachineScaleSetVmRunCommandResource) @@clientName(VirtualMachineScaleSetVMRunCommands, From e868f06d3d3101ab656a097ae2830253f0bb6b4d Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 9 Apr 2026 14:29:02 +0800 Subject: [PATCH 012/103] Add 42 @@clientName renames for C# backward compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Batch rename of types to match old AutoRest-generated names: - RP-prefix prepending (ResourceSku→ComputeResourceSku, etc.) - Content/Input/Parameters suffix normalization - VirtualMachine prefix restoration - Gallery and Disk namespace renames Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 29 +++++++++++++++++++ .../Compute/ComputeDisk/client.tsp | 3 ++ .../Compute/ComputeGallery/client.tsp | 4 +++ .../Microsoft.Compute/Compute/client.tsp | 18 ++++++++++++ 4 files changed, 54 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 8dc844bc3675..ae805c9b0aee 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -521,3 +521,32 @@ using Compute; @@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineScaleSetVMExtensions.list, "csharp" ); + +// ── Type renames for backward compatibility (batch) ── +@@clientName(PublicIPAddressSku, "ComputePublicIPAddressSku", "csharp"); +@@clientName(SecurityPostureReference, "ComputeSecurityPostureReference", "csharp"); +@@clientName(StatusLevelTypes, "ComputeStatusLevelType", "csharp"); +@@clientName(UpgradeMode, "VirtualMachineScaleSetUpgradeMode", "csharp"); +@@clientName(SettingNames, "SettingName", "csharp"); +@@clientName(ProtocolTypes, "WinRMListenerProtocolType", "csharp"); +@@clientName(InstanceViewTypes, "InstanceViewType", "csharp"); +@@clientName(MaintenanceOperationResultCodeTypes, "MaintenanceOperationResultCodeType", "csharp"); +@@clientName(OSDisk, "VirtualMachineOSDisk", "csharp"); +@@clientName(VMDiskSecurityProfile, "VirtualMachineDiskSecurityProfile", "csharp"); +@@clientName(VMSizeProperties, "VirtualMachineSizeProperties", "csharp"); +@@clientName(VirtualMachineScaleSetManagedDiskParameters, "VirtualMachineScaleSetManagedDisk", "csharp"); +@@clientName(AlternativeOption, "ImageAlternativeOption", "csharp"); +@@clientName(LogAnalyticsOperationResult, "LogAnalytics", "csharp"); +@@clientName(RunCommandResult, "VirtualMachineRunCommandResult", "csharp"); +@@clientName(ConvertToVirtualMachineScaleSetInput, "ConvertToVirtualMachineScaleSetContent", "csharp"); +@@clientName(MigrateVMToVirtualMachineScaleSetInput, "MigrateVmToVirtualMachineScaleSetContent", "csharp"); +@@clientName(OrchestrationServiceStateInput, "OrchestrationServiceStateContent", "csharp"); +@@clientName(RequestRateByIntervalInput, "RequestRateByIntervalContent", "csharp"); +@@clientName(ThrottledRequestsInput, "ThrottledRequestsContent", "csharp"); +@@clientName(VirtualMachineCaptureParameters, "VirtualMachineCaptureContent", "csharp"); +@@clientName(VirtualMachineInstallPatchesParameters, "VirtualMachineInstallPatchesContent", "csharp"); +@@clientName(VirtualMachineReimageParameters, "VirtualMachineReimageContent", "csharp"); +@@clientName(VirtualMachineScaleSetReimageParameters, "VirtualMachineScaleSetReimageContent", "csharp"); +@@clientName(VMScaleSetConvertToSinglePlacementGroupInput, "VirtualMachineScaleSetConvertToSinglePlacementGroupContent", "csharp"); +@@clientName(VMScaleSetScaleOutInput, "VirtualMachineScaleSetScaleOutContent", "csharp"); +@@clientName(SshGenerateKeyPairInputParameters, "SshGenerateKeyPairInputContent", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index c68c40e1f771..580732cbe4b1 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -48,3 +48,6 @@ using ComputeDisk; "ComputePrivateEndpointConnection", "csharp" ); + +// Type rename for backward compatibility +@@clientName(PrivateLinkResource, "ComputePrivateLinkResourceData", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index d99fa59c5c1c..5b28668d40d7 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -121,3 +121,7 @@ using ComputeGallery; "GetCommunityGalleryImageVersions", "csharp" ); + +// Type renames for backward compatibility +@@clientName(EndpointTypes, "ComputeGalleryEndpointType", "csharp"); +@@clientName(GallerySoftDeletedResource, "GallerySoftDeletedResourceDetails", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 1e03ec22db88..f1b7104249dd 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -62,3 +62,21 @@ namespace ComputeCombine; "VirtualMachineIdentityUserAssignedIdentities", "java" ); + +// ── C# type renames for backward compatibility (migration from AutoRest) ── + +// Common namespace types +@@clientName(Common.SubResource, "ComputeSubResourceData", "csharp"); +@@clientName(Common.SubResourceReadOnly, "ComputeWriteableSubResourceData", "csharp"); + +// ComputeSku namespace types +@@clientName(ComputeSku.ResourceSku, "ComputeResourceSku", "csharp"); +@@clientName(ComputeSku.ResourceSkuCapabilities, "ComputeResourceSkuCapabilities", "csharp"); +@@clientName(ComputeSku.ResourceSkuCapacity, "ComputeResourceSkuCapacity", "csharp"); +@@clientName(ComputeSku.ResourceSkuCapacityScaleType, "ComputeResourceSkuCapacityScaleType", "csharp"); +@@clientName(ComputeSku.ResourceSkuLocationInfo, "ComputeResourceSkuLocationInfo", "csharp"); +@@clientName(ComputeSku.ResourceSkuRestrictionInfo, "ComputeResourceSkuRestrictionInfo", "csharp"); +@@clientName(ComputeSku.ResourceSkuRestrictions, "ComputeResourceSkuRestrictions", "csharp"); +@@clientName(ComputeSku.ResourceSkuRestrictionsReasonCode, "ComputeResourceSkuRestrictionsReasonCode", "csharp"); +@@clientName(ComputeSku.ResourceSkuRestrictionsType, "ComputeResourceSkuRestrictionsType", "csharp"); +@@clientName(ComputeSku.ResourceSkuZoneDetails, "ComputeResourceSkuZoneDetails", "csharp"); From b1188d955d8795c724d11c886d160de43980ffea Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 9 Apr 2026 14:46:06 +0800 Subject: [PATCH 013/103] =?UTF-8?q?Add=20Pir*Resource=20=E2=86=92=20Pir*Re?= =?UTF-8?q?sourceData=20renames=20for=20C#=20backward=20compat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/ComputeGallery/client.tsp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 5b28668d40d7..243656baee21 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -125,3 +125,6 @@ using ComputeGallery; // Type renames for backward compatibility @@clientName(EndpointTypes, "ComputeGalleryEndpointType", "csharp"); @@clientName(GallerySoftDeletedResource, "GallerySoftDeletedResourceDetails", "csharp"); +@@clientName(PirResource, "PirResourceData", "csharp"); +@@clientName(PirSharedGalleryResource, "PirSharedGalleryResourceData", "csharp"); +@@clientName(PirCommunityGalleryResource, "PirCommunityGalleryResourceData", "csharp"); From cd24e3d716933c95576b93fa1672d739f08ad1a0 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 9 Apr 2026 16:50:00 +0800 Subject: [PATCH 014/103] Rename gallery models to *Data suffix for C# backward compat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SharedGallery→SharedGalleryData, CommunityGallery→CommunityGalleryData, etc. These types were ARM resources with Data suffix in the old SDK. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/ComputeGallery/client.tsp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 243656baee21..d03d972389e3 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -128,3 +128,11 @@ using ComputeGallery; @@clientName(PirResource, "PirResourceData", "csharp"); @@clientName(PirSharedGalleryResource, "PirSharedGalleryResourceData", "csharp"); @@clientName(PirCommunityGalleryResource, "PirCommunityGalleryResourceData", "csharp"); + +// Rename gallery models to *Data for backward compatibility (they were ARM resources before) +@@clientName(SharedGallery, "SharedGalleryData", "csharp"); +@@clientName(SharedGalleryImage, "SharedGalleryImageData", "csharp"); +@@clientName(SharedGalleryImageVersion, "SharedGalleryImageVersionData", "csharp"); +@@clientName(CommunityGallery, "CommunityGalleryData", "csharp"); +@@clientName(CommunityGalleryImage, "CommunityGalleryImageData", "csharp"); +@@clientName(CommunityGalleryImageVersion, "CommunityGalleryImageVersionData", "csharp"); From ab4ae0215e9684b6056cfd4a7ca4575181bf388d Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 10 Apr 2026 16:18:25 +0800 Subject: [PATCH 015/103] Add 53 @@clientName type renames for C# backward compatibility (batch 2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural→singular enums, RP-prefix renames, VM/IP casing, and other type name normalization. Resolves 53 of 66 TypesMustExist ApiCompat errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 49 +++++++++++++++++++ .../Compute/ComputeDisk/client.tsp | 8 +++ .../Compute/ComputeGallery/client.tsp | 15 ++++++ .../Microsoft.Compute/Compute/client.tsp | 3 ++ 4 files changed, 75 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index ae805c9b0aee..d506e4334cd5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -550,3 +550,52 @@ using Compute; @@clientName(VMScaleSetConvertToSinglePlacementGroupInput, "VirtualMachineScaleSetConvertToSinglePlacementGroupContent", "csharp"); @@clientName(VMScaleSetScaleOutInput, "VirtualMachineScaleSetScaleOutContent", "csharp"); @@clientName(SshGenerateKeyPairInputParameters, "SshGenerateKeyPairInputContent", "csharp"); + +// ── Plural→singular enum renames (C# backward compat) ── +@@clientName(CapacityReservationGroupInstanceViewTypes, "CapacityReservationGroupInstanceViewType", "csharp"); +@@clientName(CapacityReservationInstanceViewTypes, "CapacityReservationInstanceViewType", "csharp"); +@@clientName(ComponentNames, "ComponentName", "csharp"); +@@clientName(DiffDiskOptions, "DiffDiskOption", "csharp"); +@@clientName(DiskControllerTypes, "DiskControllerType", "csharp"); +@@clientName(DomainNameLabelScopeTypes, "DomainNameLabelScopeType", "csharp"); +@@clientName(ExpandTypesForListVMs, "ExpandTypesForListVm", "csharp"); +@@clientName(PassNames, "PassName", "csharp"); +@@clientName(ResourceIdOptionsForGetCapacityReservationGroups, "ResourceIdOptionsForGetCapacityReservationGroup", "csharp"); +@@clientName(ScriptShellTypes, "ScriptShellType", "csharp"); +@@clientName(SecurityEncryptionTypes, "SecurityEncryptionType", "csharp"); +@@clientName(SecurityTypes, "SecurityType", "csharp"); +@@clientName(SshEncryptionTypes, "SshEncryptionType", "csharp"); +@@clientName(StorageAccountTypes, "StorageAccountType", "csharp"); +@@clientName(VirtualMachineSizeTypes, "VirtualMachineSizeType", "csharp"); + +// ── RP-prefix renames (C# backward compat) ── +@@clientName(AllocationStrategy, "ComputeAllocationStrategy", "csharp"); +@@clientName(DeleteOptions, "ComputeDeleteOption", "csharp"); +@@clientName(NetworkInterfaceAuxiliaryMode, "ComputeNetworkInterfaceAuxiliaryMode", "csharp"); +@@clientName(NetworkInterfaceAuxiliarySku, "ComputeNetworkInterfaceAuxiliarySku", "csharp"); +@@clientName(PublicIPAddressSkuName, "ComputePublicIPAddressSkuName", "csharp"); +@@clientName(PublicIPAddressSkuTier, "ComputePublicIPAddressSkuTier", "csharp"); + +// ── VM→Vm casing renames (C# backward compat) ── +@@clientName(LinuxVMGuestPatchAutomaticByPlatformSettings, "LinuxVmGuestPatchAutomaticByPlatformSettings", "csharp"); +@@clientName(LinuxVMGuestPatchMode, "LinuxVmGuestPatchMode", "csharp"); +@@clientName(VMGuestPatchRebootBehavior, "VmGuestPatchRebootBehavior", "csharp"); +@@clientName(VMGuestPatchRebootSetting, "VmGuestPatchRebootSetting", "csharp"); +@@clientName(VMGuestPatchRebootStatus, "VmGuestPatchRebootStatus", "csharp"); +@@clientName(WindowsVMGuestPatchAutomaticByPlatformSettings, "WindowsVmGuestPatchAutomaticByPlatformSettings", "csharp"); +@@clientName(WindowsVMGuestPatchMode, "WindowsVmGuestPatchMode", "csharp"); + +// ── IP→Ip casing renames (C# backward compat) ── +@@clientName(VirtualMachineIpTag, "VirtualMachineIPTag", "csharp"); +@@clientName(VirtualMachineScaleSetIpTag, "VirtualMachineScaleSetIPTag", "csharp"); + +// ── Other renames (C# backward compat) ── +@@clientName(AlternativeType, "ImageAlternativeType", "csharp"); +@@clientName(RestorePointExpandOptions, "RestorePointExpand", "csharp"); +@@clientName(RestorePointCollectionExpandOptions, "RestorePointGroupExpand", "csharp"); +@@clientName(RestorePointSourceVMDataDisk, "RestorePointSourceVmDataDisk", "csharp"); +@@clientName(RestorePointSourceVMOSDisk, "RestorePointSourceVmOSDisk", "csharp"); +@@clientName(RestorePointSourceVMStorageProfile, "RestorePointSourceVmStorageProfile", "csharp"); +@@clientName(RebalanceBehavior, "VmssRebalanceBehavior", "csharp"); +@@clientName(RebalanceStrategy, "VmssRebalanceStrategy", "csharp"); +@@clientName(VmDiskTypes, "VirtualMachineDiskType", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 580732cbe4b1..ac91f6e86ebb 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -51,3 +51,11 @@ using ComputeDisk; // Type rename for backward compatibility @@clientName(PrivateLinkResource, "ComputePrivateLinkResourceData", "csharp"); + +// ── Plural→singular enum renames (C# backward compat) ── +@@clientName(DiskSecurityTypes, "DiskSecurityType", "csharp"); +@@clientName(DiskStorageAccountTypes, "DiskStorageAccountType", "csharp"); +@@clientName(SnapshotStorageAccountTypes, "SnapshotStorageAccountType", "csharp"); + +// ── RP-prefix renames (C# backward compat) ── +@@clientName(EncryptionType, "ComputeEncryptionType", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index d03d972389e3..ea14d2a09cdc 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -136,3 +136,18 @@ using ComputeGallery; @@clientName(CommunityGallery, "CommunityGalleryData", "csharp"); @@clientName(CommunityGalleryImage, "CommunityGalleryImageData", "csharp"); @@clientName(CommunityGalleryImageVersion, "CommunityGalleryImageVersionData", "csharp"); + +// ── Plural→singular enum renames (C# backward compat) ── +@@clientName(ReplicationStatusTypes, "ReplicationStatusType", "csharp"); +@@clientName(SelectPermissions, "SelectPermission", "csharp"); +@@clientName(SharingProfileGroupTypes, "SharingProfileGroupType", "csharp"); +@@clientName(SharingUpdateOperationTypes, "SharingUpdateOperationType", "csharp"); +@@clientName(SoftDeletedArtifactTypes, "GallerySoftDeletedArtifactType", "csharp"); + +// ── VM→Vm casing renames (C# backward compat) ── +@@clientName(ConfidentialVMEncryptionType, "ConfidentialVmEncryptionType", "csharp"); + +// ── Other renames (C# backward compat) ── +@@clientName(GalleryExpandParams, "GalleryExpand", "csharp"); +@@clientName(PolicyViolationCategory, "GalleryImageVersionPolicyViolationCategory", "csharp"); +@@clientName(ReplicationState, "RegionalReplicationState", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index f1b7104249dd..360a396dade0 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -80,3 +80,6 @@ namespace ComputeCombine; @@clientName(ComputeSku.ResourceSkuRestrictionsReasonCode, "ComputeResourceSkuRestrictionsReasonCode", "csharp"); @@clientName(ComputeSku.ResourceSkuRestrictionsType, "ComputeResourceSkuRestrictionsType", "csharp"); @@clientName(ComputeSku.ResourceSkuZoneDetails, "ComputeResourceSkuZoneDetails", "csharp"); + +// ── Plural→singular enum renames (C# backward compat) ── +@@clientName(Common.OperatingSystemTypes, "OperatingSystemType", "csharp"); From 2aa1355fcd81c70d634c286a5e08edc8c119b755 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 10 Apr 2026 16:37:58 +0800 Subject: [PATCH 016/103] Disable flattenProperty for VMSS in C#, make AllInstancesDown/UserInitiatedRedeploy public MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add '!csharp' scope to flattenProperty on VirtualMachineScaleSet.properties, VirtualMachineScaleSetVM.properties, VirtualMachineScaleSetUpdate.properties (C# SDK had flatten disabled in autorest.md) - Add @@access(AllInstancesDown/UserInitiatedRedeploy, public, csharp) — were internal due to single-property auto-flattening Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/back-compatible.tsp | 9 ++++++--- .../Microsoft.Compute/Compute/Compute/client.tsp | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/back-compatible.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/back-compatible.tsp index dbba90715076..1269b679a5bd 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/back-compatible.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/back-compatible.tsp @@ -21,7 +21,8 @@ using Common; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "@flattenProperty decorator is not recommended to use." #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" -@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachineScaleSetUpdate.properties +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachineScaleSetUpdate.properties, + "!csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "@flattenProperty decorator is not recommended to use." @@ -169,7 +170,8 @@ using Common; @@clientName(VirtualMachineScaleSets.start::parameters.body, "vmInstanceIDs"); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "@flattenProperty decorator is not recommended to use." #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" -@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachineScaleSet.properties +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachineScaleSet.properties, + "!csharp" ); @@clientName(VirtualMachineScaleSetExtensions.update::parameters.properties, @@ -196,7 +198,8 @@ using Common; ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "@flattenProperty decorator is not recommended to use." #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" -@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachineScaleSetVM.properties +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachineScaleSetVM.properties, + "!csharp" ); @@clientName(VirtualMachineExtensions.update::parameters.properties, diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index d506e4334cd5..41588a650a70 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -551,6 +551,10 @@ using Compute; @@clientName(VMScaleSetScaleOutInput, "VirtualMachineScaleSetScaleOutContent", "csharp"); @@clientName(SshGenerateKeyPairInputParameters, "SshGenerateKeyPairInputContent", "csharp"); +// Make internal types public for C# backward compat +@@access(AllInstancesDown, Access.public, "csharp"); +@@access(UserInitiatedRedeploy, Access.public, "csharp"); + // ── Plural→singular enum renames (C# backward compat) ── @@clientName(CapacityReservationGroupInstanceViewTypes, "CapacityReservationGroupInstanceViewType", "csharp"); @@clientName(CapacityReservationInstanceViewTypes, "CapacityReservationInstanceViewType", "csharp"); From 7bf6ce0cc0caa7d20912b26e21a1a3c01c4edbde Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 10 Apr 2026 17:08:35 +0800 Subject: [PATCH 017/103] Revert @@access for safe-flattened types, pending generator fix (#58066) AllInstancesDown and UserInitiatedRedeploy need a generator option to disable safe-flatten. Reverted @@access decorators as they don't solve the root cause. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 41588a650a70..abbd7f501b28 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -551,9 +551,10 @@ using Compute; @@clientName(VMScaleSetScaleOutInput, "VirtualMachineScaleSetScaleOutContent", "csharp"); @@clientName(SshGenerateKeyPairInputParameters, "SshGenerateKeyPairInputContent", "csharp"); -// Make internal types public for C# backward compat -@@access(AllInstancesDown, Access.public, "csharp"); -@@access(UserInitiatedRedeploy, Access.public, "csharp"); +// NOTE: AllInstancesDown and UserInitiatedRedeploy are safe-flattened by the generator. +// They need a generator option to disable safe-flatten per-type. See issue filed below. +// TODO: @@access(AllInstancesDown, Access.public, "csharp"); +// TODO: @@access(UserInitiatedRedeploy, Access.public, "csharp"); // ── Plural→singular enum renames (C# backward compat) ── @@clientName(CapacityReservationGroupInstanceViewTypes, "CapacityReservationGroupInstanceViewType", "csharp"); From 00e62c5cc8ee6407bebca4660cb2837167c154c5 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 10 Apr 2026 17:49:20 +0800 Subject: [PATCH 018/103] Add 4 more type renames: PatchProperties, expand types, HostEndpointSettingsMode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index abbd7f501b28..10d48e45499c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -550,6 +550,10 @@ using Compute; @@clientName(VMScaleSetConvertToSinglePlacementGroupInput, "VirtualMachineScaleSetConvertToSinglePlacementGroupContent", "csharp"); @@clientName(VMScaleSetScaleOutInput, "VirtualMachineScaleSetScaleOutContent", "csharp"); @@clientName(SshGenerateKeyPairInputParameters, "SshGenerateKeyPairInputContent", "csharp"); +@@clientName(VirtualMachineScaleSetUpdateProperties, "VirtualMachineScaleSetPatchProperties", "csharp"); +@@clientName(ExpandTypeForListVMs, "GetVirtualMachineExpandType", "csharp"); +@@clientName(ExpandTypesForGetVMScaleSets, "VirtualMachineScaleSetGetExpand", "csharp"); +@@clientName(Modes, "HostEndpointSettingsMode", "csharp"); // NOTE: AllInstancesDown and UserInitiatedRedeploy are safe-flattened by the generator. // They need a generator option to disable safe-flatten per-type. See issue filed below. From e16134b48145ccbddcd93cea6b0030b651d8911d Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 14 Apr 2026 17:18:48 +0800 Subject: [PATCH 019/103] Add 28 @@alternateType decorators for ResourceIdentifier properties Map string properties to armResourceIdentifier for C# backward compat. Covers 79 of 92 ResourceIdentifier property changes including SubResource.id, ApiEntityReference.id, SourceVault.id, and individual resource ID properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 30 +++++++ .../Compute/ComputeDisk/client.tsp | 78 +++++++++++++++++++ .../Compute/ComputeGallery/client.tsp | 22 ++++++ .../Microsoft.Compute/Compute/client.tsp | 6 ++ 4 files changed, 136 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 10d48e45499c..33d161abbcd6 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -608,3 +608,33 @@ using Compute; @@clientName(RebalanceBehavior, "VmssRebalanceBehavior", "csharp"); @@clientName(RebalanceStrategy, "VmssRebalanceStrategy", "csharp"); @@clientName(VmDiskTypes, "VirtualMachineDiskType", "csharp"); + +// ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── + +// Wrapper model id properties → ResourceIdentifier +@@alternateType(ApiEntityReference.id, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(ServiceArtifactReference.id, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(SecurityPostureReference.id, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(SshPublicKeyGenerateKeyPairResult.id, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(RestorePointCollectionSourceProperties.id, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// Direct string properties → ResourceIdentifier +@@alternateType(VirtualMachineScaleSetVMInstanceView.assignedHost, + Azure.Core.armResourceIdentifier, + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index ac91f6e86ebb..524aafd005ec 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -59,3 +59,81 @@ using ComputeDisk; // ── RP-prefix renames (C# backward compat) ── @@clientName(EncryptionType, "ComputeEncryptionType", "csharp"); + +// ── alternateType overrides: string → armResourceIdentifier (C# backward compat) ── + +// Wrapper model id properties → ResourceIdentifier +@@alternateType(SourceVault.id, Azure.Core.armResourceIdentifier, "csharp"); +@@alternateType(PrivateEndpoint.id, Azure.Core.armResourceIdentifier, "csharp"); +@@alternateType(ImageDiskReference.id, Azure.Core.armResourceIdentifier, "csharp"); + +// Disk +@@alternateType(Disk.managedBy, Azure.Core.armResourceIdentifier, "csharp"); +@@alternateType(Disk.managedByExtended, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(DiskProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// DiskUpdate +@@alternateType(DiskUpdateProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// DiskRestorePoint +@@alternateType(DiskRestorePointProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(DiskRestorePointProperties.sourceResourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// Snapshot +@@alternateType(SnapshotProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// SnapshotUpdate +@@alternateType(SnapshotUpdateProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// CreationData +@@alternateType(CreationData.sourceResourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(CreationData.storageAccountId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(CreationData.elasticSanResourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// Encryption +@@alternateType(Encryption.diskEncryptionSetId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// DiskSecurityProfile +@@alternateType(DiskSecurityProfile.secureVMDiskEncryptionSetId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// PrivateLinkResource +@@alternateType(PrivateLinkResourceProperties.groupId, + Azure.Core.armResourceIdentifier, + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index ea14d2a09cdc..2007ff200e41 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -151,3 +151,25 @@ using ComputeGallery; @@clientName(GalleryExpandParams, "GalleryExpand", "csharp"); @@clientName(PolicyViolationCategory, "GalleryImageVersionPolicyViolationCategory", "csharp"); @@clientName(ReplicationState, "RegionalReplicationState", "csharp"); + +// ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── + +// Wrapper model id properties → ResourceIdentifier +@@alternateType(GalleryArtifactVersionSource.id, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// Direct string properties → ResourceIdentifier +@@alternateType(GalleryArtifactVersionFullSource.virtualMachineId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(GalleryDiskImageSource.storageAccountId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(DiskImageEncryption.diskEncryptionSetId, + Azure.Core.armResourceIdentifier, + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 360a396dade0..2bc1ec3c869a 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -81,5 +81,11 @@ namespace ComputeCombine; @@clientName(ComputeSku.ResourceSkuRestrictionsType, "ComputeResourceSkuRestrictionsType", "csharp"); @@clientName(ComputeSku.ResourceSkuZoneDetails, "ComputeResourceSkuZoneDetails", "csharp"); +// ── alternateType: SubResource.id → ResourceIdentifier for C# (migration from AutoRest) ── +@@alternateType(Common.SubResource.id, + Azure.Core.armResourceIdentifier, + "csharp" +); + // ── Plural→singular enum renames (C# backward compat) ── @@clientName(Common.OperatingSystemTypes, "OperatingSystemType", "csharp"); From 2dbfdfd4bde3f62b898ada986ec19fc23e6a0b0b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 15 Apr 2026 11:43:29 +0800 Subject: [PATCH 020/103] Add alternateType for SubResource[], Identity, ExtendedLocation properties - SubResource[]/WritableSubResource[] for list properties (23 decorators) - ManagedServiceIdentity for Identity properties (8 decorators) - ExtendedLocation for resource model properties (6 decorators) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 112 ++++++++++++++++++ .../Compute/ComputeDisk/client.tsp | 10 ++ .../Compute/ComputeGallery/client.tsp | 10 ++ .../Microsoft.Compute/Compute/client.tsp | 26 ++++ 4 files changed, 158 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 33d161abbcd6..ea76aa9092a1 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -638,3 +638,115 @@ using Compute; Azure.Core.armResourceIdentifier, "csharp" ); + +// ── alternateType: Identity types → ManagedServiceIdentity for C# ── +@@alternateType(VirtualMachineScaleSet.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdate.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(VirtualMachine.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(VirtualMachineUpdate.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); + +// ── alternateType: SubResource[] for C# backward compat ── +@@alternateType(AvailabilitySetProperties.virtualMachines, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(AvailabilitySetUpdateProperties.virtualMachines, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetNetworkConfiguration.networkSecurityGroup, + Azure.ResourceManager.Models.SubResource, + "csharp" +); +@@alternateType(VirtualMachineScaleSetIPConfiguration.applicationGatewayBackendAddressPools, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetIPConfiguration.applicationSecurityGroups, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetIPConfiguration.loadBalancerBackendAddressPools, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetIPConfiguration.loadBalancerInboundNatPools, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdateNetworkConfiguration.networkSecurityGroup, + Azure.ResourceManager.Models.SubResource, + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdateIPConfiguration.applicationGatewayBackendAddressPools, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdateIPConfiguration.applicationSecurityGroups, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdateIPConfiguration.loadBalancerBackendAddressPools, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdateIPConfiguration.loadBalancerInboundNatPools, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineNetworkInterfaceConfiguration.networkSecurityGroup, + Azure.ResourceManager.Models.SubResource, + "csharp" +); +@@alternateType(VirtualMachineNetworkInterfaceIPConfiguration.applicationSecurityGroups, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineNetworkInterfaceIPConfiguration.applicationGatewayBackendAddressPools, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(VirtualMachineNetworkInterfaceIPConfiguration.loadBalancerBackendAddressPools, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(DedicatedHostGroupProperties.hosts, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(DedicatedHostProperties.virtualMachines, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(CapacityReservationGroupProperties.capacityReservations, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(CapacityReservationGroupProperties.virtualMachinesAssociated, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(CapacityReservationProperties.virtualMachinesAssociated, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(CapacityReservationUtilization.virtualMachinesAllocated, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(RestorePointProperties.excludeDisks, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 524aafd005ec..5659ca77ebc5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -137,3 +137,13 @@ using ComputeDisk; Azure.Core.armResourceIdentifier, "csharp" ); + +// ── alternateType: Identity → ManagedServiceIdentity for C# ── +@@alternateType(DiskEncryptionSet.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(DiskEncryptionSetUpdate.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 2007ff200e41..76e5cb7f1f85 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -173,3 +173,13 @@ using ComputeGallery; Azure.Core.armResourceIdentifier, "csharp" ); + +// ── alternateType: Identity → ManagedServiceIdentity for C# ── +@@alternateType(Gallery.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(GalleryUpdate.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 2bc1ec3c869a..00c278271f15 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -69,6 +69,32 @@ namespace ComputeCombine; @@clientName(Common.SubResource, "ComputeSubResourceData", "csharp"); @@clientName(Common.SubResourceReadOnly, "ComputeWriteableSubResourceData", "csharp"); +// ExtendedLocation → Azure.ResourceManager.Resources.Models.ExtendedLocation for C# +@@alternateType(Compute.VirtualMachine.extendedLocation, + Azure.ResourceManager.Resources.Models.ExtendedLocation, + "csharp" +); +@@alternateType(Compute.VirtualMachineScaleSet.extendedLocation, + Azure.ResourceManager.Resources.Models.ExtendedLocation, + "csharp" +); +@@alternateType(Compute.Image.extendedLocation, + Azure.ResourceManager.Resources.Models.ExtendedLocation, + "csharp" +); +@@alternateType(ComputeDisk.Disk.extendedLocation, + Azure.ResourceManager.Resources.Models.ExtendedLocation, + "csharp" +); +@@alternateType(ComputeDisk.DiskAccess.extendedLocation, + Azure.ResourceManager.Resources.Models.ExtendedLocation, + "csharp" +); +@@alternateType(ComputeDisk.Snapshot.extendedLocation, + Azure.ResourceManager.Resources.Models.ExtendedLocation, + "csharp" +); + // ComputeSku namespace types @@clientName(ComputeSku.ResourceSku, "ComputeResourceSku", "csharp"); @@clientName(ComputeSku.ResourceSkuCapabilities, "ComputeResourceSkuCapabilities", "csharp"); From 53aad590d4e23db431fdfecf6f071b92835346df Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 15 Apr 2026 11:55:04 +0800 Subject: [PATCH 021/103] Fix alternateType model names to use Properties sub-models SubResource properties are on *Properties models, not top-level models. Also removed non-existent AvailabilitySetUpdateProperties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 58 +++++++++++++------ .../Compute/ComputeDisk/client.tsp | 14 +++++ 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index ea76aa9092a1..2656f16617d4 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -648,6 +648,10 @@ using Compute; Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); +@@alternateType(VirtualMachineScaleSetVM.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); @@alternateType(VirtualMachine.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" @@ -662,63 +666,59 @@ using Compute; Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); -@@alternateType(AvailabilitySetUpdateProperties.virtualMachines, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetNetworkConfiguration.networkSecurityGroup, +@@alternateType(VirtualMachineScaleSetNetworkConfigurationProperties.networkSecurityGroup, Azure.ResourceManager.Models.SubResource, "csharp" ); -@@alternateType(VirtualMachineScaleSetIPConfiguration.applicationGatewayBackendAddressPools, +@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineScaleSetIPConfiguration.applicationSecurityGroups, +@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineScaleSetIPConfiguration.loadBalancerBackendAddressPools, +@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineScaleSetIPConfiguration.loadBalancerInboundNatPools, +@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineScaleSetUpdateNetworkConfiguration.networkSecurityGroup, +@@alternateType(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.networkSecurityGroup, Azure.ResourceManager.Models.SubResource, "csharp" ); -@@alternateType(VirtualMachineScaleSetUpdateIPConfiguration.applicationGatewayBackendAddressPools, +@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationGatewayBackendAddressPools, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineScaleSetUpdateIPConfiguration.applicationSecurityGroups, +@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationSecurityGroups, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineScaleSetUpdateIPConfiguration.loadBalancerBackendAddressPools, +@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerBackendAddressPools, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineScaleSetUpdateIPConfiguration.loadBalancerInboundNatPools, +@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerInboundNatPools, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineNetworkInterfaceConfiguration.networkSecurityGroup, +@@alternateType(VirtualMachineNetworkInterfaceConfigurationProperties.networkSecurityGroup, Azure.ResourceManager.Models.SubResource, "csharp" ); -@@alternateType(VirtualMachineNetworkInterfaceIPConfiguration.applicationSecurityGroups, +@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineNetworkInterfaceIPConfiguration.applicationGatewayBackendAddressPools, +@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools, Azure.ResourceManager.Models.SubResource[], "csharp" ); -@@alternateType(VirtualMachineNetworkInterfaceIPConfiguration.loadBalancerBackendAddressPools, +@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools, Azure.ResourceManager.Models.SubResource[], "csharp" ); @@ -746,7 +746,29 @@ using Compute; Azure.ResourceManager.Models.SubResource[], "csharp" ); +@@alternateType(ResourceSharingProfile.subscriptionIds, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(CapacityReservationGroupInstanceView.sharedSubscriptionIds, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); @@alternateType(RestorePointProperties.excludeDisks, Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); + +// ── alternateType: ExtendedLocation → ARM common ExtendedLocation for C# ── +@@alternateType(VirtualMachine.extendedLocation, + Azure.ResourceManager.CommonTypes.ExtendedLocation, + "csharp" +); +@@alternateType(VirtualMachineScaleSet.extendedLocation, + Azure.ResourceManager.CommonTypes.ExtendedLocation, + "csharp" +); +@@alternateType(Image.extendedLocation, + Azure.ResourceManager.CommonTypes.ExtendedLocation, + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 5659ca77ebc5..6608acf84927 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -147,3 +147,17 @@ using ComputeDisk; Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); + +// ── alternateType: ExtendedLocation → ARM common ExtendedLocation for C# ── +@@alternateType(DiskAccess.extendedLocation, + Azure.ResourceManager.CommonTypes.ExtendedLocation, + "csharp" +); +@@alternateType(Disk.extendedLocation, + Azure.ResourceManager.CommonTypes.ExtendedLocation, + "csharp" +); +@@alternateType(Snapshot.extendedLocation, + Azure.ResourceManager.CommonTypes.ExtendedLocation, + "csharp" +); From 05ca752ff8248359dedec73f807c4c7d1d324115 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 15 Apr 2026 12:00:12 +0800 Subject: [PATCH 022/103] Remove duplicate ExtendedLocation alternateType decorators from child client.tsp files The parent Compute/client.tsp already has ExtendedLocation decorators using fully-qualified namespace references (Compute.VirtualMachine, ComputeDisk.Disk, etc.) with Azure.ResourceManager.Resources.Models.ExtendedLocation. The child files had duplicate entries using Azure.ResourceManager.CommonTypes.ExtendedLocation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 14 -------------- .../Compute/ComputeDisk/client.tsp | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 2656f16617d4..e4c617106cdf 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -758,17 +758,3 @@ using Compute; Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); - -// ── alternateType: ExtendedLocation → ARM common ExtendedLocation for C# ── -@@alternateType(VirtualMachine.extendedLocation, - Azure.ResourceManager.CommonTypes.ExtendedLocation, - "csharp" -); -@@alternateType(VirtualMachineScaleSet.extendedLocation, - Azure.ResourceManager.CommonTypes.ExtendedLocation, - "csharp" -); -@@alternateType(Image.extendedLocation, - Azure.ResourceManager.CommonTypes.ExtendedLocation, - "csharp" -); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 6608acf84927..5659ca77ebc5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -147,17 +147,3 @@ using ComputeDisk; Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); - -// ── alternateType: ExtendedLocation → ARM common ExtendedLocation for C# ── -@@alternateType(DiskAccess.extendedLocation, - Azure.ResourceManager.CommonTypes.ExtendedLocation, - "csharp" -); -@@alternateType(Disk.extendedLocation, - Azure.ResourceManager.CommonTypes.ExtendedLocation, - "csharp" -); -@@alternateType(Snapshot.extendedLocation, - Azure.ResourceManager.CommonTypes.ExtendedLocation, - "csharp" -); From 15c0034d8f4a6beb3a372ecb9cc6b4d5116ba522 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 15 Apr 2026 12:41:09 +0800 Subject: [PATCH 023/103] Add alternateType stubs for SubResource/WritableSubResource/Identity - Created alternate-type-stubs.tsp with stub models for Azure.ResourceManager.Models - Added SubResource[], WritableSubResource[], ManagedServiceIdentity alternateTypes - ExtendedLocation alternateType blocked by name collision (TODO) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/alternate-type-stubs.tsp | 8 ++++++ .../Microsoft.Compute/Compute/client.tsp | 26 ++----------------- 2 files changed, 10 insertions(+), 24 deletions(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp new file mode 100644 index 000000000000..9af3b303bf19 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp @@ -0,0 +1,8 @@ +// Stub types for @@alternateType decorators. +// These resolve to real C# SDK types at generation time. +// The generator replaces the TypeSpec type with the specified C# type. + +namespace Azure.ResourceManager.Models { + model SubResource {} + model WritableSubResource {} +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 00c278271f15..1b0653a05d73 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -3,6 +3,7 @@ import "./Compute/client.tsp"; import "./ComputeDisk/client.tsp"; import "./ComputeGallery/client.tsp"; import "./ComputeSku/main.tsp"; +import "./alternate-type-stubs.tsp"; using Azure.ClientGenerator.Core; using Common; @@ -70,30 +71,7 @@ namespace ComputeCombine; @@clientName(Common.SubResourceReadOnly, "ComputeWriteableSubResourceData", "csharp"); // ExtendedLocation → Azure.ResourceManager.Resources.Models.ExtendedLocation for C# -@@alternateType(Compute.VirtualMachine.extendedLocation, - Azure.ResourceManager.Resources.Models.ExtendedLocation, - "csharp" -); -@@alternateType(Compute.VirtualMachineScaleSet.extendedLocation, - Azure.ResourceManager.Resources.Models.ExtendedLocation, - "csharp" -); -@@alternateType(Compute.Image.extendedLocation, - Azure.ResourceManager.Resources.Models.ExtendedLocation, - "csharp" -); -@@alternateType(ComputeDisk.Disk.extendedLocation, - Azure.ResourceManager.Resources.Models.ExtendedLocation, - "csharp" -); -@@alternateType(ComputeDisk.DiskAccess.extendedLocation, - Azure.ResourceManager.Resources.Models.ExtendedLocation, - "csharp" -); -@@alternateType(ComputeDisk.Snapshot.extendedLocation, - Azure.ResourceManager.Resources.Models.ExtendedLocation, - "csharp" -); +// TODO: ExtendedLocation alternateType needs a solution — can't define stub due to name collision with Common.ExtendedLocation // ComputeSku namespace types @@clientName(ComputeSku.ResourceSku, "ComputeResourceSku", "csharp"); From a1138fd23ab0bb32436b754ffe7ce48250771516 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 15 Apr 2026 14:23:35 +0800 Subject: [PATCH 024/103] =?UTF-8?q?Add=20OS=E2=86=92OS=20casing=20renames,?= =?UTF-8?q?=20ArchitectureType=20rename,=20Uri=20alternateTypes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 40 @@clientName for os* → OS* property casing (osDisk→OSDisk, etc.) - 1 @@clientName for Architecture → ArchitectureType - 16 @@alternateType for string → url (Uri properties) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 36 +++++++++++++++++++ .../Compute/ComputeDisk/client.tsp | 7 ++++ .../Compute/ComputeGallery/client.tsp | 23 ++++++++++++ .../Microsoft.Compute/Compute/client.tsp | 3 ++ 4 files changed, 69 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index e4c617106cdf..da430da940b6 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -609,6 +609,33 @@ using Compute; @@clientName(RebalanceStrategy, "VmssRebalanceStrategy", "csharp"); @@clientName(VmDiskTypes, "VirtualMachineDiskType", "csharp"); +// ── Os→OS property casing renames (C# backward compat) ── +@@clientName(VirtualMachineSize.osDiskSizeInMB, "OSDiskSizeInMB", "csharp"); +@@clientName(AutomaticOSUpgradePolicy.osRollingUpgradeDeferral, "OSRollingUpgradeDeferral", "csharp"); +@@clientName(VirtualMachineScaleSetVMProfile.osProfile, "OSProfile", "csharp"); +@@clientName(VirtualMachineScaleSetStorageProfile.osDisk, "OSDisk", "csharp"); +@@clientName(VirtualMachineScaleSetOSDisk.osType, "OSType", "csharp"); +@@clientName(ScheduledEventsProfile.osImageNotificationProfile, "OSImageNotificationProfile", "csharp"); +@@clientName(VirtualMachineScaleSetUpdateVMProfile.osProfile, "OSProfile", "csharp"); +@@clientName(VirtualMachineScaleSetUpdateStorageProfile.osDisk, "OSDisk", "csharp"); +@@clientName(VirtualMachineReimageParameters.osProfile, "OSProfile", "csharp"); +@@clientName(VirtualMachineScaleSetVMProperties.osProfile, "OSProfile", "csharp"); +@@clientName(VirtualMachineScaleSetVMInstanceView.osName, "OSName", "csharp"); +@@clientName(VirtualMachineScaleSetVMInstanceView.osVersion, "OSVersion", "csharp"); +@@clientName(StorageProfile.osDisk, "OSDisk", "csharp"); +@@clientName(OSDisk.osType, "OSType", "csharp"); +@@clientName(VirtualMachineProperties.osProfile, "OSProfile", "csharp"); +@@clientName(VirtualMachineInstanceView.osName, "OSName", "csharp"); +@@clientName(VirtualMachineInstanceView.osVersion, "OSVersion", "csharp"); +@@clientName(VirtualMachineImageProperties.osDiskImage, "OSDiskImage", "csharp"); +@@clientName(ImageStorageProfile.osDisk, "OSDisk", "csharp"); +@@clientName(ImageOSDisk.osType, "OSType", "csharp"); +@@clientName(ImageOSDisk.osState, "OSState", "csharp"); +@@clientName(RestorePointSourceMetadata.osProfile, "OSProfile", "csharp"); +@@clientName(RestorePointSourceVMStorageProfile.osDisk, "OSDisk", "csharp"); +@@clientName(RestorePointSourceVMOSDisk.osType, "OSType", "csharp"); +@@clientName(RunCommandDocumentBase.osType, "OSType", "csharp"); + // ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── // Wrapper model id properties → ResourceIdentifier @@ -639,6 +666,15 @@ using Compute; "csharp" ); +// ── alternateType: string → Uri for C# (migration from AutoRest) ── +@@alternateType(BootDiagnosticsInstanceView.consoleScreenshotBlobUri, url, "csharp"); +@@alternateType(BootDiagnosticsInstanceView.serialConsoleLogBlobUri, url, "csharp"); +@@alternateType(RetrieveBootDiagnosticsDataResult.consoleScreenshotBlobUri, url, "csharp"); +@@alternateType(RetrieveBootDiagnosticsDataResult.serialConsoleLogBlobUri, url, "csharp"); +@@alternateType(VirtualMachineRunCommandProperties.outputBlobUri, url, "csharp"); +@@alternateType(VirtualMachineRunCommandProperties.errorBlobUri, url, "csharp"); +@@alternateType(VirtualMachineRunCommandScriptSource.scriptUri, url, "csharp"); + // ── alternateType: Identity types → ManagedServiceIdentity for C# ── @@alternateType(VirtualMachineScaleSet.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 5659ca77ebc5..4245afe4ef6f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -32,6 +32,13 @@ using ComputeDisk; "java" ); +// ── Os→OS property casing renames (C# backward compat) ── +@@clientName(DiskProperties.osType, "OSType", "csharp"); +@@clientName(DiskUpdateProperties.osType, "OSType", "csharp"); +@@clientName(DiskRestorePointProperties.osType, "OSType", "csharp"); +@@clientName(SnapshotProperties.osType, "OSType", "csharp"); +@@clientName(SnapshotUpdateProperties.osType, "OSType", "csharp"); + // C# renames for backward compatibility (migration from AutoRest) @@clientName(CreationData, "DiskCreationData", "csharp"); @@clientName(FileFormat, "DiskImageFileFormat", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 76e5cb7f1f85..c84c342276ab 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -4,6 +4,18 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using ComputeGallery; +// ── Os→OS property casing renames (C# backward compat) ── +@@clientName(GalleryImageProperties.osType, "OSType", "csharp"); +@@clientName(GalleryImageProperties.osState, "OSState", "csharp"); +@@clientName(EncryptionImages.osDiskImage, "OSDiskImage", "csharp"); +@@clientName(GalleryImageVersionStorageProfile.osDiskImage, "OSDiskImage", "csharp"); +@@clientName(GalleryInVMAccessControlProfileProperties.osType, "OSType", "csharp"); +@@clientName(SharedGalleryImageProperties.osType, "OSType", "csharp"); +@@clientName(SharedGalleryImageProperties.osState, "OSState", "csharp"); +@@clientName(SharedGalleryImageVersionStorageProfile.osDiskImage, "OSDiskImage", "csharp"); +@@clientName(CommunityGalleryImageProperties.osType, "OSType", "csharp"); +@@clientName(CommunityGalleryImageProperties.osState, "OSState", "csharp"); + // C# enum singular←plural rename @@clientName(SharedToValues, "SharedToValue", "csharp"); @@ -152,6 +164,17 @@ using ComputeGallery; @@clientName(PolicyViolationCategory, "GalleryImageVersionPolicyViolationCategory", "csharp"); @@clientName(ReplicationState, "RegionalReplicationState", "csharp"); +// ── alternateType: string → Uri for C# (migration from AutoRest) ── +@@alternateType(GalleryImageProperties.privacyStatementUri, url, "csharp"); +@@alternateType(GalleryImageProperties.releaseNoteUri, url, "csharp"); +@@alternateType(GalleryApplicationProperties.privacyStatementUri, url, "csharp"); +@@alternateType(GalleryApplicationProperties.releaseNoteUri, url, "csharp"); +@@alternateType(GalleryScriptProperties.privacyStatementUri, url, "csharp"); +@@alternateType(GalleryScriptProperties.releaseNoteUri, url, "csharp"); +@@alternateType(SharedGalleryImageProperties.privacyStatementUri, url, "csharp"); +@@alternateType(CommunityGalleryMetadata.privacyStatementUri, url, "csharp"); +@@alternateType(CommunityGalleryImageProperties.privacyStatementUri, url, "csharp"); + // ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── // Wrapper model id properties → ResourceIdentifier diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 1b0653a05d73..9fa7c329ce1d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -91,5 +91,8 @@ namespace ComputeCombine; "csharp" ); +// ── Common type renames (C# backward compat) ── +@@clientName(Common.Architecture, "ArchitectureType", "csharp"); + // ── Plural→singular enum renames (C# backward compat) ── @@clientName(Common.OperatingSystemTypes, "OperatingSystemType", "csharp"); From 4dc73d3a3c951090a6ad454e6e7bd89deca6b6cc Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 15 Apr 2026 14:55:35 +0800 Subject: [PATCH 025/103] Remove duplicate ArchitectureType rename (auto-handled by generator) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 9fa7c329ce1d..517371bb396e 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -91,8 +91,7 @@ namespace ComputeCombine; "csharp" ); -// ── Common type renames (C# backward compat) ── -@@clientName(Common.Architecture, "ArchitectureType", "csharp"); +// NOTE: Common.Architecture → ArchitectureType is handled by auto-rename of Compute.ArchitectureTypes → ArchitectureType // ── Plural→singular enum renames (C# backward compat) ── @@clientName(Common.OperatingSystemTypes, "OperatingSystemType", "csharp"); From 371d7c8540409bfb88f5e74ec17488e51c17c97c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 15 Apr 2026 16:23:33 +0800 Subject: [PATCH 026/103] Add extensible enum wrappers for ComponentName, PassName, OperatingSystemType Replace closed unions/enums with extensible wrappers using @@alternateType on the type itself, so all properties using them automatically get the extensible version (readonly struct in C#). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 27 +++++++++++++++++-- .../Microsoft.Compute/Compute/client.tsp | 3 --- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index da430da940b6..e1ac093cc0c6 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -563,12 +563,10 @@ using Compute; // ── Plural→singular enum renames (C# backward compat) ── @@clientName(CapacityReservationGroupInstanceViewTypes, "CapacityReservationGroupInstanceViewType", "csharp"); @@clientName(CapacityReservationInstanceViewTypes, "CapacityReservationInstanceViewType", "csharp"); -@@clientName(ComponentNames, "ComponentName", "csharp"); @@clientName(DiffDiskOptions, "DiffDiskOption", "csharp"); @@clientName(DiskControllerTypes, "DiskControllerType", "csharp"); @@clientName(DomainNameLabelScopeTypes, "DomainNameLabelScopeType", "csharp"); @@clientName(ExpandTypesForListVMs, "ExpandTypesForListVm", "csharp"); -@@clientName(PassNames, "PassName", "csharp"); @@clientName(ResourceIdOptionsForGetCapacityReservationGroups, "ResourceIdOptionsForGetCapacityReservationGroup", "csharp"); @@clientName(ScriptShellTypes, "ScriptShellType", "csharp"); @@clientName(SecurityEncryptionTypes, "SecurityEncryptionType", "csharp"); @@ -794,3 +792,28 @@ using Compute; Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); + +// ── Extensible enum wrappers for closed unions/enums (C# backward compat) ── +// The old SDK had these as extensible enums (readonly struct). The TypeSpec spec defines them +// as closed unions/enums, which generate as fixed enums in C#. We define extensible wrappers +// and use @@alternateType on the type to replace all usages automatically. + +/** + * The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. + */ +union ComponentName { + ComponentNames, + string, +} + +/** + * The pass name. Currently, the only allowable value is OobeSystem. + */ +union PassName { + PassNames, + string, +} + +@@alternateType(ComponentNames, ComponentName, "csharp"); +@@alternateType(PassNames, PassName, "csharp"); +// TODO: OperatingSystemTypes → extensible enum blocked by name collision with Compute.OperatingSystemType diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 517371bb396e..a8a0fab5a66a 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -92,6 +92,3 @@ namespace ComputeCombine; ); // NOTE: Common.Architecture → ArchitectureType is handled by auto-rename of Compute.ArchitectureTypes → ArchitectureType - -// ── Plural→singular enum renames (C# backward compat) ── -@@clientName(Common.OperatingSystemTypes, "OperatingSystemType", "csharp"); From ce15e790ebd329a710ba1fbe9b3804c23c381c3c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 16 Apr 2026 12:14:14 +0800 Subject: [PATCH 027/103] Fix WritableSubResource[] alternateType, add 17 Uri alternateType decorators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix 11 IP config properties: SubResource[] → WritableSubResource[] - Add 17 new url alternateType for Uri properties (KeyVault, VHD, etc.) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 30 ++++++++++++------- .../Compute/ComputeDisk/client.tsp | 8 +++++ .../Compute/ComputeGallery/client.tsp | 2 ++ 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index e1ac093cc0c6..49b59812e583 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -665,13 +665,21 @@ using Compute; ); // ── alternateType: string → Uri for C# (migration from AutoRest) ── +@@alternateType(BootDiagnostics.storageUri, url, "csharp"); @@alternateType(BootDiagnosticsInstanceView.consoleScreenshotBlobUri, url, "csharp"); @@alternateType(BootDiagnosticsInstanceView.serialConsoleLogBlobUri, url, "csharp"); +@@alternateType(ImageDisk.blobUri, url, "csharp"); +@@alternateType(KeyVaultKeyReference.keyUrl, url, "csharp"); +@@alternateType(KeyVaultSecretReference.secretUrl, url, "csharp"); +@@alternateType(LogAnalyticsInputBase.blobContainerSasUri, url, "csharp"); @@alternateType(RetrieveBootDiagnosticsDataResult.consoleScreenshotBlobUri, url, "csharp"); @@alternateType(RetrieveBootDiagnosticsDataResult.serialConsoleLogBlobUri, url, "csharp"); +@@alternateType(VaultCertificate.certificateUrl, url, "csharp"); +@@alternateType(VirtualHardDisk.uri, url, "csharp"); @@alternateType(VirtualMachineRunCommandProperties.outputBlobUri, url, "csharp"); @@alternateType(VirtualMachineRunCommandProperties.errorBlobUri, url, "csharp"); @@alternateType(VirtualMachineRunCommandScriptSource.scriptUri, url, "csharp"); +@@alternateType(WinRMListener.certificateUrl, url, "csharp"); // ── alternateType: Identity types → ManagedServiceIdentity for C# ── @@alternateType(VirtualMachineScaleSet.identity, @@ -705,19 +713,19 @@ using Compute; "csharp" ); @@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.networkSecurityGroup, @@ -725,19 +733,19 @@ using Compute; "csharp" ); @@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationGatewayBackendAddressPools, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationSecurityGroups, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerBackendAddressPools, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerInboundNatPools, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineNetworkInterfaceConfigurationProperties.networkSecurityGroup, @@ -745,15 +753,15 @@ using Compute; "csharp" ); @@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools, - Azure.ResourceManager.Models.SubResource[], + Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); @@alternateType(DedicatedHostGroupProperties.hosts, diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 4245afe4ef6f..03f445a502ef 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -154,3 +154,11 @@ using ComputeDisk; Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); + +// ── alternateType: string → Uri for C# (migration from AutoRest) ── +@@alternateType(CreationData.sourceUri, url, "csharp"); +@@alternateType(CreationData.securityDataUri, url, "csharp"); +@@alternateType(KeyForDiskEncryptionSet.keyUrl, url, "csharp"); +@@alternateType(KeyVaultAndKeyReference.keyUrl, url, "csharp"); +@@alternateType(KeyVaultAndSecretReference.secretUrl, url, "csharp"); +@@alternateType(ShareInfoElement.vmUri, url, "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index c84c342276ab..bbc379fee140 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -172,8 +172,10 @@ using ComputeGallery; @@alternateType(GalleryScriptProperties.privacyStatementUri, url, "csharp"); @@alternateType(GalleryScriptProperties.releaseNoteUri, url, "csharp"); @@alternateType(SharedGalleryImageProperties.privacyStatementUri, url, "csharp"); +@@alternateType(CommunityGalleryInfo.publisherUri, url, "csharp"); @@alternateType(CommunityGalleryMetadata.privacyStatementUri, url, "csharp"); @@alternateType(CommunityGalleryImageProperties.privacyStatementUri, url, "csharp"); +@@alternateType(GalleryDiskImageSource.uri, url, "csharp"); // ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── From c74ff83ee9d3631586d5456c66c1883aa49c6dba Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 16 Apr 2026 15:18:06 +0800 Subject: [PATCH 028/103] Add 110 property @@clientName renames for C# backward compat Acronym casing (VM, SAS, IOPS, IP, SSD, CPUs), Is* prefix restoration, qualified type names, and other specific renames. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 55 +++++++++++++++++++ .../Compute/ComputeDisk/client.tsp | 26 +++++++++ .../Compute/ComputeGallery/client.tsp | 24 ++++++++ .../Microsoft.Compute/Compute/client.tsp | 5 ++ 4 files changed, 110 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 49b59812e583..ac2106f94874 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -634,6 +634,61 @@ using Compute; @@clientName(RestorePointSourceVMOSDisk.osType, "OSType", "csharp"); @@clientName(RunCommandDocumentBase.osType, "OSType", "csharp"); +// ── Property casing renames: acronym case normalization (C# backward compat) ── +@@clientName(AdditionalCapabilities.ultraSSDEnabled, "UltraSsdEnabled", "csharp"); +@@clientName(DedicatedHostGroupPropertiesAdditionalCapabilities.ultraSSDEnabled, "UltraSsdEnabled", "csharp"); +@@clientName(DedicatedHostGroupProperties.hosts, "DedicatedHosts", "csharp"); +@@clientName(HostEndpointSettings.inVMAccessControlProfileReferenceId, "InVmAccessControlProfileReferenceId", "csharp"); +@@clientName(LinuxConfiguration.enableVMAgentPlatformUpdates, "EnableVmAgentPlatformUpdates", "csharp"); +@@clientName(LinuxConfiguration.provisionVMAgent, "ProvisionVmAgent", "csharp"); +@@clientName(WindowsConfiguration.provisionVMAgent, "ProvisionVmAgent", "csharp"); +@@clientName(ScaleInPolicy.prioritizeUnhealthyVMs, "PrioritizeUnhealthyVms", "csharp"); +@@clientName(DataDisk.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); +@@clientName(VirtualMachineInstanceView.isVMInStandbyPool, "IsVmInStandbyPool", "csharp"); +@@clientName(VirtualMachineScaleSetDataDisk.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); +@@clientName(VirtualMachineScaleSetUpdateProperties.doNotRunExtensionsOnOverprovisionedVMs, "DoNotRunExtensionsOnOverprovisionedVms", "csharp"); +@@clientName(VirtualMachineScaleSetProperties.doNotRunExtensionsOnOverprovisionedVMs, "DoNotRunExtensionsOnOverprovisionedVms", "csharp"); +@@clientName(VirtualMachineScaleSetVMProperties.resilientVMDeletionStatus, "ResilientVmDeletionStatus", "csharp"); +@@clientName(VMSizeProperties.vCPUsAvailable, "VCpusAvailable", "csharp"); +@@clientName(VMSizeProperties.vCPUsPerCore, "VCpusPerCore", "csharp"); +@@clientName(StorageProfile.alignRegionalDisksToVMZone, "AlignRegionalDisksToVmZone", "csharp"); +@@clientName(MigrateVMToVirtualMachineScaleSetInput.targetVMSize, "TargetVmSize", "csharp"); +@@clientName(VirtualMachineExtensionImageProperties.vmScaleSetEnabled, "VirtualMachineScaleSetEnabled", "csharp"); + +// ── IP→Ip property casing renames (C# backward compat) ── +@@clientName(VirtualMachineIpTag.ipTagType, "IPTagType", "csharp"); +@@clientName(VirtualMachineScaleSetIpTag.ipTagType, "IPTagType", "csharp"); +@@clientName(VirtualMachineNetworkInterfaceConfigurationProperties.ipConfigurations, "IPConfigurations", "csharp"); +@@clientName(VirtualMachinePublicIPAddressConfigurationProperties.ipTags, "IPTags", "csharp"); +@@clientName(VirtualMachineScaleSetNetworkConfigurationProperties.ipConfigurations, "IPConfigurations", "csharp"); +@@clientName(VirtualMachineScaleSetPublicIPAddressConfigurationProperties.ipTags, "IPTags", "csharp"); +@@clientName(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.ipConfigurations, "IPConfigurations", "csharp"); + +// ── Is* prefix / verb prefix property renames (C# backward compat) ── +@@clientName(EventGridAndResourceGraph.enable, "IsEnabled", "csharp"); +@@clientName(RollingUpgradePolicy.maxSurge, "IsMaxSurgeEnabled", "csharp"); +@@clientName(UefiSettings.secureBootEnabled, "IsSecureBootEnabled", "csharp"); +@@clientName(UefiSettings.vTpmEnabled, "IsVirtualTpmEnabled", "csharp"); +@@clientName(VirtualMachineScaleSetProperties.constrainedMaximumCapacity, "IsMaximumCapacityConstrained", "csharp"); +@@clientName(WindowsConfiguration.enableVMAgentPlatformUpdates, "IsVmAgentPlatformUpdatesEnabled", "csharp"); +@@clientName(VirtualMachineNetworkInterfaceConfigurationProperties.disableTcpStateTracking, "IsTcpStateTrackingDisabled", "csharp"); +@@clientName(VirtualMachineScaleSetNetworkConfigurationProperties.disableTcpStateTracking, "IsTcpStateTrackingDisabled", "csharp"); +@@clientName(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.disableTcpStateTracking, "IsTcpStateTrackingDisabled", "csharp"); + +// ── Qualified property name renames (C# backward compat) ── +@@clientName(AlternativeOption.type, "AlternativeType", "csharp"); +@@clientName(RestorePointEncryption.type, "EncryptionType", "csharp"); +@@clientName(RunCommandParameterDefinition.type, "RunCommandParameterDefinitionType", "csharp"); +@@clientName(UpgradeOperationHistoricalStatusInfo.type, "UpgradeOperationHistoricalStatusInfoType", "csharp"); +@@clientName(VirtualMachineExtensionHandlerInstanceView.type, "VirtualMachineExtensionHandlerInstanceViewType", "csharp"); +@@clientName(VirtualMachineExtensionInstanceView.type, "VirtualMachineExtensionInstanceViewType", "csharp"); + +// ── Other property renames (C# backward compat) ── +@@clientName(ImageReference.sharedGalleryImageId, "SharedGalleryImageUniqueId", "csharp"); +@@clientName(OrchestrationServiceSummary.lastStatusChangeTime, "LastStatusChangedOn", "csharp"); +@@clientName(RestorePointCollectionProperties.restorePointCollectionId, "RestorePointGroupId", "csharp"); +@@clientName(VMScaleSetScaleOutInputProperties.zone, "VmScaleSetScaleOutInputZone", "csharp"); + // ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── // Wrapper model id properties → ResourceIdentifier diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 03f445a502ef..9103aefd466d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -67,6 +67,32 @@ using ComputeDisk; // ── RP-prefix renames (C# backward compat) ── @@clientName(EncryptionType, "ComputeEncryptionType", "csharp"); +// ── Property casing renames: acronym case normalization (C# backward compat) ── +@@clientName(AccessUri.accessSAS, "AccessSas", "csharp"); +@@clientName(AccessUri.securityDataAccessSAS, "SecurityDataAccessSas", "csharp"); +@@clientName(AccessUri.securityMetadataAccessSAS, "SecurityMetadataAccessSas", "csharp"); +@@clientName(DiskSecurityProfile.secureVMDiskEncryptionSetId, "SecureVmDiskEncryptionSetId", "csharp"); +@@clientName(GrantAccessData.getSecureVMGuestStateSAS, "GetSecureVmGuestStateSas", "csharp"); +@@clientName(DiskProperties.diskIOPSReadOnly, "DiskIopsReadOnly", "csharp"); +@@clientName(DiskProperties.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); +@@clientName(DiskUpdateProperties.diskIOPSReadOnly, "DiskIopsReadOnly", "csharp"); +@@clientName(DiskUpdateProperties.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); + +// ── Is* prefix property renames (C# backward compat) ── +@@clientName(CreationData.performancePlus, "IsPerformancePlusEnabled", "csharp"); +@@clientName(DiskProperties.optimizedForFrequentAttach, "IsOptimizedForFrequentAttach", "csharp"); +@@clientName(DiskUpdateProperties.optimizedForFrequentAttach, "IsOptimizedForFrequentAttach", "csharp"); + +// ── Qualified property name renames (C# backward compat) ── +@@clientName(Encryption.type, "EncryptionType", "csharp"); + +// ── Other property renames (C# backward compat) ── +@@clientName(DiskProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(DiskUpdateProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(SnapshotProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(SnapshotUpdateProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(PrivateEndpointConnectionProperties.privateLinkServiceConnectionState, "ConnectionState", "csharp"); + // ── alternateType overrides: string → armResourceIdentifier (C# backward compat) ── // Wrapper model id properties → ResourceIdentifier diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index bbc379fee140..2fdb588fa24c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -164,6 +164,30 @@ using ComputeGallery; @@clientName(PolicyViolationCategory, "GalleryImageVersionPolicyViolationCategory", "csharp"); @@clientName(ReplicationState, "RegionalReplicationState", "csharp"); +// ── Property casing renames: acronym case normalization (C# backward compat) ── +@@clientName(OSDiskImageSecurityProfile.confidentialVMEncryptionType, "ConfidentialVmEncryptionType", "csharp"); +@@clientName(OSDiskImageSecurityProfile.secureVMDiskEncryptionSetId, "SecureVmDiskEncryptionSetId", "csharp"); +@@clientName(RecommendedMachineConfiguration.vCPUs, "VCpus", "csharp"); + +// ── Is* prefix property renames (C# backward compat) ── +@@clientName(GalleryApplicationCustomActionParameter.required, "IsRequired", "csharp"); +@@clientName(GalleryImageVersionSafetyProfile.blockDeletionBeforeEndOfLife, "IsBlockedDeletionBeforeEndOfLife", "csharp"); +@@clientName(GalleryImageVersionSafetyProfile.reportedForPolicyViolation, "IsReportedForPolicyViolation", "csharp"); +@@clientName(TargetRegion.excludeFromLatest, "IsExcludedFromLatest", "csharp"); +@@clientName(GalleryImageVersionProperties.restore, "IsRestoreEnabled", "csharp"); + +// ── Qualified property name renames (C# backward compat) ── +@@clientName(GalleryApplicationCustomActionParameter.type, "ParameterType", "csharp"); +@@clientName(GalleryExtendedLocation.type, "ExtendedLocationType", "csharp"); +@@clientName(ExecutedValidation.type, "ExecutedValidationType", "csharp"); +@@clientName(GalleryScriptParameter.type, "ParameterType", "csharp"); +@@clientName(SharingProfileGroup.type, "GroupType", "csharp"); +@@clientName(UefiKey.type, "KeyType", "csharp"); + +// ── Other property renames (C# backward compat) ── +@@clientName(ValidationsProfile.validationEtag, "ValidationETag", "csharp"); +@@clientName(SharingProfile.permissions, "Permission", "csharp"); + // ── alternateType: string → Uri for C# (migration from AutoRest) ── @@alternateType(GalleryImageProperties.privacyStatementUri, url, "csharp"); @@alternateType(GalleryImageProperties.releaseNoteUri, url, "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index a8a0fab5a66a..17ac827461ca 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -85,6 +85,11 @@ namespace ComputeCombine; @@clientName(ComputeSku.ResourceSkuRestrictionsType, "ComputeResourceSkuRestrictionsType", "csharp"); @@clientName(ComputeSku.ResourceSkuZoneDetails, "ComputeResourceSkuZoneDetails", "csharp"); +// ComputeSku property renames (C# backward compat) +@@clientName(ComputeSku.ResourceSkuCosts.meterID, "MeterId", "csharp"); +@@clientName(ComputeSku.ResourceSkuRestrictions.type, "RestrictionsType", "csharp"); +@@clientName(ComputeSku.ResourceSkuLocationInfo.type, "ExtendedLocationType", "csharp"); + // ── alternateType: SubResource.id → ResourceIdentifier for C# (migration from AutoRest) ── @@alternateType(Common.SubResource.id, Azure.Core.armResourceIdentifier, From 023b4fcae2381856e0028a18c9218eb25491d37b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 16 Apr 2026 16:19:21 +0800 Subject: [PATCH 029/103] Fix remaining Uri, SubResource, ResourceIdentifier type changes - Move uri property to GalleryArtifactVersionSource base class - Add RestorePointSource disk restore point alternateType - All TypeSpec subprojects compile cleanly Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 13 +++++++++++++ .../Compute/ComputeGallery/client.tsp | 2 +- .../Compute/ComputeGallery/models.tsp | 10 +++++----- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index ac2106f94874..bfd2e627cf3b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -719,6 +719,19 @@ using Compute; "csharp" ); +// RestorePoint disk restore point references — flatten to ResourceIdentifier for backward compat +// Old SDK had flat DiskRestorePointId (ResourceIdentifier); new TypeSpec has nested DiskRestorePointAttributes object. +@@clientName(RestorePointSourceVMDataDisk.diskRestorePoint, "DiskRestorePointId", "csharp"); +@@alternateType(RestorePointSourceVMDataDisk.diskRestorePoint, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@clientName(RestorePointSourceVMOSDisk.diskRestorePoint, "DiskRestorePointId", "csharp"); +@@alternateType(RestorePointSourceVMOSDisk.diskRestorePoint, + Azure.Core.armResourceIdentifier, + "csharp" +); + // ── alternateType: string → Uri for C# (migration from AutoRest) ── @@alternateType(BootDiagnostics.storageUri, url, "csharp"); @@alternateType(BootDiagnosticsInstanceView.consoleScreenshotBlobUri, url, "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 2fdb588fa24c..cc4eca1cbe34 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -199,7 +199,7 @@ using ComputeGallery; @@alternateType(CommunityGalleryInfo.publisherUri, url, "csharp"); @@alternateType(CommunityGalleryMetadata.privacyStatementUri, url, "csharp"); @@alternateType(CommunityGalleryImageProperties.privacyStatementUri, url, "csharp"); -@@alternateType(GalleryDiskImageSource.uri, url, "csharp"); +@@alternateType(GalleryArtifactVersionSource.uri, url, "csharp"); // ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp index 6c3757c1aab7..24b69b6c2434 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp @@ -1159,6 +1159,11 @@ model GalleryArtifactVersionSource { * The id of the gallery artifact version source. */ id?: string; + + /** + * The uri of the gallery artifact version source. Currently used to specify vhd/blob source. + */ + uri?: string; } /** @@ -1194,11 +1199,6 @@ model GalleryDiskImage { */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" model GalleryDiskImageSource extends GalleryArtifactVersionSource { - /** - * The uri of the gallery artifact version source. Currently used to specify vhd/blob source. - */ - uri?: string; - /** * The Storage Account Id that contains the vhd blob being used as a source for this artifact version. */ From 9d5bc886e16cf284e943918f94880c112ab69657 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 16 Apr 2026 16:32:22 +0800 Subject: [PATCH 030/103] Revert RestorePointSource alternateType that deleted DiskRestorePointAttributes The alternateType on diskRestorePoint replaced the entire model with armResourceIdentifier, causing DiskRestorePointAttributes, RestorePointEncryption, and RestorePointEncryptionType to be removed from generation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index bfd2e627cf3b..ac2106f94874 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -719,19 +719,6 @@ using Compute; "csharp" ); -// RestorePoint disk restore point references — flatten to ResourceIdentifier for backward compat -// Old SDK had flat DiskRestorePointId (ResourceIdentifier); new TypeSpec has nested DiskRestorePointAttributes object. -@@clientName(RestorePointSourceVMDataDisk.diskRestorePoint, "DiskRestorePointId", "csharp"); -@@alternateType(RestorePointSourceVMDataDisk.diskRestorePoint, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@clientName(RestorePointSourceVMOSDisk.diskRestorePoint, "DiskRestorePointId", "csharp"); -@@alternateType(RestorePointSourceVMOSDisk.diskRestorePoint, - Azure.Core.armResourceIdentifier, - "csharp" -); - // ── alternateType: string → Uri for C# (migration from AutoRest) ── @@alternateType(BootDiagnostics.storageUri, url, "csharp"); @@alternateType(BootDiagnosticsInstanceView.consoleScreenshotBlobUri, url, "csharp"); From 89867590465a8e2d482da0c0420c0ff40ca1621c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 16 Apr 2026 16:56:53 +0800 Subject: [PATCH 031/103] Add alternateType for ExtendedLocation to ARM common type @@alternateType(Common.ExtendedLocation, Azure.ResourceManager.CommonTypes.ExtendedLocation, csharp) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 17ac827461ca..76e193d50645 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -70,8 +70,8 @@ namespace ComputeCombine; @@clientName(Common.SubResource, "ComputeSubResourceData", "csharp"); @@clientName(Common.SubResourceReadOnly, "ComputeWriteableSubResourceData", "csharp"); -// ExtendedLocation → Azure.ResourceManager.Resources.Models.ExtendedLocation for C# -// TODO: ExtendedLocation alternateType needs a solution — can't define stub due to name collision with Common.ExtendedLocation +// Replace Compute's local ExtendedLocation with ARM common type +@@alternateType(Common.ExtendedLocation, Azure.ResourceManager.CommonTypes.ExtendedLocation, "csharp"); // ComputeSku namespace types @@clientName(ComputeSku.ResourceSku, "ComputeResourceSku", "csharp"); From c8ed27567c26d9f7919dee2d530618aaba285193 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 16 Apr 2026 17:39:53 +0800 Subject: [PATCH 032/103] Add ExtendedLocation alternateType to ARM common type, rename ComputeSku collision @@alternateType(Common.ExtendedLocation, Azure.ResourceManager.CommonTypes.ExtendedLocation, csharp) @@clientName(ComputeSku.ExtendedLocationType, ComputeExtendedLocationType, csharp) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 76e193d50645..d9a098a06aa5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -88,6 +88,7 @@ namespace ComputeCombine; // ComputeSku property renames (C# backward compat) @@clientName(ComputeSku.ResourceSkuCosts.meterID, "MeterId", "csharp"); @@clientName(ComputeSku.ResourceSkuRestrictions.type, "RestrictionsType", "csharp"); +@@clientName(ComputeSku.ExtendedLocationType, "ComputeExtendedLocationType", "csharp"); @@clientName(ComputeSku.ResourceSkuLocationInfo.type, "ExtendedLocationType", "csharp"); // ── alternateType: SubResource.id → ResourceIdentifier for C# (migration from AutoRest) ── From 5a5b12c487fc0d83479968cb48233b21a1f988e1 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 16 Apr 2026 18:12:17 +0800 Subject: [PATCH 033/103] fix: map ComputeSku ExtendedLocationType to ARM common type via alternateType Add @@alternateType for ComputeSku.ResourceSkuLocationInfo.type to map it to Azure.ResourceManager.CommonTypes.ExtendedLocationType in C#, matching the old SDK's use of Azure.ResourceManager.Resources.Models.ExtendedLocationType. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index d9a098a06aa5..373848ec66b8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -70,8 +70,9 @@ namespace ComputeCombine; @@clientName(Common.SubResource, "ComputeSubResourceData", "csharp"); @@clientName(Common.SubResourceReadOnly, "ComputeWriteableSubResourceData", "csharp"); -// Replace Compute's local ExtendedLocation with ARM common type +// Replace Compute's local ExtendedLocation / ExtendedLocationType with ARM common types @@alternateType(Common.ExtendedLocation, Azure.ResourceManager.CommonTypes.ExtendedLocation, "csharp"); +@@alternateType(ComputeSku.ResourceSkuLocationInfo.type, Azure.ResourceManager.CommonTypes.ExtendedLocationType, "csharp"); // ComputeSku namespace types @@clientName(ComputeSku.ResourceSku, "ComputeResourceSku", "csharp"); From 43c03150f89ec2300724c9c60ceaedf5dac5d87c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 17 Apr 2026 15:47:12 +0800 Subject: [PATCH 034/103] Add VmSizeType casing clientName + markAsPageable for PrivateLinkResources/EdgeZone --- .../Compute/Compute/client.tsp | 71 +++++++++++++++++++ .../Compute/ComputeDisk/client.tsp | 5 ++ 2 files changed, 76 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index ac2106f94874..acce3d5d9d30 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -521,6 +521,9 @@ using Compute; @@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineScaleSetVMExtensions.list, "csharp" ); +@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineImagesOperationGroup.listByEdgeZone, + "csharp" +); // ── Type renames for backward compatibility (batch) ── @@clientName(PublicIPAddressSku, "ComputePublicIPAddressSku", "csharp"); @@ -880,3 +883,71 @@ union PassName { @@alternateType(ComponentNames, ComponentName, "csharp"); @@alternateType(PassNames, PassName, "csharp"); // TODO: OperatingSystemTypes → extensible enum blocked by name collision with Compute.OperatingSystemType + +// ── VirtualMachineSizeType member casing fixes (65 members) ── +// The generator lowercases size suffixes (s, m, r) differently from old SDK. +@@clientName(VirtualMachineSizeTypes.`Standard_A2m_v2`, "StandardA2MV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_A4m_v2`, "StandardA4MV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_A8m_v2`, "StandardA8MV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_B1ms`, "StandardB1Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_B1s`, "StandardB1S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_B2ms`, "StandardB2Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_B2s`, "StandardB2S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_B4ms`, "StandardB4Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_B8ms`, "StandardB8Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_D16s_v3`, "StandardD16SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_D2s_v3`, "StandardD2SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_D32s_v3`, "StandardD32SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_D4s_v3`, "StandardD4SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_D64s_v3`, "StandardD64SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_D8s_v3`, "StandardD8SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E16s_v3`, "StandardE16SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E2s_v3`, "StandardE2SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E32-8s_v3`, "StandardE328SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E32s_v3`, "StandardE32SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E4s_v3`, "StandardE4SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E64-16s_v3`, "StandardE6416SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E64-32s_v3`, "StandardE6432SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E64s_v3`, "StandardE64SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E8s_v3`, "StandardE8SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F16s`, "StandardF16S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F16s_v2`, "StandardF16SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F1s`, "StandardF1S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F2s`, "StandardF2S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F2s_v2`, "StandardF2SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F32s_v2`, "StandardF32SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F4s`, "StandardF4S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F4s_v2`, "StandardF4SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F64s_v2`, "StandardF64SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F72s_v2`, "StandardF72SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F8s`, "StandardF8S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_F8s_v2`, "StandardF8SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_H16m`, "StandardH16M", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_H16mr`, "StandardH16Mr", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_H16r`, "StandardH16R", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_H8m`, "StandardH8M", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_L16s`, "StandardL16S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_L32s`, "StandardL32S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_L4s`, "StandardL4S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_L8s`, "StandardL8S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M128-32ms`, "StandardM12832Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M128-64ms`, "StandardM12864Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M128ms`, "StandardM128Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M128s`, "StandardM128S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M64-16ms`, "StandardM6416Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M64-32ms`, "StandardM6432Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M64ms`, "StandardM64Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M64s`, "StandardM64S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_NC12s_v2`, "StandardNC12SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_NC12s_v3`, "StandardNC12SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_NC24r`, "StandardNC24R", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_NC24rs_v2`, "StandardNC24RsV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_NC24rs_v3`, "StandardNC24RsV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_NC24s_v2`, "StandardNC24SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_NC24s_v3`, "StandardNC24SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_NC6s_v2`, "StandardNC6SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_NC6s_v3`, "StandardNC6SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_ND12s`, "StandardND12S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_ND24rs`, "StandardND24Rs", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_ND24s`, "StandardND24S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_ND6s`, "StandardND6S", "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 9103aefd466d..eb6b040138ca 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -188,3 +188,8 @@ using ComputeDisk; @@alternateType(KeyVaultAndKeyReference.keyUrl, url, "csharp"); @@alternateType(KeyVaultAndSecretReference.secretUrl, url, "csharp"); @@alternateType(ShareInfoElement.vmUri, url, "csharp"); + +// Mark non-pageable list operations as pageable for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.markAsPageable(DiskAccesses.getPrivateLinkResources, + "csharp" +); From 0db7e07f908cf50d26a0b2613f127143df8be43c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 17 Apr 2026 20:41:41 +0800 Subject: [PATCH 035/103] update --- .../Compute/Compute/client.tsp | 6 +- .../ComputeGallery/CommunityGallery.tsp | 10 +- .../ComputeGallery/CommunityGalleryImage.tsp | 12 +- .../CommunityGalleryImageVersion.tsp | 12 +- .../Compute/ComputeGallery/SharedGallery.tsp | 10 +- .../ComputeGallery/SharedGalleryImage.tsp | 12 +- .../SharedGalleryImageVersion.tsp | 12 +- .../Compute/ComputeGallery/client.tsp | 110 ++++++++++++++---- .../Compute/ComputeGallery/models.tsp | 36 +----- .../Compute/stable/2024-03-03/GalleryRP.json | 8 +- .../Compute/stable/2025-03-03/GalleryRP.json | 8 +- 11 files changed, 110 insertions(+), 126 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 31c37483cf50..fa752926f3c9 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -426,7 +426,10 @@ using Compute; "csharp" ); @@clientName(UsageName, "ComputeUsageName", "csharp"); -@@clientName(OperatingSystemType, "SupportedOperatingSystemType", "csharp"); +// `OperatingSystemTypes` (closed enum, Windows/Linux) was named `SupportedOperatingSystemType` +// in the old SDK; the union `OperatingSystemType` kept its spec name (extensible struct). +// Preserve that mapping in csharp. +@@clientName(OperatingSystemTypes, "SupportedOperatingSystemType", "csharp"); @@clientName(ReservationType, "CapacityReservationType", "csharp"); @@clientName(ApiErrorBase, "ComputeApiErrorBase", "csharp"); @@clientName(VMGalleryApplication, @@ -886,7 +889,6 @@ union PassName { @@alternateType(ComponentNames, ComponentName, "csharp"); @@alternateType(PassNames, PassName, "csharp"); -// TODO: OperatingSystemTypes → extensible enum blocked by name collision with Compute.OperatingSystemType // ── VirtualMachineSizeType member casing fixes (65 members) ── // The generator lowercases size suffixes (s, m, r) differently from old SDK. diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGallery.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGallery.tsp index 9a11074d0d62..9489b5cd914b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGallery.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGallery.tsp @@ -11,14 +11,7 @@ namespace ComputeGallery; /** * Specifies information about the Community Gallery that you want to create or update. */ -model CommunityGallery is ProxyResourceCommunity { - ...Azure.ResourceManager.Legacy.ResourceNameParameter< - Resource = CommunityGallery, - KeyName = "publicGalleryName", - SegmentName = "communityGalleries", - NamePattern = "" - >; -} +model CommunityGallery is ProxyResourceCommunity; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface CommunityGalleries { @@ -41,7 +34,6 @@ interface CommunityGalleries { ): ArmResponse | Common.CloudError; } -@@doc(CommunityGallery.name, "The public name of the community gallery."); @@doc(CommunityGallery.properties, "Describes the properties of a community gallery." ); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImage.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImage.tsp index 2346b28a70de..759cd2bba428 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImage.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImage.tsp @@ -13,14 +13,7 @@ namespace ComputeGallery; * Specifies information about the gallery image definition that you want to create or update. */ model CommunityGalleryImage - is ProxyResourceCommunity { - ...Azure.ResourceManager.Legacy.ResourceNameParameter< - Resource = CommunityGalleryImage, - KeyName = "galleryImageName", - SegmentName = "images", - NamePattern = "" - >; -} + is ProxyResourceCommunity; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface CommunityGalleryImages { @@ -66,9 +59,6 @@ interface CommunityGalleryImages { ): ArmResponse | Common.CloudError; } -@@doc(CommunityGalleryImage.name, - "The name of the community gallery image definition." -); @@doc(CommunityGalleryImage.properties, "Describes the properties of a gallery image definition." ); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImageVersion.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImageVersion.tsp index da4432977c2e..402dae07b235 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImageVersion.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/CommunityGalleryImageVersion.tsp @@ -13,14 +13,7 @@ namespace ComputeGallery; * Specifies information about the gallery image version that you want to create or update. */ model CommunityGalleryImageVersion - is ProxyResourceCommunity { - ...Azure.ResourceManager.Legacy.ResourceNameParameter< - Resource = CommunityGalleryImageVersion, - KeyName = "galleryImageVersionName", - SegmentName = "versions", - NamePattern = "" - >; -} + is ProxyResourceCommunity; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface CommunityGalleryImageVersions { @@ -74,9 +67,6 @@ interface CommunityGalleryImageVersions { ): ArmResponse | Common.CloudError; } -@@doc(CommunityGalleryImageVersion.name, - "The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." -); @@doc(CommunityGalleryImageVersion.properties, "Describes the properties of a gallery image version." ); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGallery.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGallery.tsp index 1662b6098e70..b402ceaf8d3d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGallery.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGallery.tsp @@ -11,14 +11,7 @@ namespace ComputeGallery; /** * Specifies information about the Shared Gallery that you want to create or update. */ -model SharedGallery is ProxyResourceShared { - ...Azure.ResourceManager.Legacy.ResourceNameParameter< - Resource = SharedGallery, - KeyName = "galleryUniqueName", - SegmentName = "sharedGalleries", - NamePattern = "" - >; -} +model SharedGallery is ProxyResourceShared; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface SharedGalleries { @@ -62,5 +55,4 @@ interface SharedGalleries { ): ArmResponse | Common.CloudError; } -@@doc(SharedGallery.name, "The unique name of the Shared Gallery."); @@doc(SharedGallery.properties, "Specifies the properties of a shared gallery"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImage.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImage.tsp index 0f84b1ee586e..749493bad24d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImage.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImage.tsp @@ -12,14 +12,7 @@ namespace ComputeGallery; /** * Specifies information about the gallery image definition that you want to create or update. */ -model SharedGalleryImage is ProxyResourceShared { - ...Azure.ResourceManager.Legacy.ResourceNameParameter< - Resource = SharedGalleryImage, - KeyName = "galleryImageName", - SegmentName = "images", - NamePattern = "" - >; -} +model SharedGalleryImage is ProxyResourceShared; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface SharedGalleryImages { @@ -71,9 +64,6 @@ interface SharedGalleryImages { ): ArmResponse | Common.CloudError; } -@@doc(SharedGalleryImage.name, - "The name of the Shared Gallery Image Definition from which the Image Versions are to be listed." -); @@doc(SharedGalleryImage.properties, "Describes the properties of a gallery image definition." ); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImageVersion.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImageVersion.tsp index 4340e01e562c..fbafeb1581b3 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImageVersion.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/SharedGalleryImageVersion.tsp @@ -13,14 +13,7 @@ namespace ComputeGallery; * Specifies information about the gallery image version that you want to create or update. */ model SharedGalleryImageVersion - is ProxyResourceShared { - ...Azure.ResourceManager.Legacy.ResourceNameParameter< - Resource = SharedGalleryImageVersion, - KeyName = "galleryImageVersionName", - SegmentName = "versions", - NamePattern = "" - >; -} + is ProxyResourceShared; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Not an ARM resource - deprecated custom resource" interface SharedGalleryImageVersions { @@ -80,9 +73,6 @@ interface SharedGalleryImageVersions { ): ArmResponse | Common.CloudError; } -@@doc(SharedGalleryImageVersion.name, - "The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." -); @@doc(SharedGalleryImageVersion.properties, "Describes the properties of a gallery image version." ); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index cc4eca1cbe34..70559d202834 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -8,11 +8,20 @@ using ComputeGallery; @@clientName(GalleryImageProperties.osType, "OSType", "csharp"); @@clientName(GalleryImageProperties.osState, "OSState", "csharp"); @@clientName(EncryptionImages.osDiskImage, "OSDiskImage", "csharp"); -@@clientName(GalleryImageVersionStorageProfile.osDiskImage, "OSDiskImage", "csharp"); -@@clientName(GalleryInVMAccessControlProfileProperties.osType, "OSType", "csharp"); +@@clientName(GalleryImageVersionStorageProfile.osDiskImage, + "OSDiskImage", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileProperties.osType, + "OSType", + "csharp" +); @@clientName(SharedGalleryImageProperties.osType, "OSType", "csharp"); @@clientName(SharedGalleryImageProperties.osState, "OSState", "csharp"); -@@clientName(SharedGalleryImageVersionStorageProfile.osDiskImage, "OSDiskImage", "csharp"); +@@clientName(SharedGalleryImageVersionStorageProfile.osDiskImage, + "OSDiskImage", + "csharp" +); @@clientName(CommunityGalleryImageProperties.osType, "OSType", "csharp"); @@clientName(CommunityGalleryImageProperties.osState, "OSState", "csharp"); @@ -136,48 +145,96 @@ using ComputeGallery; // Type renames for backward compatibility @@clientName(EndpointTypes, "ComputeGalleryEndpointType", "csharp"); -@@clientName(GallerySoftDeletedResource, "GallerySoftDeletedResourceDetails", "csharp"); +@@clientName(GallerySoftDeletedResource, + "GallerySoftDeletedResourceDetails", + "csharp" +); @@clientName(PirResource, "PirResourceData", "csharp"); -@@clientName(PirSharedGalleryResource, "PirSharedGalleryResourceData", "csharp"); -@@clientName(PirCommunityGalleryResource, "PirCommunityGalleryResourceData", "csharp"); +@@clientName(PirSharedGalleryResource, + "PirSharedGalleryResourceData", + "csharp" +); +@@clientName(PirCommunityGalleryResource, + "PirCommunityGalleryResourceData", + "csharp" +); // Rename gallery models to *Data for backward compatibility (they were ARM resources before) @@clientName(SharedGallery, "SharedGalleryData", "csharp"); @@clientName(SharedGalleryImage, "SharedGalleryImageData", "csharp"); -@@clientName(SharedGalleryImageVersion, "SharedGalleryImageVersionData", "csharp"); +@@clientName(SharedGalleryImageVersion, + "SharedGalleryImageVersionData", + "csharp" +); @@clientName(CommunityGallery, "CommunityGalleryData", "csharp"); @@clientName(CommunityGalleryImage, "CommunityGalleryImageData", "csharp"); -@@clientName(CommunityGalleryImageVersion, "CommunityGalleryImageVersionData", "csharp"); +@@clientName(CommunityGalleryImageVersion, + "CommunityGalleryImageVersionData", + "csharp" +); // ── Plural→singular enum renames (C# backward compat) ── @@clientName(ReplicationStatusTypes, "ReplicationStatusType", "csharp"); @@clientName(SelectPermissions, "SelectPermission", "csharp"); @@clientName(SharingProfileGroupTypes, "SharingProfileGroupType", "csharp"); -@@clientName(SharingUpdateOperationTypes, "SharingUpdateOperationType", "csharp"); -@@clientName(SoftDeletedArtifactTypes, "GallerySoftDeletedArtifactType", "csharp"); +@@clientName(SharingUpdateOperationTypes, + "SharingUpdateOperationType", + "csharp" +); +@@clientName(SoftDeletedArtifactTypes, + "GallerySoftDeletedArtifactType", + "csharp" +); // ── VM→Vm casing renames (C# backward compat) ── -@@clientName(ConfidentialVMEncryptionType, "ConfidentialVmEncryptionType", "csharp"); +@@clientName(ConfidentialVMEncryptionType, + "ConfidentialVmEncryptionType", + "csharp" +); // ── Other renames (C# backward compat) ── @@clientName(GalleryExpandParams, "GalleryExpand", "csharp"); -@@clientName(PolicyViolationCategory, "GalleryImageVersionPolicyViolationCategory", "csharp"); +@@clientName(PolicyViolationCategory, + "GalleryImageVersionPolicyViolationCategory", + "csharp" +); @@clientName(ReplicationState, "RegionalReplicationState", "csharp"); // ── Property casing renames: acronym case normalization (C# backward compat) ── -@@clientName(OSDiskImageSecurityProfile.confidentialVMEncryptionType, "ConfidentialVmEncryptionType", "csharp"); -@@clientName(OSDiskImageSecurityProfile.secureVMDiskEncryptionSetId, "SecureVmDiskEncryptionSetId", "csharp"); +@@clientName(OSDiskImageSecurityProfile.confidentialVMEncryptionType, + "ConfidentialVmEncryptionType", + "csharp" +); +@@clientName(OSDiskImageSecurityProfile.secureVMDiskEncryptionSetId, + "SecureVmDiskEncryptionSetId", + "csharp" +); @@clientName(RecommendedMachineConfiguration.vCPUs, "VCpus", "csharp"); // ── Is* prefix property renames (C# backward compat) ── -@@clientName(GalleryApplicationCustomActionParameter.required, "IsRequired", "csharp"); -@@clientName(GalleryImageVersionSafetyProfile.blockDeletionBeforeEndOfLife, "IsBlockedDeletionBeforeEndOfLife", "csharp"); -@@clientName(GalleryImageVersionSafetyProfile.reportedForPolicyViolation, "IsReportedForPolicyViolation", "csharp"); +@@clientName(GalleryApplicationCustomActionParameter.required, + "IsRequired", + "csharp" +); +@@clientName(GalleryImageVersionSafetyProfile.blockDeletionBeforeEndOfLife, + "IsBlockedDeletionBeforeEndOfLife", + "csharp" +); +@@clientName(GalleryImageVersionSafetyProfile.reportedForPolicyViolation, + "IsReportedForPolicyViolation", + "csharp" +); @@clientName(TargetRegion.excludeFromLatest, "IsExcludedFromLatest", "csharp"); -@@clientName(GalleryImageVersionProperties.restore, "IsRestoreEnabled", "csharp"); +@@clientName(GalleryImageVersionProperties.restore, + "IsRestoreEnabled", + "csharp" +); // ── Qualified property name renames (C# backward compat) ── -@@clientName(GalleryApplicationCustomActionParameter.type, "ParameterType", "csharp"); +@@clientName(GalleryApplicationCustomActionParameter.type, + "ParameterType", + "csharp" +); @@clientName(GalleryExtendedLocation.type, "ExtendedLocationType", "csharp"); @@clientName(ExecutedValidation.type, "ExecutedValidationType", "csharp"); @@clientName(GalleryScriptParameter.type, "ParameterType", "csharp"); @@ -191,14 +248,23 @@ using ComputeGallery; // ── alternateType: string → Uri for C# (migration from AutoRest) ── @@alternateType(GalleryImageProperties.privacyStatementUri, url, "csharp"); @@alternateType(GalleryImageProperties.releaseNoteUri, url, "csharp"); -@@alternateType(GalleryApplicationProperties.privacyStatementUri, url, "csharp"); +@@alternateType(GalleryApplicationProperties.privacyStatementUri, + url, + "csharp" +); @@alternateType(GalleryApplicationProperties.releaseNoteUri, url, "csharp"); @@alternateType(GalleryScriptProperties.privacyStatementUri, url, "csharp"); @@alternateType(GalleryScriptProperties.releaseNoteUri, url, "csharp"); -@@alternateType(SharedGalleryImageProperties.privacyStatementUri, url, "csharp"); +@@alternateType(SharedGalleryImageProperties.privacyStatementUri, + url, + "csharp" +); @@alternateType(CommunityGalleryInfo.publisherUri, url, "csharp"); @@alternateType(CommunityGalleryMetadata.privacyStatementUri, url, "csharp"); -@@alternateType(CommunityGalleryImageProperties.privacyStatementUri, url, "csharp"); +@@alternateType(CommunityGalleryImageProperties.privacyStatementUri, + url, + "csharp" +); @@alternateType(GalleryArtifactVersionSource.uri, url, "csharp"); // ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp index 24b69b6c2434..904c462f5d69 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp @@ -2742,25 +2742,11 @@ model LatestGalleryImageVersion { * @template Properties A model containing the provider-specific properties for this resource * @template PropertiesOptional A boolean flag indicating whether the resource `Properties` field is marked as optional or required. Default true is optional and recommended. */ -#suppress "@azure-tools/typespec-azure-core/no-private-usage" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" @doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") -@Http.Private.includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Legacy.customAzureResource -model ProxyResourceCommunity< - Properties extends {}, - PropertiesOptional extends valueof boolean = true -> extends PirCommunityGalleryResource { +model ProxyResourceCommunity + extends PirCommunityGalleryResource { @doc("The resource-specific properties for this resource.") properties?: Properties; - - /** - * The name of the parent resource. - */ - @path - @visibility(Lifecycle.Read) - @segment("parents") - parentName: string; } /** @@ -2770,25 +2756,11 @@ model ProxyResourceCommunity< * @template Properties A model containing the provider-specific properties for this resource * @template PropertiesOptional A boolean flag indicating whether the resource `Properties` field is marked as optional or required. Default true is optional and recommended. */ -#suppress "@azure-tools/typespec-azure-core/no-private-usage" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" @doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") -@Http.Private.includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Legacy.customAzureResource -model ProxyResourceShared< - Properties extends {}, - PropertiesOptional extends valueof boolean = true -> extends PirSharedGalleryResource { +model ProxyResourceShared + extends PirSharedGalleryResource { @doc("The resource-specific properties for this resource.") properties?: Properties; - - /** - * The name of the parent resource. - */ - @path - @visibility(Lifecycle.Read) - @segment("parents") - parentName: string; } @@doc(CommunityGalleryImageList.value, "A list of community gallery images."); @@doc(CommunityGalleryImageVersionList.value, diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json index a123af4a88eb..61d592aba413 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json @@ -4808,6 +4808,10 @@ "id": { "type": "string", "description": "The id of the gallery artifact version source." + }, + "uri": { + "type": "string", + "description": "The uri of the gallery artifact version source. Currently used to specify vhd/blob source." } } }, @@ -4854,10 +4858,6 @@ "type": "object", "description": "The source for the disk image.", "properties": { - "uri": { - "type": "string", - "description": "The uri of the gallery artifact version source. Currently used to specify vhd/blob source." - }, "storageAccountId": { "type": "string", "description": "The Storage Account Id that contains the vhd blob being used as a source for this artifact version." diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json index 75645e53b099..020001bed778 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json @@ -5548,6 +5548,10 @@ "id": { "type": "string", "description": "The id of the gallery artifact version source." + }, + "uri": { + "type": "string", + "description": "The uri of the gallery artifact version source. Currently used to specify vhd/blob source." } } }, @@ -5594,10 +5598,6 @@ "type": "object", "description": "The source for the disk image.", "properties": { - "uri": { - "type": "string", - "description": "The uri of the gallery artifact version source. Currently used to specify vhd/blob source." - }, "storageAccountId": { "type": "string", "description": "The Storage Account Id that contains the vhd blob being used as a source for this artifact version." From b8d13ed2e59a56412e9c7a136e58188edbf71ae4 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 17 Apr 2026 20:47:22 +0800 Subject: [PATCH 036/103] revert some undesired changes --- .../Compute/ComputeGallery/models.tsp | 10 +++++----- .../Compute/stable/2024-03-03/GalleryRP.json | 8 ++++---- .../Compute/stable/2025-03-03/GalleryRP.json | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp index 904c462f5d69..a391129ef7d5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp @@ -1159,11 +1159,6 @@ model GalleryArtifactVersionSource { * The id of the gallery artifact version source. */ id?: string; - - /** - * The uri of the gallery artifact version source. Currently used to specify vhd/blob source. - */ - uri?: string; } /** @@ -1199,6 +1194,11 @@ model GalleryDiskImage { */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" model GalleryDiskImageSource extends GalleryArtifactVersionSource { + /** + * The uri of the gallery artifact version source. Currently used to specify vhd/blob source. + */ + uri?: string; + /** * The Storage Account Id that contains the vhd blob being used as a source for this artifact version. */ diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json index 61d592aba413..a123af4a88eb 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json @@ -4808,10 +4808,6 @@ "id": { "type": "string", "description": "The id of the gallery artifact version source." - }, - "uri": { - "type": "string", - "description": "The uri of the gallery artifact version source. Currently used to specify vhd/blob source." } } }, @@ -4858,6 +4854,10 @@ "type": "object", "description": "The source for the disk image.", "properties": { + "uri": { + "type": "string", + "description": "The uri of the gallery artifact version source. Currently used to specify vhd/blob source." + }, "storageAccountId": { "type": "string", "description": "The Storage Account Id that contains the vhd blob being used as a source for this artifact version." diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json index 020001bed778..75645e53b099 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json @@ -5548,10 +5548,6 @@ "id": { "type": "string", "description": "The id of the gallery artifact version source." - }, - "uri": { - "type": "string", - "description": "The uri of the gallery artifact version source. Currently used to specify vhd/blob source." } } }, @@ -5598,6 +5594,10 @@ "type": "object", "description": "The source for the disk image.", "properties": { + "uri": { + "type": "string", + "description": "The uri of the gallery artifact version source. Currently used to specify vhd/blob source." + }, "storageAccountId": { "type": "string", "description": "The Storage Account Id that contains the vhd blob being used as a source for this artifact version." From 28e16cac1c39e5e4354513fa6cc7ae5de1620418 Mon Sep 17 00:00:00 2001 From: ArcturusZhang Date: Fri, 24 Apr 2026 11:23:02 +0800 Subject: [PATCH 037/103] Remove stale alternateType for GalleryArtifactVersionSource.uri The 'uri' property no longer exists on the model after the recent main merge; only 'id' remains. The decorator was failing tsp compile. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/ComputeGallery/client.tsp | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 70559d202834..89db2c4a15d5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -265,7 +265,6 @@ using ComputeGallery; url, "csharp" ); -@@alternateType(GalleryArtifactVersionSource.uri, url, "csharp"); // ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── From 2d6ac454357223bceb53d702c47bc4b33ebc1e71 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 24 Apr 2026 13:00:31 +0800 Subject: [PATCH 038/103] Add SubResource/ApiEntityReference armResourceIdentifier + VirtualMachineImageResource azureLocation alternateType for csharp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 77be36350e77..da02319c2444 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -12,6 +12,22 @@ using Compute; "csharp" ); +// SubResource.id and ApiEntityReference.id flatten to XxxId properties on parent +// models (e.g. NetworkSecurityGroupId, SubnetId, DiskRestorePointId). Old AutoRest +// SDK emitted these as ResourceIdentifier; preserve that contract for csharp. +@@alternateType(SubResource.id, Azure.Core.armResourceIdentifier, "csharp"); +@@alternateType(ApiEntityReference.id, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// VirtualMachineImageResource (renamed VirtualMachineImageBase in csharp) had +// Location typed as AzureLocation in the old SDK; the spec models it as string. +@@alternateType(VirtualMachineImageResource.location, + Azure.Core.azureLocation, + "csharp" +); + @@clientName(NetworkApiVersion.`2020-11-01`, "TwoThousandTwenty1101", "go, javascript" From 0d844ec49a4f825119cb597daa8cdd6a84de1193 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 24 Apr 2026 13:39:54 +0800 Subject: [PATCH 039/103] Remove scalar SubResource alternateType decorators (3 networkSecurityGroup) Per migration guidance, when the new generator emits a SubResource-typed property it does so as internal+flattened automatically; the inner `id` is then exposed via the SubResource.id armResourceIdentifier alternateType. Spec-side decorator targeting scalar SubResource is unnecessary and produces no observable C# type change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index da02319c2444..6b52776dd566 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -1017,10 +1017,6 @@ using Compute; Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); -@@alternateType(VirtualMachineScaleSetNetworkConfigurationProperties.networkSecurityGroup, - Azure.ResourceManager.Models.SubResource, - "csharp" -); @@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools, Azure.ResourceManager.Models.WritableSubResource[], "csharp" @@ -1037,10 +1033,6 @@ using Compute; Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); -@@alternateType(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.networkSecurityGroup, - Azure.ResourceManager.Models.SubResource, - "csharp" -); @@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationGatewayBackendAddressPools, Azure.ResourceManager.Models.WritableSubResource[], "csharp" @@ -1057,10 +1049,6 @@ using Compute; Azure.ResourceManager.Models.WritableSubResource[], "csharp" ); -@@alternateType(VirtualMachineNetworkInterfaceConfigurationProperties.networkSecurityGroup, - Azure.ResourceManager.Models.SubResource, - "csharp" -); @@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups, Azure.ResourceManager.Models.WritableSubResource[], "csharp" From 83f0866cc6d7a674e9f84e3d2bca0a5f1d04302b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 24 Apr 2026 16:33:39 +0800 Subject: [PATCH 040/103] Swap ComputeSubResourceData / ComputeWriteableSubResourceData csharp renames Common.SubResource has a writable id, so it should map to ComputeWriteableSubResourceData in csharp (matching the old AutoRest SDK). Common.SubResourceReadOnly has a read-only id and should map to ComputeSubResourceData. The previous mapping was inverted, causing types like ImageReference, VirtualMachineImage, VirtualMachineCaptureResult, VirtualMachineManagedDisk, and VirtualMachineNetworkInterfaceReference to extend the wrong base class and break ApiCompat. --- .../Microsoft.Compute/Compute/client.tsp | 76 +++++++++++++++---- 1 file changed, 60 insertions(+), 16 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index fb4d6b6b2fb8..0c55cf53cb97 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -67,30 +67,74 @@ namespace ComputeCombine; // ── C# type renames for backward compatibility (migration from AutoRest) ── // Common namespace types -@@clientName(Common.SubResource, "ComputeSubResourceData", "csharp"); -@@clientName(Common.SubResourceReadOnly, "ComputeWriteableSubResourceData", "csharp"); +// Common.SubResource has a writable id → maps to ComputeWriteableSubResourceData (matches old AutoRest). +// Common.SubResourceReadOnly has a read-only id → maps to ComputeSubResourceData (matches old AutoRest). +@@clientName(Common.SubResource, "ComputeWriteableSubResourceData", "csharp"); +@@clientName(Common.SubResourceReadOnly, "ComputeSubResourceData", "csharp"); // Replace Compute's local ExtendedLocation / ExtendedLocationType with ARM common types -@@alternateType(Common.ExtendedLocation, Azure.ResourceManager.CommonTypes.ExtendedLocation, "csharp"); -@@alternateType(ComputeSku.ResourceSkuLocationInfo.type, Azure.ResourceManager.CommonTypes.ExtendedLocationType, "csharp"); +@@alternateType(Common.ExtendedLocation, + Azure.ResourceManager.CommonTypes.ExtendedLocation, + "csharp" +); +@@alternateType(ComputeSku.ResourceSkuLocationInfo.type, + Azure.ResourceManager.CommonTypes.ExtendedLocationType, + "csharp" +); // ComputeSku namespace types @@clientName(ComputeSku.ResourceSku, "ComputeResourceSku", "csharp"); -@@clientName(ComputeSku.ResourceSkuCapabilities, "ComputeResourceSkuCapabilities", "csharp"); -@@clientName(ComputeSku.ResourceSkuCapacity, "ComputeResourceSkuCapacity", "csharp"); -@@clientName(ComputeSku.ResourceSkuCapacityScaleType, "ComputeResourceSkuCapacityScaleType", "csharp"); -@@clientName(ComputeSku.ResourceSkuLocationInfo, "ComputeResourceSkuLocationInfo", "csharp"); -@@clientName(ComputeSku.ResourceSkuRestrictionInfo, "ComputeResourceSkuRestrictionInfo", "csharp"); -@@clientName(ComputeSku.ResourceSkuRestrictions, "ComputeResourceSkuRestrictions", "csharp"); -@@clientName(ComputeSku.ResourceSkuRestrictionsReasonCode, "ComputeResourceSkuRestrictionsReasonCode", "csharp"); -@@clientName(ComputeSku.ResourceSkuRestrictionsType, "ComputeResourceSkuRestrictionsType", "csharp"); -@@clientName(ComputeSku.ResourceSkuZoneDetails, "ComputeResourceSkuZoneDetails", "csharp"); +@@clientName(ComputeSku.ResourceSkuCapabilities, + "ComputeResourceSkuCapabilities", + "csharp" +); +@@clientName(ComputeSku.ResourceSkuCapacity, + "ComputeResourceSkuCapacity", + "csharp" +); +@@clientName(ComputeSku.ResourceSkuCapacityScaleType, + "ComputeResourceSkuCapacityScaleType", + "csharp" +); +@@clientName(ComputeSku.ResourceSkuLocationInfo, + "ComputeResourceSkuLocationInfo", + "csharp" +); +@@clientName(ComputeSku.ResourceSkuRestrictionInfo, + "ComputeResourceSkuRestrictionInfo", + "csharp" +); +@@clientName(ComputeSku.ResourceSkuRestrictions, + "ComputeResourceSkuRestrictions", + "csharp" +); +@@clientName(ComputeSku.ResourceSkuRestrictionsReasonCode, + "ComputeResourceSkuRestrictionsReasonCode", + "csharp" +); +@@clientName(ComputeSku.ResourceSkuRestrictionsType, + "ComputeResourceSkuRestrictionsType", + "csharp" +); +@@clientName(ComputeSku.ResourceSkuZoneDetails, + "ComputeResourceSkuZoneDetails", + "csharp" +); // ComputeSku property renames (C# backward compat) @@clientName(ComputeSku.ResourceSkuCosts.meterID, "MeterId", "csharp"); -@@clientName(ComputeSku.ResourceSkuRestrictions.type, "RestrictionsType", "csharp"); -@@clientName(ComputeSku.ExtendedLocationType, "ComputeExtendedLocationType", "csharp"); -@@clientName(ComputeSku.ResourceSkuLocationInfo.type, "ExtendedLocationType", "csharp"); +@@clientName(ComputeSku.ResourceSkuRestrictions.type, + "RestrictionsType", + "csharp" +); +@@clientName(ComputeSku.ExtendedLocationType, + "ComputeExtendedLocationType", + "csharp" +); +@@clientName(ComputeSku.ResourceSkuLocationInfo.type, + "ExtendedLocationType", + "csharp" +); // ── alternateType: SubResource.id → ResourceIdentifier for C# (migration from AutoRest) ── @@alternateType(Common.SubResource.id, From a20c1a2c94662d12b9be4094c2cd601f0bb9645c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 28 Apr 2026 18:27:55 +0800 Subject: [PATCH 041/103] Add @@clientName operation renames for C# backward compat Mirror the override-operation-name entries from the deleted autorest.md: - VirtualMachines.start -> PowerOn - VirtualMachines.migrateToVMScaleSet -> MigrateToVirtualMachineScaleSet - VirtualMachineScaleSets.start -> PowerOn - VirtualMachineScaleSets.cancel -> CancelVirtualMachineScaleSetRollingUpgrade - VirtualMachineScaleSets.startExtensionUpgrade -> StartExtensionUpgradeVirtualMachineScaleSetRollingUpgrade - VirtualMachineScaleSetVMS.start -> PowerOn - Galleries.gallerySharingProfileUpdate -> UpdateSharingProfile - Galleries.listByArtifactName -> GetSoftDeletedResourcesByArtifactName --- .../Microsoft.Compute/Compute/client.tsp | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 0c55cf53cb97..3d6e32261659 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -143,3 +143,29 @@ namespace ComputeCombine; ); // NOTE: Common.Architecture → ArchitectureType is handled by auto-rename of Compute.ArchitectureTypes → ArchitectureType + +// ── C# operation renames for backward compatibility (migration from AutoRest) ── +// These mirror the override-operation-name entries from the deleted autorest.md. +@@clientName(Compute.VirtualMachines.start, "PowerOn", "csharp"); +@@clientName(Compute.VirtualMachines.migrateToVMScaleSet, + "MigrateToVirtualMachineScaleSet", + "csharp" +); +@@clientName(Compute.VirtualMachineScaleSets.start, "PowerOn", "csharp"); +@@clientName(Compute.VirtualMachineScaleSets.cancel, + "CancelVirtualMachineScaleSetRollingUpgrade", + "csharp" +); +@@clientName(Compute.VirtualMachineScaleSets.startExtensionUpgrade, + "StartExtensionUpgradeVirtualMachineScaleSetRollingUpgrade", + "csharp" +); +@@clientName(Compute.VirtualMachineScaleSetVMS.start, "PowerOn", "csharp"); +@@clientName(ComputeGallery.Galleries.gallerySharingProfileUpdate, + "UpdateSharingProfile", + "csharp" +); +@@clientName(ComputeGallery.Galleries.listByArtifactName, + "GetSoftDeletedResourcesByArtifactName", + "csharp" +); From b480404cff75b6ccd44d008805b41fa6a3e7a261 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Sun, 3 May 2026 14:47:13 +0800 Subject: [PATCH 042/103] Compute: defeat safe-flatten on AllInstancesDown / UserInitiatedRedeploy via @@alternateType wrapper with dummy property Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 42 +++++++++++++++---- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 6b52776dd566..131f18f3b0fe 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -499,13 +499,39 @@ using Compute; "csharp" ); -// Rename duplicate automaticallyApprove in sub-models to avoid flattening collision -@@clientName(UserInitiatedRedeploy.automaticallyApprove, - "AutomaticallyApproveRedeploy", +// AllInstancesDown / UserInitiatedRedeploy are single-property wrapper models. +// The mgmt generator's safe-flatten heuristic eliminates them and inlines the inner +// boolean into ScheduledEventsPolicy, breaking back-compat with the 1.x SDK (which +// exposed them as public wrapper types). Defeat safe-flatten by replacing each +// model with a wrapper variant that has a dummy second property — mirrors the +// `dummyPropertyTwo` swagger transform from the previous AutoRest autorest.md. +// The dummy property is hidden via SDK-side customization (see src/Custom/). +namespace ComputeCsharpCustomizations { + model AllInstancesDownWithDummy { + ...AllInstancesDown; + dummy?: string; + } + + model UserInitiatedRedeployWithDummy { + ...UserInitiatedRedeploy; + dummy?: string; + } +} +@@alternateType(AllInstancesDown, + ComputeCsharpCustomizations.AllInstancesDownWithDummy, + "csharp" +); +@@alternateType(UserInitiatedRedeploy, + ComputeCsharpCustomizations.UserInitiatedRedeployWithDummy, + "csharp" +); +// Restore the public type names that the 1.x SDK shipped. +@@clientName(ComputeCsharpCustomizations.AllInstancesDownWithDummy, + "AllInstancesDown", "csharp" ); -@@clientName(AllInstancesDown.automaticallyApprove, - "AutomaticallyApproveAllDown", +@@clientName(ComputeCsharpCustomizations.UserInitiatedRedeployWithDummy, + "UserInitiatedRedeploy", "csharp" ); @@ -638,10 +664,8 @@ using Compute; ); @@clientName(Modes, "HostEndpointSettingsMode", "csharp"); -// NOTE: AllInstancesDown and UserInitiatedRedeploy are safe-flattened by the generator. -// They need a generator option to disable safe-flatten per-type. See issue filed below. -// TODO: @@access(AllInstancesDown, Access.public, "csharp"); -// TODO: @@access(UserInitiatedRedeploy, Access.public, "csharp"); +// (Safe-flatten mitigation for AllInstancesDown / UserInitiatedRedeploy moved +// near the top of this file as @@alternateType wrapper models with a dummy property.) // ── Plural→singular enum renames (C# backward compat) ── @@clientName(CapacityReservationGroupInstanceViewTypes, From 6b53e5d39605eaee2341561c3bc9caeeebefda1c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Sun, 3 May 2026 15:19:36 +0800 Subject: [PATCH 043/103] Revert "Compute: defeat safe-flatten on AllInstancesDown / UserInitiatedRedeploy via @@alternateType wrapper with dummy property" This reverts commit b480404cff75b6ccd44d008805b41fa6a3e7a261. --- .../Compute/Compute/client.tsp | 42 ++++--------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 131f18f3b0fe..6b52776dd566 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -499,39 +499,13 @@ using Compute; "csharp" ); -// AllInstancesDown / UserInitiatedRedeploy are single-property wrapper models. -// The mgmt generator's safe-flatten heuristic eliminates them and inlines the inner -// boolean into ScheduledEventsPolicy, breaking back-compat with the 1.x SDK (which -// exposed them as public wrapper types). Defeat safe-flatten by replacing each -// model with a wrapper variant that has a dummy second property — mirrors the -// `dummyPropertyTwo` swagger transform from the previous AutoRest autorest.md. -// The dummy property is hidden via SDK-side customization (see src/Custom/). -namespace ComputeCsharpCustomizations { - model AllInstancesDownWithDummy { - ...AllInstancesDown; - dummy?: string; - } - - model UserInitiatedRedeployWithDummy { - ...UserInitiatedRedeploy; - dummy?: string; - } -} -@@alternateType(AllInstancesDown, - ComputeCsharpCustomizations.AllInstancesDownWithDummy, - "csharp" -); -@@alternateType(UserInitiatedRedeploy, - ComputeCsharpCustomizations.UserInitiatedRedeployWithDummy, - "csharp" -); -// Restore the public type names that the 1.x SDK shipped. -@@clientName(ComputeCsharpCustomizations.AllInstancesDownWithDummy, - "AllInstancesDown", +// Rename duplicate automaticallyApprove in sub-models to avoid flattening collision +@@clientName(UserInitiatedRedeploy.automaticallyApprove, + "AutomaticallyApproveRedeploy", "csharp" ); -@@clientName(ComputeCsharpCustomizations.UserInitiatedRedeployWithDummy, - "UserInitiatedRedeploy", +@@clientName(AllInstancesDown.automaticallyApprove, + "AutomaticallyApproveAllDown", "csharp" ); @@ -664,8 +638,10 @@ namespace ComputeCsharpCustomizations { ); @@clientName(Modes, "HostEndpointSettingsMode", "csharp"); -// (Safe-flatten mitigation for AllInstancesDown / UserInitiatedRedeploy moved -// near the top of this file as @@alternateType wrapper models with a dummy property.) +// NOTE: AllInstancesDown and UserInitiatedRedeploy are safe-flattened by the generator. +// They need a generator option to disable safe-flatten per-type. See issue filed below. +// TODO: @@access(AllInstancesDown, Access.public, "csharp"); +// TODO: @@access(UserInitiatedRedeploy, Access.public, "csharp"); // ── Plural→singular enum renames (C# backward compat) ── @@clientName(CapacityReservationGroupInstanceViewTypes, From 7336796bdac6d5a6ec221de00ab7da7f5e270ef8 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Sun, 3 May 2026 15:40:20 +0800 Subject: [PATCH 044/103] Compute: opt out of safe-flatten on AllInstancesDown / UserInitiatedRedeploy via @@clientOption("disable-safe-flatten", true, "csharp") Replaces the previous @@clientName collision-renames on .automaticallyApprove. The new generator-side opt-out preserves both wrapper types as part of the public API surface, restoring backward compat with previously shipped Azure.ResourceManager.Compute. See Azure/azure-sdk-for-net#58066. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 6b52776dd566..72dd14073214 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -499,15 +499,15 @@ using Compute; "csharp" ); -// Rename duplicate automaticallyApprove in sub-models to avoid flattening collision -@@clientName(UserInitiatedRedeploy.automaticallyApprove, - "AutomaticallyApproveRedeploy", - "csharp" -); -@@clientName(AllInstancesDown.automaticallyApprove, - "AutomaticallyApproveAllDown", - "csharp" -); +// Disable safe-flatten on AllInstancesDown / UserInitiatedRedeploy so they remain public +// types in the C# SDK (preserves backward compatibility with previously shipped surface). +// See: https://github.com/Azure/azure-sdk-for-net/issues/58066 +#suppress "@azure-tools/typespec-client-generator-core/client-option" "Preserve type for public API surface" +#suppress "@azure-tools/typespec-client-generator-core/client-option-requires-scope" "Preserve type for public API surface" +@@clientOption(UserInitiatedRedeploy, "disable-safe-flatten", true, "csharp"); +#suppress "@azure-tools/typespec-client-generator-core/client-option" "Preserve type for public API surface" +#suppress "@azure-tools/typespec-client-generator-core/client-option-requires-scope" "Preserve type for public API surface" +@@clientOption(AllInstancesDown, "disable-safe-flatten", true, "csharp"); // Resource type rename for backward compatibility - RollingUpgradeStatusInfo → VirtualMachineScaleSetRollingUpgrade @@clientName(RollingUpgradeStatusInfo, @@ -638,11 +638,6 @@ using Compute; ); @@clientName(Modes, "HostEndpointSettingsMode", "csharp"); -// NOTE: AllInstancesDown and UserInitiatedRedeploy are safe-flattened by the generator. -// They need a generator option to disable safe-flatten per-type. See issue filed below. -// TODO: @@access(AllInstancesDown, Access.public, "csharp"); -// TODO: @@access(UserInitiatedRedeploy, Access.public, "csharp"); - // ── Plural→singular enum renames (C# backward compat) ── @@clientName(CapacityReservationGroupInstanceViewTypes, "CapacityReservationGroupInstanceViewType", From 718d48b7c94f47267e07067989e99cef6930104a Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Sun, 3 May 2026 20:15:36 +0800 Subject: [PATCH 045/103] Compute: rename Get{Shared,Community}Gallery -> Get{Shared,Community}GalleryData via @@clientName The previously shipped Azure.ResourceManager.Compute SDK exposes Get{Shared,Community}Gallery[Async] as extension methods returning Response<*Resource>. Those names are now restored via SDK-side customization. Rename the auto-generated singleton getters to *GalleryData so the data-shape and resource-shape overloads coexist without collision in the generated extension classes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/ComputeGallery/client.tsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 89db2c4a15d5..a0d159688800 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -116,7 +116,7 @@ using ComputeGallery; ); // Rename raw gallery operations to match old SDK method names -@@clientName(SharedGalleries.get, "GetSharedGallery", "csharp"); +@@clientName(SharedGalleries.get, "GetSharedGalleryData", "csharp"); @@clientName(SharedGalleries.list, "GetSharedGalleries", "csharp"); @@clientName(SharedGalleryImages.get, "GetSharedGalleryImage", "csharp"); @@clientName(SharedGalleryImages.list, "GetSharedGalleryImages", "csharp"); @@ -128,7 +128,7 @@ using ComputeGallery; "GetSharedGalleryImageVersions", "csharp" ); -@@clientName(CommunityGalleries.get, "GetCommunityGallery", "csharp"); +@@clientName(CommunityGalleries.get, "GetCommunityGalleryData", "csharp"); @@clientName(CommunityGalleryImages.get, "GetCommunityGalleryImage", "csharp"); @@clientName(CommunityGalleryImages.list, "GetCommunityGalleryImages", From 511a846a55f6f0f10bc220d27294ad15d78787f5 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 4 May 2026 13:00:49 +0800 Subject: [PATCH 046/103] Compute: replace deprecated LocationParameter with LocationResourceParameter The ARM common LocationParameter (location: string) is deprecated. Switch all subscription-scoped action operations and the VirtualMachineExtensionImages templated routes to LocationResourceParameter (location: Azure.Core.azureLocation). This restores the AzureLocation parameter type previously emitted by AutoRest for the C# SDK without per-operation @@alternateType decorators. Also restore the previously shipped C# operation name for ResourceSkus.list via @@clientName so it emits GetComputeResourceSkus (was GetAll). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/VirtualMachineExtensionImage.tsp | 2 +- .../Compute/Compute/routes.tsp | 34 +++++++++---------- .../Microsoft.Compute/Compute/client.tsp | 3 ++ 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineExtensionImage.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineExtensionImage.tsp index 7a4c493cfeb7..63e6d290c7f7 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineExtensionImage.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineExtensionImage.tsp @@ -27,7 +27,7 @@ model VirtualMachineExtensionImage alias ImageTypePath = { ...ApiVersionParameter; ...SubscriptionIdParameter; - ...LocationParameter; + ...LocationResourceParameter; #suppress "@azure-tools/typespec-azure-core/documentation-required" @path @segment("publishers") publisherName: string; }; diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/routes.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/routes.tsp index e58bfb73ab69..2a63adaf408a 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/routes.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/routes.tsp @@ -28,7 +28,7 @@ interface UsageOperationGroup { list is ComputeProviderActionSync< Response = ListUsagesResult, Scope = SubscriptionActionScope, - Parameters = LocationParameter + Parameters = LocationResourceParameter >; } @@ -46,7 +46,7 @@ interface VirtualMachineSizesOperationGroup { list is ComputeProviderActionSync< Response = VirtualMachineSizeListResult, Scope = SubscriptionActionScope, - Parameters = LocationParameter + Parameters = LocationResourceParameter >; } @@ -64,7 +64,7 @@ interface VirtualMachineScaleSetsOperationGroup { listByLocation is ComputeProviderActionSync< Response = VirtualMachineScaleSetListResult, Scope = SubscriptionActionScope, - Parameters = LocationParameter + Parameters = LocationResourceParameter >; } @@ -82,7 +82,7 @@ interface VirtualMachinesOperationGroup { listByLocation is ComputeProviderActionSync< Response = VirtualMachineListResult, Scope = SubscriptionActionScope, - Parameters = LocationParameter + Parameters = LocationResourceParameter >; } @@ -100,7 +100,7 @@ interface VirtualMachineImagesEdgeZoneOperationGroup { Response = ArmResponse, Scope = SubscriptionActionScope, Parameters = { - ...LocationParameter; + ...LocationResourceParameter; /** * The name of the edge zone. @@ -122,7 +122,7 @@ interface VirtualMachineImagesEdgeZoneOperationGroup { Response = ArmResponse, Scope = SubscriptionActionScope, Parameters = { - ...LocationParameter; + ...LocationResourceParameter; /** * The name of the edge zone. @@ -151,7 +151,7 @@ interface VirtualMachineImagesEdgeZoneOperationGroup { Response = ArmResponse, Scope = SubscriptionActionScope, Parameters = { - ...LocationParameter; + ...LocationResourceParameter; /** * The name of the edge zone. @@ -194,7 +194,7 @@ interface VirtualMachineImagesEdgeZoneOperationGroup { Response = ArmResponse, Scope = SubscriptionActionScope, Parameters = { - ...LocationParameter; + ...LocationResourceParameter; /** * The name of the edge zone. @@ -309,7 +309,7 @@ interface VirtualMachineImagesOperationGroup { Response = VmImagesInEdgeZoneListResult, Scope = SubscriptionActionScope, Parameters = { - ...LocationParameter; + ...LocationResourceParameter; /** * The name of the edge zone. @@ -330,7 +330,7 @@ interface VirtualMachineImagesOperationGroup { listPublishers is ComputeProviderActionSync< Response = ArmResponse, Scope = SubscriptionActionScope, - Parameters = LocationParameter + Parameters = LocationResourceParameter >; /** * Gets a list of virtual machine image offers for the specified location and publisher. @@ -344,7 +344,7 @@ interface VirtualMachineImagesOperationGroup { Response = ArmResponse, Scope = SubscriptionActionScope, Parameters = { - ...LocationParameter; + ...LocationResourceParameter; /** * A valid image publisher. @@ -366,7 +366,7 @@ interface VirtualMachineImagesOperationGroup { Response = ArmResponse, Scope = SubscriptionActionScope, Parameters = { - ...LocationParameter; + ...LocationResourceParameter; /** * A valid image publisher. @@ -402,7 +402,7 @@ interface VirtualMachineImagesOperationGroup { Response = ArmResponse, Scope = SubscriptionActionScope, Parameters = { - ...LocationParameter; + ...LocationResourceParameter; /** * A valid image publisher. @@ -455,7 +455,7 @@ interface VirtualMachineImagesOperationGroup { @get listWithProperties( ...Azure.ResourceManager.Foundations.DefaultBaseParameters, - ...LocationParameter, + ...LocationResourceParameter, /** * A valid image publisher. @@ -548,7 +548,7 @@ interface LogAnalyticsOperationGroup { LroHeaders = ArmAsyncOperationHeader & Azure.Core.Foundations.RetryAfterHeader, Scope = SubscriptionActionScope, - Parameters = LocationParameter, + Parameters = LocationResourceParameter, Request = RequestRateByIntervalInput >; /** @@ -564,7 +564,7 @@ interface LogAnalyticsOperationGroup { LroHeaders = ArmAsyncOperationHeader & Azure.Core.Foundations.RetryAfterHeader, Scope = SubscriptionActionScope, - Parameters = LocationParameter, + Parameters = LocationResourceParameter, Request = ThrottledRequestsInput >; } @@ -583,7 +583,7 @@ interface VirtualMachineRunCommandsOperationGroup { list is ComputeProviderActionSync< Response = RunCommandListResult, Scope = SubscriptionActionScope, - Parameters = LocationParameter + Parameters = LocationResourceParameter >; /** * Gets specific run command for a subscription in a location. diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 3d6e32261659..43134a10ab74 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -169,3 +169,6 @@ namespace ComputeCombine; "GetSoftDeletedResourcesByArtifactName", "csharp" ); + +// ── C# operation rename: ResourceSkus.list emits `GetAll`; restore baseline name. ── +@@clientName(ComputeSku.ResourceSkus.list, "GetComputeResourceSkus", "csharp"); From d0d1903abdaedc886a9ae25a2d4ed98fd017de1e Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 4 May 2026 16:13:23 +0800 Subject: [PATCH 047/103] Compute: retype Usage.unit via @@alternateType for csharp ApiCompat The current spec types Usage.unit as the string-literal `Count`, which makes the C# emitter generate a plain `string` property. Azure.ResourceManager.Compute 1.13.1 shipped this as the extensible-enum `ComputeUsageUnit`, so retype the property via @@alternateType so the C# emitter generates the struct (with == / != operators) and uses it as the property type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 72dd14073214..fe06fa5929ab 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -1301,3 +1301,18 @@ union PassName { ); @@clientName(VirtualMachineSizeTypes.Standard_ND24s, "StandardND24S", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_ND6s, "StandardND6S", "csharp"); + + +// .NET back-compat: 1.13.1 shipped Usage.Unit as the extensible-enum +// `ComputeUsageUnit`. The current spec narrows it to the string-literal +// `"Count"`, which would emit a plain `string` property and break ApiCompat. +// Retype it to a string-backed union so the C# emitter generates the +// extensible-enum struct (with == / != operators) and uses it as the +// property type. +union ComputeUsageUnit { + string, + + /** The unit of measurement is a count. */ + Count: "Count", +} +@@alternateType(Compute.Usage.unit, ComputeUsageUnit, "csharp"); From ccfeb43c8ade875c3c9c7855474c24e9761eee65 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 4 May 2026 16:32:11 +0800 Subject: [PATCH 048/103] Compute: rename ComputeGalleryEndpointType.IMDS to Imds for csharp Azure.ResourceManager.Compute 1.13.1 shipped this enum member as `Imds` (PascalCase). Add a member-level @@clientName so the C# emitter restores the shipped name without altering the wire value (`IMDS`). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/ComputeGallery/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index a0d159688800..8054346c84da 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -145,6 +145,7 @@ using ComputeGallery; // Type renames for backward compatibility @@clientName(EndpointTypes, "ComputeGalleryEndpointType", "csharp"); +@@clientName(EndpointTypes.IMDS, "Imds", "csharp"); @@clientName(GallerySoftDeletedResource, "GallerySoftDeletedResourceDetails", "csharp" From 03022f2338c2cb39d79232eb6fba63429facaba9 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 4 May 2026 17:01:22 +0800 Subject: [PATCH 049/103] Compute: restore previously shipped acronym/casing for extensible-enum members (Bucket E) Adds @@clientName for 48 enum members across DiskStorageAccountTypes, SnapshotStorageAccountTypes, DiskSecurityTypes, DiskState, FileFormat, SupportedSecurityOption, StorageAccountTypes, SecurityTypes, SecurityEncryptionTypes, DiskControllerTypes, VirtualMachineScaleSetScaleInRules, ExpandTypesForGetCapacityReservationGroups, StorageAccountType (gallery), EdgeZoneStorageAccountType, ConfidentialVMEncryptionType, PolicyViolationCategory, and StorageAccountStrategy. Restores names like `StandardLrs` (was `StandardLRS`), `Vhd` (was `VHD`), `ConfidentialVm` (was `ConfidentialVM`), etc. NetworkApiVersion underscore names are handled separately via SDK customization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 29 ++++++++++++++ .../Compute/ComputeDisk/client.tsp | 39 +++++++++++++++++++ .../Compute/ComputeGallery/client.tsp | 22 +++++++++++ 3 files changed, 90 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index fe06fa5929ab..25c5df2c0bf9 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -1316,3 +1316,32 @@ union ComputeUsageUnit { Count: "Count", } @@alternateType(Compute.Usage.unit, ComputeUsageUnit, "csharp"); + + +// .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. +@@clientName(StorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(StorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); +@@clientName(StorageAccountTypes.StandardSSD_LRS, "StandardSsdLrs", "csharp"); +@@clientName(StorageAccountTypes.UltraSSD_LRS, "UltraSsdLrs", "csharp"); +@@clientName(StorageAccountTypes.Premium_ZRS, "PremiumZrs", "csharp"); +@@clientName(StorageAccountTypes.StandardSSD_ZRS, "StandardSsdZrs", "csharp"); +@@clientName(StorageAccountTypes.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); + +@@clientName(SecurityTypes.ConfidentialVM, "ConfidentialVm", "csharp"); + +@@clientName(SecurityEncryptionTypes.VMGuestStateOnly, "VmGuestStateOnly", "csharp"); +@@clientName(SecurityEncryptionTypes.DiskWithVMGuestState, "DiskWithVmGuestState", "csharp"); + +@@clientName(DiskControllerTypes.SCSI, "Scsi", "csharp"); + +@@clientName(VirtualMachineScaleSetScaleInRules.OldestVM, "OldestVm", "csharp"); +@@clientName(VirtualMachineScaleSetScaleInRules.NewestVM, "NewestVm", "csharp"); + +@@clientName(ExpandTypesForGetCapacityReservationGroups.`virtualMachineScaleSetVMs/$ref`, + "VirtualMachineScaleSetVmsRef", + "csharp" +); +@@clientName(ExpandTypesForGetCapacityReservationGroups.`virtualMachines/$ref`, + "VirtualMachinesRef", + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 66c8f220f517..a1955d64c6af 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -193,3 +193,42 @@ using ComputeDisk; @@Azure.ClientGenerator.Core.Legacy.markAsPageable(DiskAccesses.getPrivateLinkResources, "csharp" ); + + +// .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. +@@clientName(DiskStorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(DiskStorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); +@@clientName(DiskStorageAccountTypes.StandardSSD_LRS, "StandardSsdLrs", "csharp"); +@@clientName(DiskStorageAccountTypes.UltraSSD_LRS, "UltraSsdLrs", "csharp"); +@@clientName(DiskStorageAccountTypes.Premium_ZRS, "PremiumZrs", "csharp"); +@@clientName(DiskStorageAccountTypes.StandardSSD_ZRS, "StandardSsdZrs", "csharp"); +@@clientName(DiskStorageAccountTypes.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); + +@@clientName(SnapshotStorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(SnapshotStorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); +@@clientName(SnapshotStorageAccountTypes.Standard_ZRS, "StandardZrs", "csharp"); + +@@clientName(DiskSecurityTypes.ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey, + "ConfidentialVmGuestStateOnlyEncryptedWithPlatformKey", + "csharp" +); +@@clientName(DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithPlatformKey, + "ConfidentialVmDiskEncryptedWithPlatformKey", + "csharp" +); +@@clientName(DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithCustomerKey, + "ConfidentialVmDiskEncryptedWithCustomerKey", + "csharp" +); +@@clientName(DiskSecurityTypes.ConfidentialVM_NonPersistedTPM, "ConfidentialVmNonPersistedTPM", "csharp"); + +@@clientName(DiskState.ActiveSAS, "ActiveSas", "csharp"); +@@clientName(DiskState.ActiveSASFrozen, "ActiveSasFrozen", "csharp"); + +@@clientName(FileFormat.VHD, "Vhd", "csharp"); +@@clientName(FileFormat.VHDX, "Vhdx", "csharp"); + +@@clientName(SupportedSecurityOption.TrustedLaunchAndConfidentialVMSupported, + "TrustedLaunchAndConfidentialVmSupported", + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 8054346c84da..809b6e83abf0 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -298,3 +298,25 @@ using ComputeGallery; Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); + + +// .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. +@@clientName(StorageAccountType.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(StorageAccountType.Standard_ZRS, "StandardZrs", "csharp"); +@@clientName(StorageAccountType.Premium_LRS, "PremiumLrs", "csharp"); +@@clientName(StorageAccountType.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); + +@@clientName(EdgeZoneStorageAccountType.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(EdgeZoneStorageAccountType.Standard_ZRS, "StandardZrs", "csharp"); +@@clientName(EdgeZoneStorageAccountType.StandardSSD_LRS, "StandardSsdLrs", "csharp"); +@@clientName(EdgeZoneStorageAccountType.Premium_LRS, "PremiumLrs", "csharp"); + +@@clientName(ConfidentialVMEncryptionType.EncryptedVMGuestStateOnlyWithPmk, + "EncryptedVmGuestStateOnlyWithPmk", + "csharp" +); + +@@clientName(PolicyViolationCategory.IpTheft, "IPTheft", "csharp"); + +@@clientName(StorageAccountStrategy.PreferStandard_ZRS, "PreferStandardZrs", "csharp"); +@@clientName(StorageAccountStrategy.DefaultStandard_LRS, "DefaultStandardLrs", "csharp"); From 34a840f6acc88d27399ef9f749d0237a2d4ff337 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 4 May 2026 17:06:36 +0800 Subject: [PATCH 050/103] Add @@clientName for NetworkApiVersion members for csharp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 25c5df2c0bf9..afae9462a754 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -36,6 +36,8 @@ using Compute; "TwoThousandTwentyTwo1101", "go, javascript" ); +@@clientName(NetworkApiVersion.`2020-11-01`, "V20201101", "csharp"); +@@clientName(NetworkApiVersion.`2022-11-01`, "V20221101", "csharp"); @@alternateType(VirtualMachineScaleSetStorageProfile.diskControllerType, string, From 756965163e34e6057a83b0ffb152b263aa2e602b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 4 May 2026 18:13:15 +0800 Subject: [PATCH 051/103] Compute: consolidate Architecture/HyperVGeneration/IPVersion duplicate enums for csharp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/client.tsp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 43134a10ab74..b4a6bb67ca3b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -8,6 +8,7 @@ import "./alternate-type-stubs.tsp"; using Azure.ClientGenerator.Core; using Common; using Compute; +using ComputeDisk; using ComputeGallery; using ComputeSku; @@ -144,6 +145,23 @@ namespace ComputeCombine; // NOTE: Common.Architecture → ArchitectureType is handled by auto-rename of Compute.ArchitectureTypes → ArchitectureType +// ── Consolidate duplicate enums into the C# baseline names (G1) ── +// Baseline shipped a single ArchitectureType / HyperVGeneration / IPVersion; +// the spec splits them into multiple unions. Retype the minority-enum properties +// to the canonical union so the C# SDK exposes a single type per concept. +@@alternateType(ComputeDisk.SupportedCapabilities.architecture, Compute.ArchitectureTypes, "csharp"); +@@alternateType(ComputeGallery.GalleryImageProperties.architecture, Compute.ArchitectureTypes, "csharp"); +@@alternateType(ComputeGallery.SharedGalleryImageProperties.architecture, Compute.ArchitectureTypes, "csharp"); +@@alternateType(ComputeGallery.CommunityGalleryImageProperties.architecture, Compute.ArchitectureTypes, "csharp"); + +@@alternateType(Compute.VirtualMachineImageProperties.hyperVGeneration, Common.HyperVGeneration, "csharp"); +@@alternateType(Compute.ImageProperties.hyperVGeneration, Common.HyperVGeneration, "csharp"); +@@alternateType(Compute.RestorePointSourceMetadata.hyperVGeneration, Common.HyperVGeneration, "csharp"); +@@alternateType(Compute.VirtualMachineInstanceView.hyperVGeneration, Common.HyperVGeneration, "csharp"); + +@@alternateType(Compute.VirtualMachineNetworkInterfaceIPConfigurationProperties.privateIPAddressVersion, Compute.IPVersion, "csharp"); +@@alternateType(Compute.VirtualMachinePublicIPAddressConfigurationProperties.publicIPAddressVersion, Compute.IPVersion, "csharp"); + // ── C# operation renames for backward compatibility (migration from AutoRest) ── // These mirror the override-operation-name entries from the deleted autorest.md. @@clientName(Compute.VirtualMachines.start, "PowerOn", "csharp"); From dd7c9c98b86ea08219f66963ca115d4116efee28 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 4 May 2026 18:46:58 +0800 Subject: [PATCH 052/103] Compute G2: alternateType location/resourceType narrowed-to-string properties Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/client.tsp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index b4a6bb67ca3b..05e33da67052 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -162,6 +162,19 @@ namespace ComputeCombine; @@alternateType(Compute.VirtualMachineNetworkInterfaceIPConfigurationProperties.privateIPAddressVersion, Compute.IPVersion, "csharp"); @@alternateType(Compute.VirtualMachinePublicIPAddressConfigurationProperties.publicIPAddressVersion, Compute.IPVersion, "csharp"); +// ── G2: location / resourceType narrowed to string in spec; restore Azure.Core.azureLocation/armResourceType ── +@@alternateType(ComputeSku.ResourceSku.locations, Azure.Core.azureLocation[], "csharp"); +@@alternateType(ComputeSku.ResourceSkuRestrictionInfo.locations, Azure.Core.azureLocation[], "csharp"); +@@alternateType(ComputeSku.ResourceSkuLocationInfo.location, Azure.Core.azureLocation, "csharp"); +@@alternateType(ComputeDisk.DiskRestorePointProperties.sourceResourceLocation, Azure.Core.azureLocation, "csharp"); +@@alternateType(ComputeGallery.PirResource.location, Azure.Core.azureLocation, "csharp"); +@@alternateType(ComputeGallery.PirCommunityGalleryResource.location, Azure.Core.azureLocation, "csharp"); +@@alternateType(Compute.RestorePointCollectionSourceProperties.location, Azure.Core.azureLocation, "csharp"); +@@alternateType(Compute.RestorePointSourceMetadata.location, Azure.Core.azureLocation, "csharp"); +@@alternateType(Compute.UpgradeOperationHistoricalStatusInfo.location, Azure.Core.azureLocation, "csharp"); +@@alternateType(Compute.VirtualMachineScaleSetVMExtension.location, Azure.Core.azureLocation, "csharp"); +@@alternateType(Compute.VirtualMachineScaleSetSku.resourceType, Azure.Core.armResourceType, "csharp"); + // ── C# operation renames for backward compatibility (migration from AutoRest) ── // These mirror the override-operation-name entries from the deleted autorest.md. @@clientName(Compute.VirtualMachines.start, "PowerOn", "csharp"); From fd8de6c68d7d58af0da814efebfc9235df19398f Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 4 May 2026 20:49:13 +0800 Subject: [PATCH 053/103] Compute G5: clientName protectedSettingsFromKeyVault -> keyVaultProtectedSettings (csharp) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 05e33da67052..a5b937aff63c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -175,6 +175,13 @@ namespace ComputeCombine; @@alternateType(Compute.VirtualMachineScaleSetVMExtension.location, Azure.Core.azureLocation, "csharp"); @@alternateType(Compute.VirtualMachineScaleSetSku.resourceType, Azure.Core.armResourceType, "csharp"); +// ── G5: rename `protectedSettingsFromKeyVault` → `keyVaultProtectedSettings` (csharp only) so the generated +// property matches the previously-shipped name `KeyVaultProtectedSettings` of type KeyVaultSecretReference. +// A separate partial-class shim restores the deprecated BinaryData `ProtectedSettingsFromKeyVault` member. +@@clientName(Compute.VirtualMachineExtensionProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); +@@clientName(Compute.VirtualMachineExtensionUpdateProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); +@@clientName(Compute.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); + // ── C# operation renames for backward compatibility (migration from AutoRest) ── // These mirror the override-operation-name entries from the deleted autorest.md. @@clientName(Compute.VirtualMachines.start, "PowerOn", "csharp"); From 3f11e2445abd22c740ba51b371fe0d8c7a0abf24 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 4 May 2026 22:17:41 +0800 Subject: [PATCH 054/103] Compute G8: alternateType for Disk.managedByExtended -> armResourceIdentifier[] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/ComputeDisk/client.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index a1955d64c6af..61097894c75f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -103,7 +103,7 @@ using ComputeDisk; // Disk @@alternateType(Disk.managedBy, Azure.Core.armResourceIdentifier, "csharp"); @@alternateType(Disk.managedByExtended, - Azure.Core.armResourceIdentifier, + Azure.Core.armResourceIdentifier[], "csharp" ); @@alternateType(DiskProperties.diskAccessId, From defe3a93b620f822e1f38250eeba9809955c127c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 08:52:39 +0800 Subject: [PATCH 055/103] G7: rename source -> gallerySource on GalleryDiskImage / GalleryImageVersionStorageProfile (csharp) --- .../Microsoft.Compute/Compute/client.tsp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index a5b937aff63c..86e2ab19e871 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -182,6 +182,17 @@ namespace ComputeCombine; @@clientName(Compute.VirtualMachineExtensionUpdateProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); @@clientName(Compute.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); +// ── G7: rename `source` → `gallerySource` (csharp only) on GalleryDiskImage and GalleryImageVersionStorageProfile +// so the generated property matches the previously-shipped name `GallerySource` of the discriminator-typed +// property. A separate partial-class shim restores the deprecated base-typed `Source` member that backed +// the previous AutoRest `source: GallerySource` rename-mapping directive. +@@clientName(ComputeGallery.GalleryDiskImage.source, "gallerySource", "csharp"); +@@clientName(ComputeGallery.GalleryImageVersionStorageProfile.source, "gallerySource", "csharp"); +// ── G7: rename GalleryDiskImageSource.uri → sourceUri (csharp only) to avoid collision with the +// previously-shipped virtual `Uri` (System.Uri) accessor on the GalleryArtifactVersionSource base. +// The base accessor is restored as a partial-class shim for backward compatibility with v1.14.0. +@@clientName(ComputeGallery.GalleryDiskImageSource.uri, "sourceUri", "csharp"); + // ── C# operation renames for backward compatibility (migration from AutoRest) ── // These mirror the override-operation-name entries from the deleted autorest.md. @@clientName(Compute.VirtualMachines.start, "PowerOn", "csharp"); From 26a266b71230bfe2d222b2b5fc9b7362b00f1b3d Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 09:39:44 +0800 Subject: [PATCH 056/103] Compute L3: clientName decorators for v1.14.0 baseline property names - LinuxConfiguration.enableVMAgentPlatformUpdates -> IsVmAgentPlatformUpdatesEnabled - LinuxConfiguration.disablePasswordAuthentication -> IsPasswordAuthenticationDisabled - WindowsConfiguration.enableAutomaticUpdates -> IsAutomaticUpdatesEnabled - ResiliencyPolicy.resilientVMCreationPolicy/resilientVMDeletionPolicy -> Vm casing - GalleryArtifactPublishingProfileBase/Shared/CommunityGalleryImageVersionProperties.excludeFromLatest -> IsExcludedFromLatest - GalleryImageVersionProperties.restore: IsRestoreEnabled -> Restore --- .../Compute/Compute/client.tsp | 20 ++++++++++++++++++- .../Compute/ComputeGallery/client.tsp | 14 +++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index afae9462a754..cd8b36027708 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -789,10 +789,28 @@ using Compute; "csharp" ); @@clientName(LinuxConfiguration.enableVMAgentPlatformUpdates, - "EnableVmAgentPlatformUpdates", + "IsVmAgentPlatformUpdatesEnabled", + "csharp" +); +@@clientName(LinuxConfiguration.disablePasswordAuthentication, + "IsPasswordAuthenticationDisabled", "csharp" ); @@clientName(LinuxConfiguration.provisionVMAgent, "ProvisionVmAgent", "csharp"); +@@clientName(WindowsConfiguration.enableAutomaticUpdates, + "IsAutomaticUpdatesEnabled", + "csharp" +); +// Rename the nested-model parent properties so the auto-flattened C# names +// become ResilientVm... instead of ResilientVM... (matches v1.14.0 baseline). +@@clientName(ResiliencyPolicy.resilientVMCreationPolicy, + "resilientVmCreationPolicy", + "csharp" +); +@@clientName(ResiliencyPolicy.resilientVMDeletionPolicy, + "resilientVmDeletionPolicy", + "csharp" +); @@clientName(WindowsConfiguration.provisionVMAgent, "ProvisionVmAgent", "csharp" diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 809b6e83abf0..f617d9807e78 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -226,10 +226,20 @@ using ComputeGallery; "csharp" ); @@clientName(TargetRegion.excludeFromLatest, "IsExcludedFromLatest", "csharp"); -@@clientName(GalleryImageVersionProperties.restore, - "IsRestoreEnabled", +@@clientName(GalleryArtifactPublishingProfileBase.excludeFromLatest, + "IsExcludedFromLatest", "csharp" ); +@@clientName(SharedGalleryImageVersionProperties.excludeFromLatest, + "IsExcludedFromLatest", + "csharp" +); +@@clientName(CommunityGalleryImageVersionProperties.excludeFromLatest, + "IsExcludedFromLatest", + "csharp" +); +// Match v1.14.0 baseline: property is `Restore` (no Is* prefix). +@@clientName(GalleryImageVersionProperties.restore, "Restore", "csharp"); // ── Qualified property name renames (C# backward compat) ── @@clientName(GalleryApplicationCustomActionParameter.type, From 5a34ea8ba47cae4178aab9dba4feea91295e4308 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 10:26:05 +0800 Subject: [PATCH 057/103] Compute L3 batch 2: clientName Placement.zonePlacementPolicy to ZonePlacementPolicyType for csharp --- .../Microsoft.Compute/Compute/Compute/client.tsp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index cd8b36027708..2995fa20773a 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -47,6 +47,10 @@ using Compute; string, "go" ); +@@clientName(Placement.zonePlacementPolicy, + "ZonePlacementPolicyType", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_B1ms, "StandardB1Ms", "go"); @@clientName(VirtualMachineSizeTypes.Standard_B2ms, "StandardB2Ms", "go"); From 3f0192e96f8c2b795f13c53d2feeb9f7bc2189d2 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 11:27:23 +0800 Subject: [PATCH 058/103] Compute L3 batch 3: clientName diskControllerType to DiskControllerKind for csharp --- .../Microsoft.Compute/Compute/Compute/client.tsp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 2995fa20773a..13ea9643ea56 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -51,6 +51,14 @@ using Compute; "ZonePlacementPolicyType", "csharp" ); +@@clientName(VirtualMachineScaleSetStorageProfile.diskControllerType, + "DiskControllerKind", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateStorageProfile.diskControllerType, + "DiskControllerKind", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_B1ms, "StandardB1Ms", "go"); @@clientName(VirtualMachineSizeTypes.Standard_B2ms, "StandardB2Ms", "go"); From aa6365567c96b563a691f1d4b1ae611af9e66f77 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 11:43:57 +0800 Subject: [PATCH 059/103] Compute L3 batch 4: clientName GalleryTargetExtendedLocation.storageAccountType to GalleryStorageAccountType for csharp --- .../Microsoft.Compute/Compute/ComputeGallery/client.tsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index f617d9807e78..6198d4956600 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -25,6 +25,11 @@ using ComputeGallery; @@clientName(CommunityGalleryImageProperties.osType, "OSType", "csharp"); @@clientName(CommunityGalleryImageProperties.osState, "OSState", "csharp"); +@@clientName(GalleryTargetExtendedLocation.storageAccountType, + "GalleryStorageAccountType", + "csharp" +); + // C# enum singular←plural rename @@clientName(SharedToValues, "SharedToValue", "csharp"); From e911aa11481ca99b57be761cb9b301e0002ee4ac Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 13:01:18 +0800 Subject: [PATCH 060/103] Compute L3 batch 5: AdditionalProperties bag for 4 models via alternateType+Record --- .../Compute/Compute/client.tsp | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 13ea9643ea56..7b14df41657f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -60,6 +60,106 @@ using Compute; "csharp" ); +// ---------------------------------------------------------------------------- +// AdditionalProperties bag preservation (csharp only). +// +// The previous AutoRest-based Compute SDK shipped `IDictionary +// AdditionalProperties` on a handful of models. That property was *not* in the +// Swagger schema; it came from this directive in main's autorest.md: +// +// # add additionalproperties to a few models to support private properties +// # supported by the service +// - from: ComputeRP.json +// where: $.definitions +// transform: > +// $.VirtualMachineScaleSetProperties.additionalProperties = true; +// $.VirtualMachineScaleSetVMProperties.additionalProperties = true; +// $.UpgradePolicy.additionalProperties = true; +// - from: ComputeRP.json +// where: $.definitions.VMSizeProperties +// transform: > +// $.additionalProperties = true; +// +// The Compute service can return undocumented "private" properties on these +// models that the SDK must round-trip. Removing the bag would silently drop +// those values, so we must preserve it here. +// +// TypeSpec equivalent of `additionalProperties: true` is spreading +// `Record`. We can't add the spread directly to the original model +// (the spec is shared with other languages that historically did NOT expose +// the bag), so we declare a csharp-only wrapper that re-spreads the original +// plus `Record`, then swap it in via @@alternateType for csharp. +// ---------------------------------------------------------------------------- +/** + * Describes an upgrade policy - automatic, manual, or rolling. + */ +model UpgradePolicyWithAdditionalProperties { + ...UpgradePolicy; + ...Record; +} +@@alternateType(UpgradePolicy, + UpgradePolicyWithAdditionalProperties, + "csharp" +); +// Preserve the legacy C# names; the original rename-mapping in main's +// autorest.md was: +// UpgradePolicy: VirtualMachineScaleSetUpgradePolicy +// VMSizeProperties: VirtualMachineSizeProperties +// VirtualMachineScaleSetVMProperties: VirtualMachineScaleSetVmProperties +// VirtualMachineScaleSetProperties keeps its name verbatim. +@@clientName(UpgradePolicyWithAdditionalProperties, + "VirtualMachineScaleSetUpgradePolicy", + "csharp" +); + +/** + * Describes the properties of a Virtual Machine Scale Set. + */ +model VirtualMachineScaleSetPropertiesWithAdditionalProperties { + ...VirtualMachineScaleSetProperties; + ...Record; +} +@@alternateType(VirtualMachineScaleSetProperties, + VirtualMachineScaleSetPropertiesWithAdditionalProperties, + "csharp" +); +@@clientName(VirtualMachineScaleSetPropertiesWithAdditionalProperties, + "VirtualMachineScaleSetProperties", + "csharp" +); + +/** + * Describes the properties of a virtual machine scale set virtual machine. + */ +model VirtualMachineScaleSetVMPropertiesWithAdditionalProperties { + ...VirtualMachineScaleSetVMProperties; + ...Record; +} +@@alternateType(VirtualMachineScaleSetVMProperties, + VirtualMachineScaleSetVMPropertiesWithAdditionalProperties, + "csharp" +); +@@clientName(VirtualMachineScaleSetVMPropertiesWithAdditionalProperties, + "VirtualMachineScaleSetVmProperties", + "csharp" +); + +/** + * Specifies VM Size Property settings on the virtual machine. + */ +model VMSizePropertiesWithAdditionalProperties { + ...VMSizeProperties; + ...Record; +} +@@alternateType(VMSizeProperties, + VMSizePropertiesWithAdditionalProperties, + "csharp" +); +@@clientName(VMSizePropertiesWithAdditionalProperties, + "VirtualMachineSizeProperties", + "csharp" +); + @@clientName(VirtualMachineSizeTypes.Standard_B1ms, "StandardB1Ms", "go"); @@clientName(VirtualMachineSizeTypes.Standard_B2ms, "StandardB2Ms", "go"); @@clientName(VirtualMachineSizeTypes.Standard_B4ms, "StandardB4Ms", "go"); From 7061885a30e41944a05120ac0ca4600286ac5a18 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 13:42:54 +0800 Subject: [PATCH 061/103] Compute L3 batch 6: GallerySoftDeletedResourceProperties.softDeletedTime -> SoftDeletedOn (date-time) for csharp --- .../Compute/ComputeGallery/client.tsp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 6198d4956600..3969496377d6 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -30,6 +30,19 @@ using ComputeGallery; "csharp" ); +// Main's autorest.md re-typed `softDeletedTime` from string -> date-time: +// GallerySoftDeletedResource.properties.softDeletedTime: -|date-time +// and the AutoRest naming convention then renamed `Time` -> `On`. +// Spec keeps it as `string`; mirror the legacy C# shape for back-compat. +@@alternateType(GallerySoftDeletedResourceProperties.softDeletedTime, + utcDateTime, + "csharp" +); +@@clientName(GallerySoftDeletedResourceProperties.softDeletedTime, + "softDeletedOn", + "csharp" +); + // C# enum singular←plural rename @@clientName(SharedToValues, "SharedToValue", "csharp"); From 605d89a369a3479e7506d755cbb2fc1ce78f6a15 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 14:29:47 +0800 Subject: [PATCH 062/103] Compute: @@usage(Usage.input, csharp) on 10 output-only models Restores public parameterless ctor + property setters previously shipped via AutoRest. TypeSpec defaults these to Output usage which removes both. Models: DiskRestorePoint, VirtualMachineImage, VirtualMachineImageResource, VirtualMachineExtensionImage, VirtualMachineImageFeature, ImageDeprecationStatus, AlternativeOption, PurchasePlan, SubResourceWithColocationStatus, GallerySoftDeletedResource. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 13 +++++++++++++ .../Compute/ComputeDisk/client.tsp | 4 ++++ .../Compute/ComputeGallery/client.tsp | 5 +++++ 3 files changed, 22 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index 7b14df41657f..d08f2e78b175 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -1477,3 +1477,16 @@ union ComputeUsageUnit { "VirtualMachinesRef", "csharp" ); + +// ── Azure.ClientGenerator.Core.Usage.input forces public ctor + property setters on output-only models ── +// .NET back-compat: these models previously shipped (via AutoRest) with a public +// parameterless ctor and writable properties. TypeSpec's default Output-only usage +// removes both. Force Azure.ClientGenerator.Core.Usage.input for csharp to restore the legacy surface. +@@usage(VirtualMachineImage, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(VirtualMachineImageResource, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(VirtualMachineExtensionImage, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(VirtualMachineImageFeature, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(ImageDeprecationStatus, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(AlternativeOption, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(PurchasePlan, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(SubResourceWithColocationStatus, Azure.ClientGenerator.Core.Usage.input, "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 61097894c75f..2bec830b5465 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -118,6 +118,10 @@ using ComputeDisk; ); // DiskRestorePoint +// .NET back-compat: previously shipped DiskRestorePointData with a public ctor and +// settable properties. TypeSpec's default usage flags this as output-only, which +// removes both. Forcing Azure.ClientGenerator.Core.Usage.input restores the public ctor + property setters. +@@usage(DiskRestorePoint, Azure.ClientGenerator.Core.Usage.input, "csharp"); @@alternateType(DiskRestorePointProperties.diskAccessId, Azure.Core.armResourceIdentifier, "csharp" diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index 3969496377d6..cc5a0ab16eda 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -348,3 +348,8 @@ using ComputeGallery; @@clientName(StorageAccountStrategy.PreferStandard_ZRS, "PreferStandardZrs", "csharp"); @@clientName(StorageAccountStrategy.DefaultStandard_LRS, "DefaultStandardLrs", "csharp"); + +// ── Azure.ClientGenerator.Core.Usage.input forces public ctor + property setters on output-only models ── +// .NET back-compat: GallerySoftDeletedResource previously shipped with a public +// parameterless ctor and writable properties. Restore via Azure.ClientGenerator.Core.Usage.input for csharp. +@@usage(GallerySoftDeletedResource, Azure.ClientGenerator.Core.Usage.input, "csharp"); From de8abfd6fedfe2fbb554dd5d64382df016780ca8 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 15:26:54 +0800 Subject: [PATCH 063/103] Compute: add @@usage(Usage.input) on RollingUpgradeStatusInfo for csharp Restores public ctor + writable setters on RollingUpgradeStatusInfo, which was being generated as output-only causing K1 ApiCompat breaks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/Compute/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index d08f2e78b175..7c67977b339f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -1490,3 +1490,4 @@ union ComputeUsageUnit { @@usage(AlternativeOption, Azure.ClientGenerator.Core.Usage.input, "csharp"); @@usage(PurchasePlan, Azure.ClientGenerator.Core.Usage.input, "csharp"); @@usage(SubResourceWithColocationStatus, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(RollingUpgradeStatusInfo, Azure.ClientGenerator.Core.Usage.input, "csharp"); From 7bb2c4ca149b8e3cc57b87138c4007840b8ecf06 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 5 May 2026 16:20:49 +0800 Subject: [PATCH 064/103] =?UTF-8?q?Compute:=20rename=20PirCommunityGallery?= =?UTF-8?q?Resource.type=20=E2=86=92=20ResourceType=20(csharp)=20and=20ret?= =?UTF-8?q?ype=20to=20armResourceType=20for=20SDK=20back-compat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Microsoft.Compute/Compute/ComputeGallery/client.tsp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index cc5a0ab16eda..a0a3477d91be 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -317,6 +317,15 @@ using ComputeGallery; "csharp" ); +// ── PirCommunityGalleryResource.type: rename + retype for C# back-compat ── +// Spec emits `type?: string`. The previously shipped C# SDK exposed it as +// `ResourceType` of type `Azure.Core.ResourceType?`. Restore both. +@@clientName(PirCommunityGalleryResource.type, "ResourceType", "csharp"); +@@alternateType(PirCommunityGalleryResource.type, + Azure.Core.armResourceType, + "csharp" +); + // ── alternateType: Identity → ManagedServiceIdentity for C# ── @@alternateType(Gallery.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, From 2fa0812c2826840503e48a27fd7f445c2a72be36 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 6 May 2026 09:42:21 +0800 Subject: [PATCH 065/103] Rename PirCommunityGalleryResource.identifier and PirSharedGalleryResource.identifier to galleryIdentifier (csharp) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/ComputeGallery/client.tsp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp index a0a3477d91be..5a8ad4727c0b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp @@ -173,10 +173,18 @@ using ComputeGallery; "PirSharedGalleryResourceData", "csharp" ); +@@clientName(PirSharedGalleryResource.identifier, + "galleryIdentifier", + "csharp" +); @@clientName(PirCommunityGalleryResource, "PirCommunityGalleryResourceData", "csharp" ); +@@clientName(PirCommunityGalleryResource.identifier, + "galleryIdentifier", + "csharp" +); // Rename gallery models to *Data for backward compatibility (they were ARM resources before) @@clientName(SharedGallery, "SharedGalleryData", "csharp"); From ca80b38be8b4958f71440cdc0511971f84c249ef Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 6 May 2026 11:17:00 +0800 Subject: [PATCH 066/103] Consolidate per-service client.tsp customizations into root client.tsp Move all C# client customization decorators from per-service client.tsp files (Compute, ComputeDisk, ComputeGallery) into the root client.tsp, organized by section/region comments. Per-service client.tsp files are reverted to origin/main; ComputeGallery/client.tsp and the alternate-type-stubs.tsp helper are removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/Compute/client.tsp | 1303 ------------ .../Compute/ComputeDisk/client.tsp | 205 -- .../Compute/ComputeGallery/client.tsp | 372 ---- .../Compute/alternate-type-stubs.tsp | 8 - .../Microsoft.Compute/Compute/client.tsp | 1786 ++++++++++++++++- 5 files changed, 1784 insertions(+), 1890 deletions(-) delete mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp delete mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp index db2e59bc8d65..55d80c82fe7f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/client.tsp @@ -2,32 +2,8 @@ import "./main.tsp"; import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; -using Common; using Compute; -// CommonTypes v3 defines Resource.id as string, but the .NET SDK base classes -// (ResourceData/TrackedResourceData) expect ResourceIdentifier. Override for csharp. -@@alternateType(Azure.ResourceManager.CommonTypes.Resource.id, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// SubResource.id and ApiEntityReference.id flatten to XxxId properties on parent -// models (e.g. NetworkSecurityGroupId, SubnetId, DiskRestorePointId). Old AutoRest -// SDK emitted these as ResourceIdentifier; preserve that contract for csharp. -@@alternateType(SubResource.id, Azure.Core.armResourceIdentifier, "csharp"); -@@alternateType(ApiEntityReference.id, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// VirtualMachineImageResource (renamed VirtualMachineImageBase in csharp) had -// Location typed as AzureLocation in the old SDK; the spec models it as string. -@@alternateType(VirtualMachineImageResource.location, - Azure.Core.azureLocation, - "csharp" -); - @@clientName(NetworkApiVersion.`2020-11-01`, "TwoThousandTwenty1101", "go, javascript" @@ -36,8 +12,6 @@ using Compute; "TwoThousandTwentyTwo1101", "go, javascript" ); -@@clientName(NetworkApiVersion.`2020-11-01`, "V20201101", "csharp"); -@@clientName(NetworkApiVersion.`2022-11-01`, "V20221101", "csharp"); @@alternateType(VirtualMachineScaleSetStorageProfile.diskControllerType, string, @@ -47,118 +21,6 @@ using Compute; string, "go" ); -@@clientName(Placement.zonePlacementPolicy, - "ZonePlacementPolicyType", - "csharp" -); -@@clientName(VirtualMachineScaleSetStorageProfile.diskControllerType, - "DiskControllerKind", - "csharp" -); -@@clientName(VirtualMachineScaleSetUpdateStorageProfile.diskControllerType, - "DiskControllerKind", - "csharp" -); - -// ---------------------------------------------------------------------------- -// AdditionalProperties bag preservation (csharp only). -// -// The previous AutoRest-based Compute SDK shipped `IDictionary -// AdditionalProperties` on a handful of models. That property was *not* in the -// Swagger schema; it came from this directive in main's autorest.md: -// -// # add additionalproperties to a few models to support private properties -// # supported by the service -// - from: ComputeRP.json -// where: $.definitions -// transform: > -// $.VirtualMachineScaleSetProperties.additionalProperties = true; -// $.VirtualMachineScaleSetVMProperties.additionalProperties = true; -// $.UpgradePolicy.additionalProperties = true; -// - from: ComputeRP.json -// where: $.definitions.VMSizeProperties -// transform: > -// $.additionalProperties = true; -// -// The Compute service can return undocumented "private" properties on these -// models that the SDK must round-trip. Removing the bag would silently drop -// those values, so we must preserve it here. -// -// TypeSpec equivalent of `additionalProperties: true` is spreading -// `Record`. We can't add the spread directly to the original model -// (the spec is shared with other languages that historically did NOT expose -// the bag), so we declare a csharp-only wrapper that re-spreads the original -// plus `Record`, then swap it in via @@alternateType for csharp. -// ---------------------------------------------------------------------------- -/** - * Describes an upgrade policy - automatic, manual, or rolling. - */ -model UpgradePolicyWithAdditionalProperties { - ...UpgradePolicy; - ...Record; -} -@@alternateType(UpgradePolicy, - UpgradePolicyWithAdditionalProperties, - "csharp" -); -// Preserve the legacy C# names; the original rename-mapping in main's -// autorest.md was: -// UpgradePolicy: VirtualMachineScaleSetUpgradePolicy -// VMSizeProperties: VirtualMachineSizeProperties -// VirtualMachineScaleSetVMProperties: VirtualMachineScaleSetVmProperties -// VirtualMachineScaleSetProperties keeps its name verbatim. -@@clientName(UpgradePolicyWithAdditionalProperties, - "VirtualMachineScaleSetUpgradePolicy", - "csharp" -); - -/** - * Describes the properties of a Virtual Machine Scale Set. - */ -model VirtualMachineScaleSetPropertiesWithAdditionalProperties { - ...VirtualMachineScaleSetProperties; - ...Record; -} -@@alternateType(VirtualMachineScaleSetProperties, - VirtualMachineScaleSetPropertiesWithAdditionalProperties, - "csharp" -); -@@clientName(VirtualMachineScaleSetPropertiesWithAdditionalProperties, - "VirtualMachineScaleSetProperties", - "csharp" -); - -/** - * Describes the properties of a virtual machine scale set virtual machine. - */ -model VirtualMachineScaleSetVMPropertiesWithAdditionalProperties { - ...VirtualMachineScaleSetVMProperties; - ...Record; -} -@@alternateType(VirtualMachineScaleSetVMProperties, - VirtualMachineScaleSetVMPropertiesWithAdditionalProperties, - "csharp" -); -@@clientName(VirtualMachineScaleSetVMPropertiesWithAdditionalProperties, - "VirtualMachineScaleSetVmProperties", - "csharp" -); - -/** - * Specifies VM Size Property settings on the virtual machine. - */ -model VMSizePropertiesWithAdditionalProperties { - ...VMSizeProperties; - ...Record; -} -@@alternateType(VMSizeProperties, - VMSizePropertiesWithAdditionalProperties, - "csharp" -); -@@clientName(VMSizePropertiesWithAdditionalProperties, - "VirtualMachineSizeProperties", - "csharp" -); @@clientName(VirtualMachineSizeTypes.Standard_B1ms, "StandardB1Ms", "go"); @@clientName(VirtualMachineSizeTypes.Standard_B2ms, "StandardB2Ms", "go"); @@ -331,1168 +193,3 @@ model VMSizePropertiesWithAdditionalProperties { "listOSUpgradeHistory", "javascript" ); - -// C# operation location fixes — resolve collection result name collisions -// Both "list" and "listAll" on the same interface get mapped to "GetAll", -// causing duplicate CollectionResult type names. Move "listAll" to a separate -// interface so each gets a unique collection result type name. -@@clientLocation(VirtualMachineScaleSets.listAll, - "VirtualMachineScaleSetsSubscription", - "csharp" -); -@@clientLocation(VirtualMachines.listAll, - "VirtualMachinesSubscription", - "csharp" -); -@@clientLocation(RestorePointCollections.listAll, - "RestorePointCollectionsSubscription", - "csharp" -); - -// C# operation renames — OperationGroup operations with colliding names on the -// same mockable resource scope need unique C# method names. -// VirtualMachineImagesEdgeZoneOperationGroup ops renamed to old API names. -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listPublishers, - "GetPublishersVirtualMachineImagesEdgeZones", - "csharp" -); -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listOffers, - "GetOffersVirtualMachineImagesEdgeZones", - "csharp" -); -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listSkus, - "GetVirtualMachineImageEdgeZoneSkus", - "csharp" -); -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.list, - "GetVirtualMachineImagesEdgeZones", - "csharp" -); -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.get, - "GetVirtualMachineImagesEdgeZone", - "csharp" -); -// VirtualMachineImagesOperationGroup ops renamed to old API names. -@@clientName(VirtualMachineImagesOperationGroup.listPublishers, - "GetVirtualMachineImagePublishers", - "csharp" -); -@@clientName(VirtualMachineImagesOperationGroup.listOffers, - "GetVirtualMachineImageOffers", - "csharp" -); -@@clientName(VirtualMachineImagesOperationGroup.listSkus, - "GetVirtualMachineImageSkus", - "csharp" -); -@@clientName(VirtualMachineImagesOperationGroup.list, - "GetVirtualMachineImages", - "csharp" -); -@@clientName(VirtualMachineImagesOperationGroup.get, - "GetVirtualMachineImage", - "csharp" -); -@@clientName(VirtualMachineImagesOperationGroup.listByEdgeZone, - "GetVirtualMachineImagesByEdgeZone", - "csharp" -); -@@clientName(VirtualMachineImagesOperationGroup.listWithProperties, - "GetVirtualMachineImagesWithProperties", - "csharp" -); -// Other OperationGroup ops renamed to old API names. -@@clientName(UsageOperationGroup.list, "GetUsages", "csharp"); -@@clientName(VirtualMachineSizesOperationGroup.list, - "GetVirtualMachineSizes", - "csharp" -); -@@clientName(VirtualMachineRunCommandsOperationGroup.list, - "GetVirtualMachineRunCommands", - "csharp" -); -@@clientName(VirtualMachineRunCommandsOperationGroup.get, - "GetVirtualMachineRunCommand", - "csharp" -); -@@clientName(LogAnalyticsOperationGroup.exportThrottledRequests, - "ExportLogAnalyticsThrottledRequests", - "csharp" -); -@@clientName(LogAnalyticsOperationGroup.exportRequestRateByInterval, - "ExportLogAnalyticsRequestRateByInterval", - "csharp" -); - -// C# model renames — preserve backward compatibility during TypeSpec migration - -// VM sub-model renames: prefix with "VirtualMachine" to match old C# names -@@clientName(DataDisk, "VirtualMachineDataDisk", "csharp"); -@@clientName(HardwareProfile, "VirtualMachineHardwareProfile", "csharp"); -@@clientName(NetworkProfile, "VirtualMachineNetworkProfile", "csharp"); -@@clientName(OSProfile, "VirtualMachineOSProfile", "csharp"); -@@clientName(StorageProfile, "VirtualMachineStorageProfile", "csharp"); -@@clientName(ManagedDiskParameters, "VirtualMachineManagedDisk", "csharp"); - -// VMSS sub-model renames -@@clientName(UpgradePolicy, "VirtualMachineScaleSetUpgradePolicy", "csharp"); -@@clientName(PriorityMixPolicy, - "VirtualMachineScaleSetPriorityMixPolicy", - "csharp" -); - -// Enum singular←plural renames -@@clientName(CachingTypes, "CachingType", "csharp"); -@@clientName(DiskCreateOptionTypes, "DiskCreateOptionType", "csharp"); -@@clientName(DiskDeleteOptionTypes, "DiskDeleteOptionType", "csharp"); -@@clientName(DiskDetachOptionTypes, "DiskDetachOptionType", "csharp"); - -// RP-prefix renames -@@clientName(Plan, "ComputePlan", "csharp"); -@@clientName(SkuProfile, "ComputeSkuProfile", "csharp"); -@@clientName(UpdateResource, "ComputeResourcePatch", "csharp"); - -// Base type rename -@@clientName(VirtualMachineImageResource, "VirtualMachineImageBase", "csharp"); - -// Long enum/type renames -@@clientName(ExpandTypesForGetCapacityReservationGroups, - "CapacityReservationGroupGetExpand", - "csharp" -); - -// VM→Vm casing renames (old C# convention used lowercase "Vm") -@@clientName(VirtualMachineScaleSetVMInstanceIDs, - "VirtualMachineScaleSetVmInstanceIds", - "csharp" -); -@@clientName(ResilientVMDeletionStatus, "ResilientVmDeletionStatus", "csharp"); -@@clientName(LinuxVMGuestPatchAutomaticByPlatformRebootSetting, - "LinuxVmGuestPatchAutomaticByPlatformRebootSetting", - "csharp" -); -@@clientName(WindowsVMGuestPatchAutomaticByPlatformRebootSetting, - "WindowsVmGuestPatchAutomaticByPlatformRebootSetting", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMInstanceView, - "VirtualMachineScaleSetVmInstanceView", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMProperties, - "VirtualMachineScaleSetVmProperties", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMProtectionPolicy, - "VirtualMachineScaleSetVmProtectionPolicy", - "csharp" -); - -// ── Type renames for backward compatibility (migration from AutoRest) ── - -// Enum/union plural→singular renames -@@clientName(ArchitectureTypes, "ArchitectureType", "csharp"); -@@clientName(ConsistencyModeTypes, "ConsistencyModeType", "csharp"); -@@clientName(DedicatedHostLicenseTypes, "DedicatedHostLicenseType", "csharp"); -@@clientName(OperatingSystemStateTypes, "OperatingSystemStateType", "csharp"); -@@clientName(OrchestrationServiceNames, "OrchestrationServiceName", "csharp"); -@@clientName(VirtualMachineEvictionPolicyTypes, - "VirtualMachineEvictionPolicyType", - "csharp" -); -@@clientName(VirtualMachinePriorityTypes, - "VirtualMachinePriorityType", - "csharp" -); -@@clientName(VirtualMachineScaleSetScaleInRules, - "VirtualMachineScaleSetScaleInRule", - "csharp" -); -@@clientName(VMGuestPatchClassificationLinux, - "VmGuestPatchClassificationForLinux", - "csharp" -); -@@clientName(VMGuestPatchClassificationWindows, - "VmGuestPatchClassificationForWindows", - "csharp" -); - -// Model casing renames -@@clientName(DedicatedHostAllocatableVM, - "DedicatedHostAllocatableVm", - "csharp" -); - -// Resource type VM→Vm casing renames (backward compat with AutoRest output) -@@clientName(VirtualMachineScaleSetVM, "VirtualMachineScaleSetVm", "csharp"); -@@clientName(VirtualMachineScaleSetVMExtension, - "VirtualMachineScaleSetVmExtension", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMNetworkProfileConfiguration, - "VirtualMachineScaleSetVmNetworkProfileConfiguration", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMInstanceRequiredIDs, - "VirtualMachineScaleSetVmInstanceRequiredIds", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMExtensionsSummary, - "VirtualMachineScaleSetVmExtensionsSummary", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMReimageParameters, - "VirtualMachineScaleSetVmReimageContent", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMExtensionUpdate, - "VirtualMachineScaleSetVmExtensionPatch", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMExtensionsListResult, - "VirtualMachineScaleSetVmExtensionsListResult", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMListResult, - "VirtualMachineScaleSetVmListResult", - "csharp" -); - -// RP-prefix renames (old AutoRest prepend-rp-prefix convention) -@@clientName(ApiError, "ComputeApiError", "csharp"); -@@clientName(Placement, "VirtualMachinePlacement", "csharp"); -@@clientName(ScheduledEventsProfile, "ComputeScheduledEventsProfile", "csharp"); -@@clientName(SubResourceWithColocationStatus, - "ComputeSubResourceDataWithColocationStatus", - "csharp" -); -@@clientName(UsageName, "ComputeUsageName", "csharp"); -// `OperatingSystemTypes` (closed enum, Windows/Linux) was named `SupportedOperatingSystemType` -// in the old SDK; the union `OperatingSystemType` kept its spec name (extensible struct). -// Preserve that mapping in csharp. -@@clientName(OperatingSystemTypes, "SupportedOperatingSystemType", "csharp"); -@@clientName(ReservationType, "CapacityReservationType", "csharp"); -@@clientName(ApiErrorBase, "ComputeApiErrorBase", "csharp"); -@@clientName(VMGalleryApplication, - "VirtualMachineGalleryApplication", - "csharp" -); -@@clientName(NetworkInterfaceReference, - "VirtualMachineNetworkInterfaceReference", - "csharp" -); -@@clientName(SkuProfileVMSize, "ComputeSkuProfileVmSize", "csharp"); -@@clientName(VirtualMachineScaleSetVMProfile, - "VirtualMachineScaleSetVmProfile", - "csharp" -); -@@clientName(VirtualMachineScaleSetUpdateVMProfile, - "VirtualMachineScaleSetUpdateVmProfile", - "csharp" -); - -// Accessibility overrides (types generated as internal that should be public) -@@access(VirtualMachineScaleSetVMProfile, Access.public, "csharp"); -@@access(VirtualMachineScaleSetProperties, Access.public, "csharp"); -@@access(VirtualMachineScaleSetUpdateVMProfile, Access.public, "csharp"); -@@access(VirtualMachineScaleSetVMProperties, Access.public, "csharp"); - -// Rename listByLocation operations to avoid name collision (both map to GetByLocation) -@@clientName(VirtualMachinesOperationGroup.listByLocation, - "GetVirtualMachinesByLocation", - "csharp" -); -@@clientName(VirtualMachineScaleSetsOperationGroup.listByLocation, - "GetVirtualMachineScaleSetsByLocation", - "csharp" -); - -// Rename extension property "type" to avoid conflict with base class "Type" property -@@clientName(VirtualMachineScaleSetExtensionProperties.type, - "ExtensionType", - "csharp" -); -@@clientName(VirtualMachineExtensionProperties.type, "ExtensionType", "csharp"); -@@clientName(VirtualMachineExtensionUpdateProperties.type, - "ExtensionType", - "csharp" -); - -// Disable safe-flatten on AllInstancesDown / UserInitiatedRedeploy so they remain public -// types in the C# SDK (preserves backward compatibility with previously shipped surface). -// See: https://github.com/Azure/azure-sdk-for-net/issues/58066 -#suppress "@azure-tools/typespec-client-generator-core/client-option" "Preserve type for public API surface" -#suppress "@azure-tools/typespec-client-generator-core/client-option-requires-scope" "Preserve type for public API surface" -@@clientOption(UserInitiatedRedeploy, "disable-safe-flatten", true, "csharp"); -#suppress "@azure-tools/typespec-client-generator-core/client-option" "Preserve type for public API surface" -#suppress "@azure-tools/typespec-client-generator-core/client-option-requires-scope" "Preserve type for public API surface" -@@clientOption(AllInstancesDown, "disable-safe-flatten", true, "csharp"); - -// Resource type rename for backward compatibility - RollingUpgradeStatusInfo → VirtualMachineScaleSetRollingUpgrade -@@clientName(RollingUpgradeStatusInfo, - "VirtualMachineScaleSetRollingUpgrade", - "csharp" -); -@@clientName(RollingUpgradeStatusInfoProperties, - "VirtualMachineScaleSetRollingUpgradeProperties", - "csharp" -); - -// ── ARM resource renames for backward compatibility ── - -// Image → DiskImage (old: DiskImageResource, DiskImageData, DiskImageCollection) -@@clientName(Image, "DiskImage", "csharp"); - -// RestorePointCollection → RestorePointGroup (old: RestorePointGroupResource, RestorePointGroupData) -@@clientName(RestorePointCollection, "RestorePointGroup", "csharp"); -@@clientName(RestorePointCollectionSourceProperties, - "RestorePointGroupSource", - "csharp" -); - -// Rename non-resource model SshPublicKey → SshPublicKeyConfiguration to free the name, -// then rename the resource model SshPublicKeyResource → SshPublicKey -@@clientName(Compute.SshPublicKey, "SshPublicKeyConfiguration", "csharp"); -@@clientName(SshPublicKeyResource, "SshPublicKey", "csharp"); - -// VirtualMachineScaleSetVMRunCommands interface → Vm casing (old: VirtualMachineScaleSetVmRunCommandResource) -@@clientName(VirtualMachineScaleSetVMRunCommands, - "VirtualMachineScaleSetVmRunCommands", - "csharp" -); - -// Mark non-pageable list operations as pageable for backward compatibility -// These return a single-page list result but the SDK expects them to be enumerable -@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineExtensions.list, - "csharp" -); -@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineScaleSetVMExtensions.list, - "csharp" -); -@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineImagesOperationGroup.listByEdgeZone, - "csharp" -); - -// ── Type renames for backward compatibility (batch) ── -@@clientName(PublicIPAddressSku, "ComputePublicIPAddressSku", "csharp"); -@@clientName(SecurityPostureReference, - "ComputeSecurityPostureReference", - "csharp" -); -@@clientName(StatusLevelTypes, "ComputeStatusLevelType", "csharp"); -@@clientName(UpgradeMode, "VirtualMachineScaleSetUpgradeMode", "csharp"); -@@clientName(SettingNames, "SettingName", "csharp"); -@@clientName(ProtocolTypes, "WinRMListenerProtocolType", "csharp"); -@@clientName(InstanceViewTypes, "InstanceViewType", "csharp"); -@@clientName(MaintenanceOperationResultCodeTypes, - "MaintenanceOperationResultCodeType", - "csharp" -); -@@clientName(OSDisk, "VirtualMachineOSDisk", "csharp"); -@@clientName(VMDiskSecurityProfile, - "VirtualMachineDiskSecurityProfile", - "csharp" -); -@@clientName(VMSizeProperties, "VirtualMachineSizeProperties", "csharp"); -@@clientName(VirtualMachineScaleSetManagedDiskParameters, - "VirtualMachineScaleSetManagedDisk", - "csharp" -); -@@clientName(AlternativeOption, "ImageAlternativeOption", "csharp"); -@@clientName(LogAnalyticsOperationResult, "LogAnalytics", "csharp"); -@@clientName(RunCommandResult, "VirtualMachineRunCommandResult", "csharp"); -@@clientName(ConvertToVirtualMachineScaleSetInput, - "ConvertToVirtualMachineScaleSetContent", - "csharp" -); -@@clientName(MigrateVMToVirtualMachineScaleSetInput, - "MigrateVmToVirtualMachineScaleSetContent", - "csharp" -); -@@clientName(OrchestrationServiceStateInput, - "OrchestrationServiceStateContent", - "csharp" -); -@@clientName(RequestRateByIntervalInput, - "RequestRateByIntervalContent", - "csharp" -); -@@clientName(ThrottledRequestsInput, "ThrottledRequestsContent", "csharp"); -@@clientName(VirtualMachineCaptureParameters, - "VirtualMachineCaptureContent", - "csharp" -); -@@clientName(VirtualMachineInstallPatchesParameters, - "VirtualMachineInstallPatchesContent", - "csharp" -); -@@clientName(VirtualMachineReimageParameters, - "VirtualMachineReimageContent", - "csharp" -); -@@clientName(VirtualMachineScaleSetReimageParameters, - "VirtualMachineScaleSetReimageContent", - "csharp" -); -@@clientName(VMScaleSetConvertToSinglePlacementGroupInput, - "VirtualMachineScaleSetConvertToSinglePlacementGroupContent", - "csharp" -); -@@clientName(VMScaleSetScaleOutInput, - "VirtualMachineScaleSetScaleOutContent", - "csharp" -); -@@clientName(SshGenerateKeyPairInputParameters, - "SshGenerateKeyPairInputContent", - "csharp" -); -@@clientName(VirtualMachineScaleSetUpdateProperties, - "VirtualMachineScaleSetPatchProperties", - "csharp" -); -@@clientName(ExpandTypeForListVMs, "GetVirtualMachineExpandType", "csharp"); -@@clientName(ExpandTypesForGetVMScaleSets, - "VirtualMachineScaleSetGetExpand", - "csharp" -); -@@clientName(Modes, "HostEndpointSettingsMode", "csharp"); - -// ── Plural→singular enum renames (C# backward compat) ── -@@clientName(CapacityReservationGroupInstanceViewTypes, - "CapacityReservationGroupInstanceViewType", - "csharp" -); -@@clientName(CapacityReservationInstanceViewTypes, - "CapacityReservationInstanceViewType", - "csharp" -); -@@clientName(DiffDiskOptions, "DiffDiskOption", "csharp"); -@@clientName(DiskControllerTypes, "DiskControllerType", "csharp"); -@@clientName(DomainNameLabelScopeTypes, "DomainNameLabelScopeType", "csharp"); -@@clientName(ExpandTypesForListVMs, "ExpandTypesForListVm", "csharp"); -@@clientName(ResourceIdOptionsForGetCapacityReservationGroups, - "ResourceIdOptionsForGetCapacityReservationGroup", - "csharp" -); -@@clientName(ScriptShellTypes, "ScriptShellType", "csharp"); -@@clientName(SecurityEncryptionTypes, "SecurityEncryptionType", "csharp"); -@@clientName(SecurityTypes, "SecurityType", "csharp"); -@@clientName(SshEncryptionTypes, "SshEncryptionType", "csharp"); -@@clientName(StorageAccountTypes, "StorageAccountType", "csharp"); -@@clientName(VirtualMachineSizeTypes, "VirtualMachineSizeType", "csharp"); - -// ── RP-prefix renames (C# backward compat) ── -@@clientName(AllocationStrategy, "ComputeAllocationStrategy", "csharp"); -@@clientName(DeleteOptions, "ComputeDeleteOption", "csharp"); -@@clientName(NetworkInterfaceAuxiliaryMode, - "ComputeNetworkInterfaceAuxiliaryMode", - "csharp" -); -@@clientName(NetworkInterfaceAuxiliarySku, - "ComputeNetworkInterfaceAuxiliarySku", - "csharp" -); -@@clientName(PublicIPAddressSkuName, "ComputePublicIPAddressSkuName", "csharp"); -@@clientName(PublicIPAddressSkuTier, "ComputePublicIPAddressSkuTier", "csharp"); - -// ── VM→Vm casing renames (C# backward compat) ── -@@clientName(LinuxVMGuestPatchAutomaticByPlatformSettings, - "LinuxVmGuestPatchAutomaticByPlatformSettings", - "csharp" -); -@@clientName(LinuxVMGuestPatchMode, "LinuxVmGuestPatchMode", "csharp"); -@@clientName(VMGuestPatchRebootBehavior, - "VmGuestPatchRebootBehavior", - "csharp" -); -@@clientName(VMGuestPatchRebootSetting, "VmGuestPatchRebootSetting", "csharp"); -@@clientName(VMGuestPatchRebootStatus, "VmGuestPatchRebootStatus", "csharp"); -@@clientName(WindowsVMGuestPatchAutomaticByPlatformSettings, - "WindowsVmGuestPatchAutomaticByPlatformSettings", - "csharp" -); -@@clientName(WindowsVMGuestPatchMode, "WindowsVmGuestPatchMode", "csharp"); - -// ── IP→Ip casing renames (C# backward compat) ── -@@clientName(VirtualMachineIpTag, "VirtualMachineIPTag", "csharp"); -@@clientName(VirtualMachineScaleSetIpTag, - "VirtualMachineScaleSetIPTag", - "csharp" -); - -// ── Other renames (C# backward compat) ── -@@clientName(AlternativeType, "ImageAlternativeType", "csharp"); -@@clientName(RestorePointExpandOptions, "RestorePointExpand", "csharp"); -@@clientName(RestorePointCollectionExpandOptions, - "RestorePointGroupExpand", - "csharp" -); -@@clientName(RestorePointSourceVMDataDisk, - "RestorePointSourceVmDataDisk", - "csharp" -); -@@clientName(RestorePointSourceVMOSDisk, - "RestorePointSourceVmOSDisk", - "csharp" -); -@@clientName(RestorePointSourceVMStorageProfile, - "RestorePointSourceVmStorageProfile", - "csharp" -); -@@clientName(RebalanceBehavior, "VmssRebalanceBehavior", "csharp"); -@@clientName(RebalanceStrategy, "VmssRebalanceStrategy", "csharp"); -@@clientName(VmDiskTypes, "VirtualMachineDiskType", "csharp"); - -// ── Os→OS property casing renames (C# backward compat) ── -@@clientName(VirtualMachineSize.osDiskSizeInMB, "OSDiskSizeInMB", "csharp"); -@@clientName(AutomaticOSUpgradePolicy.osRollingUpgradeDeferral, - "OSRollingUpgradeDeferral", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMProfile.osProfile, "OSProfile", "csharp"); -@@clientName(VirtualMachineScaleSetStorageProfile.osDisk, "OSDisk", "csharp"); -@@clientName(VirtualMachineScaleSetOSDisk.osType, "OSType", "csharp"); -@@clientName(ScheduledEventsProfile.osImageNotificationProfile, - "OSImageNotificationProfile", - "csharp" -); -@@clientName(VirtualMachineScaleSetUpdateVMProfile.osProfile, - "OSProfile", - "csharp" -); -@@clientName(VirtualMachineScaleSetUpdateStorageProfile.osDisk, - "OSDisk", - "csharp" -); -@@clientName(VirtualMachineReimageParameters.osProfile, "OSProfile", "csharp"); -@@clientName(VirtualMachineScaleSetVMProperties.osProfile, - "OSProfile", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMInstanceView.osName, "OSName", "csharp"); -@@clientName(VirtualMachineScaleSetVMInstanceView.osVersion, - "OSVersion", - "csharp" -); -@@clientName(StorageProfile.osDisk, "OSDisk", "csharp"); -@@clientName(OSDisk.osType, "OSType", "csharp"); -@@clientName(VirtualMachineProperties.osProfile, "OSProfile", "csharp"); -@@clientName(VirtualMachineInstanceView.osName, "OSName", "csharp"); -@@clientName(VirtualMachineInstanceView.osVersion, "OSVersion", "csharp"); -@@clientName(VirtualMachineImageProperties.osDiskImage, - "OSDiskImage", - "csharp" -); -@@clientName(ImageStorageProfile.osDisk, "OSDisk", "csharp"); -@@clientName(ImageOSDisk.osType, "OSType", "csharp"); -@@clientName(ImageOSDisk.osState, "OSState", "csharp"); -@@clientName(RestorePointSourceMetadata.osProfile, "OSProfile", "csharp"); -@@clientName(RestorePointSourceVMStorageProfile.osDisk, "OSDisk", "csharp"); -@@clientName(RestorePointSourceVMOSDisk.osType, "OSType", "csharp"); -@@clientName(RunCommandDocumentBase.osType, "OSType", "csharp"); - -// ── Property casing renames: acronym case normalization (C# backward compat) ── -@@clientName(AdditionalCapabilities.ultraSSDEnabled, - "UltraSsdEnabled", - "csharp" -); -@@clientName(DedicatedHostGroupPropertiesAdditionalCapabilities.ultraSSDEnabled, - "UltraSsdEnabled", - "csharp" -); -@@clientName(DedicatedHostGroupProperties.hosts, "DedicatedHosts", "csharp"); -@@clientName(HostEndpointSettings.inVMAccessControlProfileReferenceId, - "InVmAccessControlProfileReferenceId", - "csharp" -); -@@clientName(LinuxConfiguration.enableVMAgentPlatformUpdates, - "IsVmAgentPlatformUpdatesEnabled", - "csharp" -); -@@clientName(LinuxConfiguration.disablePasswordAuthentication, - "IsPasswordAuthenticationDisabled", - "csharp" -); -@@clientName(LinuxConfiguration.provisionVMAgent, "ProvisionVmAgent", "csharp"); -@@clientName(WindowsConfiguration.enableAutomaticUpdates, - "IsAutomaticUpdatesEnabled", - "csharp" -); -// Rename the nested-model parent properties so the auto-flattened C# names -// become ResilientVm... instead of ResilientVM... (matches v1.14.0 baseline). -@@clientName(ResiliencyPolicy.resilientVMCreationPolicy, - "resilientVmCreationPolicy", - "csharp" -); -@@clientName(ResiliencyPolicy.resilientVMDeletionPolicy, - "resilientVmDeletionPolicy", - "csharp" -); -@@clientName(WindowsConfiguration.provisionVMAgent, - "ProvisionVmAgent", - "csharp" -); -@@clientName(ScaleInPolicy.prioritizeUnhealthyVMs, - "PrioritizeUnhealthyVms", - "csharp" -); -@@clientName(DataDisk.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); -@@clientName(VirtualMachineInstanceView.isVMInStandbyPool, - "IsVmInStandbyPool", - "csharp" -); -@@clientName(VirtualMachineScaleSetDataDisk.diskIOPSReadWrite, - "DiskIopsReadWrite", - "csharp" -); -@@clientName(VirtualMachineScaleSetUpdateProperties.doNotRunExtensionsOnOverprovisionedVMs, - "DoNotRunExtensionsOnOverprovisionedVms", - "csharp" -); -@@clientName(VirtualMachineScaleSetProperties.doNotRunExtensionsOnOverprovisionedVMs, - "DoNotRunExtensionsOnOverprovisionedVms", - "csharp" -); -@@clientName(VirtualMachineScaleSetVMProperties.resilientVMDeletionStatus, - "ResilientVmDeletionStatus", - "csharp" -); -@@clientName(VMSizeProperties.vCPUsAvailable, "VCpusAvailable", "csharp"); -@@clientName(VMSizeProperties.vCPUsPerCore, "VCpusPerCore", "csharp"); -@@clientName(StorageProfile.alignRegionalDisksToVMZone, - "AlignRegionalDisksToVmZone", - "csharp" -); -@@clientName(MigrateVMToVirtualMachineScaleSetInput.targetVMSize, - "TargetVmSize", - "csharp" -); -@@clientName(VirtualMachineExtensionImageProperties.vmScaleSetEnabled, - "VirtualMachineScaleSetEnabled", - "csharp" -); - -// ── IP→Ip property casing renames (C# backward compat) ── -@@clientName(VirtualMachineIpTag.ipTagType, "IPTagType", "csharp"); -@@clientName(VirtualMachineScaleSetIpTag.ipTagType, "IPTagType", "csharp"); -@@clientName(VirtualMachineNetworkInterfaceConfigurationProperties.ipConfigurations, - "IPConfigurations", - "csharp" -); -@@clientName(VirtualMachinePublicIPAddressConfigurationProperties.ipTags, - "IPTags", - "csharp" -); -@@clientName(VirtualMachineScaleSetNetworkConfigurationProperties.ipConfigurations, - "IPConfigurations", - "csharp" -); -@@clientName(VirtualMachineScaleSetPublicIPAddressConfigurationProperties.ipTags, - "IPTags", - "csharp" -); -@@clientName(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.ipConfigurations, - "IPConfigurations", - "csharp" -); - -// ── Is* prefix / verb prefix property renames (C# backward compat) ── -@@clientName(EventGridAndResourceGraph.enable, "IsEnabled", "csharp"); -@@clientName(RollingUpgradePolicy.maxSurge, "IsMaxSurgeEnabled", "csharp"); -@@clientName(UefiSettings.secureBootEnabled, "IsSecureBootEnabled", "csharp"); -@@clientName(UefiSettings.vTpmEnabled, "IsVirtualTpmEnabled", "csharp"); -@@clientName(VirtualMachineScaleSetProperties.constrainedMaximumCapacity, - "IsMaximumCapacityConstrained", - "csharp" -); -@@clientName(WindowsConfiguration.enableVMAgentPlatformUpdates, - "IsVmAgentPlatformUpdatesEnabled", - "csharp" -); -@@clientName(VirtualMachineNetworkInterfaceConfigurationProperties.disableTcpStateTracking, - "IsTcpStateTrackingDisabled", - "csharp" -); -@@clientName(VirtualMachineScaleSetNetworkConfigurationProperties.disableTcpStateTracking, - "IsTcpStateTrackingDisabled", - "csharp" -); -@@clientName(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.disableTcpStateTracking, - "IsTcpStateTrackingDisabled", - "csharp" -); - -// ── Qualified property name renames (C# backward compat) ── -@@clientName(AlternativeOption.type, "AlternativeType", "csharp"); -@@clientName(RestorePointEncryption.type, "EncryptionType", "csharp"); -@@clientName(RunCommandParameterDefinition.type, - "RunCommandParameterDefinitionType", - "csharp" -); -@@clientName(UpgradeOperationHistoricalStatusInfo.type, - "UpgradeOperationHistoricalStatusInfoType", - "csharp" -); -@@clientName(VirtualMachineExtensionHandlerInstanceView.type, - "VirtualMachineExtensionHandlerInstanceViewType", - "csharp" -); -@@clientName(VirtualMachineExtensionInstanceView.type, - "VirtualMachineExtensionInstanceViewType", - "csharp" -); - -// ── Other property renames (C# backward compat) ── -@@clientName(ImageReference.sharedGalleryImageId, - "SharedGalleryImageUniqueId", - "csharp" -); -@@clientName(OrchestrationServiceSummary.lastStatusChangeTime, - "LastStatusChangedOn", - "csharp" -); -@@clientName(RestorePointCollectionProperties.restorePointCollectionId, - "RestorePointGroupId", - "csharp" -); -@@clientName(VMScaleSetScaleOutInputProperties.zone, - "VmScaleSetScaleOutInputZone", - "csharp" -); - -// ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── - -// Wrapper model id properties → ResourceIdentifier -@@alternateType(ApiEntityReference.id, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@alternateType(ServiceArtifactReference.id, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@alternateType(SecurityPostureReference.id, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@alternateType(SshPublicKeyGenerateKeyPairResult.id, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@alternateType(RestorePointCollectionSourceProperties.id, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// Direct string properties → ResourceIdentifier -@@alternateType(VirtualMachineScaleSetVMInstanceView.assignedHost, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// ── alternateType: string → Uri for C# (migration from AutoRest) ── -@@alternateType(BootDiagnostics.storageUri, url, "csharp"); -@@alternateType(BootDiagnosticsInstanceView.consoleScreenshotBlobUri, - url, - "csharp" -); -@@alternateType(BootDiagnosticsInstanceView.serialConsoleLogBlobUri, - url, - "csharp" -); -@@alternateType(ImageDisk.blobUri, url, "csharp"); -@@alternateType(KeyVaultKeyReference.keyUrl, url, "csharp"); -@@alternateType(KeyVaultSecretReference.secretUrl, url, "csharp"); -@@alternateType(LogAnalyticsInputBase.blobContainerSasUri, url, "csharp"); -@@alternateType(RetrieveBootDiagnosticsDataResult.consoleScreenshotBlobUri, - url, - "csharp" -); -@@alternateType(RetrieveBootDiagnosticsDataResult.serialConsoleLogBlobUri, - url, - "csharp" -); -@@alternateType(VaultCertificate.certificateUrl, url, "csharp"); -@@alternateType(VirtualHardDisk.uri, url, "csharp"); -@@alternateType(VirtualMachineRunCommandProperties.outputBlobUri, - url, - "csharp" -); -@@alternateType(VirtualMachineRunCommandProperties.errorBlobUri, url, "csharp"); -@@alternateType(VirtualMachineRunCommandScriptSource.scriptUri, url, "csharp"); -@@alternateType(WinRMListener.certificateUrl, url, "csharp"); - -// ── alternateType: Identity types → ManagedServiceIdentity for C# ── -@@alternateType(VirtualMachineScaleSet.identity, - Azure.ResourceManager.Foundations.ManagedServiceIdentity, - "csharp" -); -@@alternateType(VirtualMachineScaleSetUpdate.identity, - Azure.ResourceManager.Foundations.ManagedServiceIdentity, - "csharp" -); -@@alternateType(VirtualMachineScaleSetVM.identity, - Azure.ResourceManager.Foundations.ManagedServiceIdentity, - "csharp" -); -@@alternateType(VirtualMachine.identity, - Azure.ResourceManager.Foundations.ManagedServiceIdentity, - "csharp" -); -@@alternateType(VirtualMachineUpdate.identity, - Azure.ResourceManager.Foundations.ManagedServiceIdentity, - "csharp" -); - -// ── alternateType: SubResource[] for C# backward compat ── -@@alternateType(AvailabilitySetProperties.virtualMachines, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationGatewayBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationSecurityGroups, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerInboundNatPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(DedicatedHostGroupProperties.hosts, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(DedicatedHostProperties.virtualMachines, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(CapacityReservationGroupProperties.capacityReservations, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(CapacityReservationGroupProperties.virtualMachinesAssociated, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(CapacityReservationProperties.virtualMachinesAssociated, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(CapacityReservationUtilization.virtualMachinesAllocated, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(ResourceSharingProfile.subscriptionIds, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(CapacityReservationGroupInstanceView.sharedSubscriptionIds, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(RestorePointProperties.excludeDisks, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); - -// ── Extensible enum wrappers for closed unions/enums (C# backward compat) ── -// The old SDK had these as extensible enums (readonly struct). The TypeSpec spec defines them -// as closed unions/enums, which generate as fixed enums in C#. We define extensible wrappers -// and use @@alternateType on the type to replace all usages automatically. - -/** - * The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. - */ -union ComponentName { - ComponentNames, - string, -} - -/** - * The pass name. Currently, the only allowable value is OobeSystem. - */ -union PassName { - PassNames, - string, -} - -@@alternateType(ComponentNames, ComponentName, "csharp"); -@@alternateType(PassNames, PassName, "csharp"); - -// ── VirtualMachineSizeType member casing fixes (65 members) ── -// The generator lowercases size suffixes (s, m, r) differently from old SDK. -@@clientName(VirtualMachineSizeTypes.Standard_A2m_v2, - "StandardA2MV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_A4m_v2, - "StandardA4MV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_A8m_v2, - "StandardA8MV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_B1ms, "StandardB1Ms", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_B1s, "StandardB1S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_B2ms, "StandardB2Ms", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_B2s, "StandardB2S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_B4ms, "StandardB4Ms", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_B8ms, "StandardB8Ms", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_D16s_v3, - "StandardD16SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_D2s_v3, - "StandardD2SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_D32s_v3, - "StandardD32SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_D4s_v3, - "StandardD4SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_D64s_v3, - "StandardD64SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_D8s_v3, - "StandardD8SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_E16s_v3, - "StandardE16SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_E2s_v3, - "StandardE2SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.`Standard_E32-8s_v3`, - "StandardE328SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_E32s_v3, - "StandardE32SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_E4s_v3, - "StandardE4SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.`Standard_E64-16s_v3`, - "StandardE6416SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.`Standard_E64-32s_v3`, - "StandardE6432SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_E64s_v3, - "StandardE64SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_E8s_v3, - "StandardE8SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_F16s, "StandardF16S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F16s_v2, - "StandardF16SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_F1s, "StandardF1S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F2s, "StandardF2S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F2s_v2, - "StandardF2SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_F32s_v2, - "StandardF32SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_F4s, "StandardF4S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F4s_v2, - "StandardF4SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_F64s_v2, - "StandardF64SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_F72s_v2, - "StandardF72SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_F8s, "StandardF8S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F8s_v2, - "StandardF8SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_H16m, "StandardH16M", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_H16mr, "StandardH16Mr", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_H16r, "StandardH16R", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_H8m, "StandardH8M", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_L16s, "StandardL16S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_L32s, "StandardL32S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_L4s, "StandardL4S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_L8s, "StandardL8S", "csharp"); -@@clientName(VirtualMachineSizeTypes.`Standard_M128-32ms`, - "StandardM12832Ms", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.`Standard_M128-64ms`, - "StandardM12864Ms", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_M128ms, - "StandardM128Ms", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_M128s, "StandardM128S", "csharp"); -@@clientName(VirtualMachineSizeTypes.`Standard_M64-16ms`, - "StandardM6416Ms", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.`Standard_M64-32ms`, - "StandardM6432Ms", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_M64ms, "StandardM64Ms", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_M64s, "StandardM64S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC12s_v2, - "StandardNC12SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_NC12s_v3, - "StandardNC12SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_NC24r, "StandardNC24R", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC24rs_v2, - "StandardNC24RsV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_NC24rs_v3, - "StandardNC24RsV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_NC24s_v2, - "StandardNC24SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_NC24s_v3, - "StandardNC24SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_NC6s_v2, - "StandardNC6SV2", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_NC6s_v3, - "StandardNC6SV3", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_ND12s, "StandardND12S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_ND24rs, - "StandardND24Rs", - "csharp" -); -@@clientName(VirtualMachineSizeTypes.Standard_ND24s, "StandardND24S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_ND6s, "StandardND6S", "csharp"); - - -// .NET back-compat: 1.13.1 shipped Usage.Unit as the extensible-enum -// `ComputeUsageUnit`. The current spec narrows it to the string-literal -// `"Count"`, which would emit a plain `string` property and break ApiCompat. -// Retype it to a string-backed union so the C# emitter generates the -// extensible-enum struct (with == / != operators) and uses it as the -// property type. -union ComputeUsageUnit { - string, - - /** The unit of measurement is a count. */ - Count: "Count", -} -@@alternateType(Compute.Usage.unit, ComputeUsageUnit, "csharp"); - - -// .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. -@@clientName(StorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); -@@clientName(StorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); -@@clientName(StorageAccountTypes.StandardSSD_LRS, "StandardSsdLrs", "csharp"); -@@clientName(StorageAccountTypes.UltraSSD_LRS, "UltraSsdLrs", "csharp"); -@@clientName(StorageAccountTypes.Premium_ZRS, "PremiumZrs", "csharp"); -@@clientName(StorageAccountTypes.StandardSSD_ZRS, "StandardSsdZrs", "csharp"); -@@clientName(StorageAccountTypes.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); - -@@clientName(SecurityTypes.ConfidentialVM, "ConfidentialVm", "csharp"); - -@@clientName(SecurityEncryptionTypes.VMGuestStateOnly, "VmGuestStateOnly", "csharp"); -@@clientName(SecurityEncryptionTypes.DiskWithVMGuestState, "DiskWithVmGuestState", "csharp"); - -@@clientName(DiskControllerTypes.SCSI, "Scsi", "csharp"); - -@@clientName(VirtualMachineScaleSetScaleInRules.OldestVM, "OldestVm", "csharp"); -@@clientName(VirtualMachineScaleSetScaleInRules.NewestVM, "NewestVm", "csharp"); - -@@clientName(ExpandTypesForGetCapacityReservationGroups.`virtualMachineScaleSetVMs/$ref`, - "VirtualMachineScaleSetVmsRef", - "csharp" -); -@@clientName(ExpandTypesForGetCapacityReservationGroups.`virtualMachines/$ref`, - "VirtualMachinesRef", - "csharp" -); - -// ── Azure.ClientGenerator.Core.Usage.input forces public ctor + property setters on output-only models ── -// .NET back-compat: these models previously shipped (via AutoRest) with a public -// parameterless ctor and writable properties. TypeSpec's default Output-only usage -// removes both. Force Azure.ClientGenerator.Core.Usage.input for csharp to restore the legacy surface. -@@usage(VirtualMachineImage, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(VirtualMachineImageResource, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(VirtualMachineExtensionImage, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(VirtualMachineImageFeature, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(ImageDeprecationStatus, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(AlternativeOption, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(PurchasePlan, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(SubResourceWithColocationStatus, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(RollingUpgradeStatusInfo, Azure.ClientGenerator.Core.Usage.input, "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp index 2bec830b5465..d718ea3f8937 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/client.tsp @@ -31,208 +31,3 @@ using ComputeDisk; "getSecureVMGuestStateSas", "java" ); - -// ── Os→OS property casing renames (C# backward compat) ── -@@clientName(DiskProperties.osType, "OSType", "csharp"); -@@clientName(DiskUpdateProperties.osType, "OSType", "csharp"); -@@clientName(DiskRestorePointProperties.osType, "OSType", "csharp"); -@@clientName(SnapshotProperties.osType, "OSType", "csharp"); -@@clientName(SnapshotUpdateProperties.osType, "OSType", "csharp"); - -// C# renames for backward compatibility (migration from AutoRest) -@@clientName(CreationData, "DiskCreationData", "csharp"); -@@clientName(FileFormat, "DiskImageFileFormat", "csharp"); -@@clientName(PublicNetworkAccess, "DiskPublicNetworkAccess", "csharp"); -@@clientName(EncryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); -@@clientName(Encryption, "DiskEncryption", "csharp"); - -// ARM resource renames for backward compatibility -// Disk → ManagedDisk (old: ManagedDiskResource, ManagedDiskData, ManagedDiskCollection) -@@clientName(Disk, "ManagedDisk", "csharp"); - -// PrivateEndpointConnection → ComputePrivateEndpointConnection (old RP-prefix convention) -@@clientName(PrivateEndpointConnection, - "ComputePrivateEndpointConnection", - "csharp" -); - -// Type rename for backward compatibility -@@clientName(PrivateLinkResource, "ComputePrivateLinkResourceData", "csharp"); - -// ── Plural→singular enum renames (C# backward compat) ── -@@clientName(DiskSecurityTypes, "DiskSecurityType", "csharp"); -@@clientName(DiskStorageAccountTypes, "DiskStorageAccountType", "csharp"); -@@clientName(SnapshotStorageAccountTypes, "SnapshotStorageAccountType", "csharp"); - -// ── RP-prefix renames (C# backward compat) ── -@@clientName(EncryptionType, "ComputeEncryptionType", "csharp"); - -// ── Property casing renames: acronym case normalization (C# backward compat) ── -@@clientName(AccessUri.accessSAS, "AccessSas", "csharp"); -@@clientName(AccessUri.securityDataAccessSAS, "SecurityDataAccessSas", "csharp"); -@@clientName(AccessUri.securityMetadataAccessSAS, "SecurityMetadataAccessSas", "csharp"); -@@clientName(DiskSecurityProfile.secureVMDiskEncryptionSetId, "SecureVmDiskEncryptionSetId", "csharp"); -@@clientName(GrantAccessData.getSecureVMGuestStateSAS, "GetSecureVmGuestStateSas", "csharp"); -@@clientName(DiskProperties.diskIOPSReadOnly, "DiskIopsReadOnly", "csharp"); -@@clientName(DiskProperties.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); -@@clientName(DiskUpdateProperties.diskIOPSReadOnly, "DiskIopsReadOnly", "csharp"); -@@clientName(DiskUpdateProperties.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); - -// ── Is* prefix property renames (C# backward compat) ── -@@clientName(CreationData.performancePlus, "IsPerformancePlusEnabled", "csharp"); -@@clientName(DiskProperties.optimizedForFrequentAttach, "IsOptimizedForFrequentAttach", "csharp"); -@@clientName(DiskUpdateProperties.optimizedForFrequentAttach, "IsOptimizedForFrequentAttach", "csharp"); - -// ── Qualified property name renames (C# backward compat) ── -@@clientName(Encryption.type, "EncryptionType", "csharp"); - -// ── Other property renames (C# backward compat) ── -@@clientName(DiskProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); -@@clientName(DiskUpdateProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); -@@clientName(SnapshotProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); -@@clientName(SnapshotUpdateProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); -@@clientName(PrivateEndpointConnectionProperties.privateLinkServiceConnectionState, "ConnectionState", "csharp"); - -// ── alternateType overrides: string → armResourceIdentifier (C# backward compat) ── - -// Wrapper model id properties → ResourceIdentifier -@@alternateType(SourceVault.id, Azure.Core.armResourceIdentifier, "csharp"); -@@alternateType(PrivateEndpoint.id, Azure.Core.armResourceIdentifier, "csharp"); -@@alternateType(ImageDiskReference.id, Azure.Core.armResourceIdentifier, "csharp"); - -// Disk -@@alternateType(Disk.managedBy, Azure.Core.armResourceIdentifier, "csharp"); -@@alternateType(Disk.managedByExtended, - Azure.Core.armResourceIdentifier[], - "csharp" -); -@@alternateType(DiskProperties.diskAccessId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// DiskUpdate -@@alternateType(DiskUpdateProperties.diskAccessId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// DiskRestorePoint -// .NET back-compat: previously shipped DiskRestorePointData with a public ctor and -// settable properties. TypeSpec's default usage flags this as output-only, which -// removes both. Forcing Azure.ClientGenerator.Core.Usage.input restores the public ctor + property setters. -@@usage(DiskRestorePoint, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@alternateType(DiskRestorePointProperties.diskAccessId, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@alternateType(DiskRestorePointProperties.sourceResourceId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// Snapshot -@@alternateType(SnapshotProperties.diskAccessId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// SnapshotUpdate -@@alternateType(SnapshotUpdateProperties.diskAccessId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// CreationData -@@alternateType(CreationData.sourceResourceId, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@alternateType(CreationData.storageAccountId, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@alternateType(CreationData.elasticSanResourceId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// Encryption -@@alternateType(Encryption.diskEncryptionSetId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// DiskSecurityProfile -@@alternateType(DiskSecurityProfile.secureVMDiskEncryptionSetId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// PrivateLinkResource -@@alternateType(PrivateLinkResourceProperties.groupId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// ── alternateType: Identity → ManagedServiceIdentity for C# ── -@@alternateType(DiskEncryptionSet.identity, - Azure.ResourceManager.Foundations.ManagedServiceIdentity, - "csharp" -); -@@alternateType(DiskEncryptionSetUpdate.identity, - Azure.ResourceManager.Foundations.ManagedServiceIdentity, - "csharp" -); - -// ── alternateType: string → Uri for C# (migration from AutoRest) ── -@@alternateType(CreationData.sourceUri, url, "csharp"); -@@alternateType(CreationData.securityDataUri, url, "csharp"); -@@alternateType(KeyForDiskEncryptionSet.keyUrl, url, "csharp"); -@@alternateType(KeyVaultAndKeyReference.keyUrl, url, "csharp"); -@@alternateType(KeyVaultAndSecretReference.secretUrl, url, "csharp"); -@@alternateType(ShareInfoElement.vmUri, url, "csharp"); - -// Mark non-pageable list operations as pageable for backward compatibility -@@Azure.ClientGenerator.Core.Legacy.markAsPageable(DiskAccesses.getPrivateLinkResources, - "csharp" -); - - -// .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. -@@clientName(DiskStorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); -@@clientName(DiskStorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); -@@clientName(DiskStorageAccountTypes.StandardSSD_LRS, "StandardSsdLrs", "csharp"); -@@clientName(DiskStorageAccountTypes.UltraSSD_LRS, "UltraSsdLrs", "csharp"); -@@clientName(DiskStorageAccountTypes.Premium_ZRS, "PremiumZrs", "csharp"); -@@clientName(DiskStorageAccountTypes.StandardSSD_ZRS, "StandardSsdZrs", "csharp"); -@@clientName(DiskStorageAccountTypes.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); - -@@clientName(SnapshotStorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); -@@clientName(SnapshotStorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); -@@clientName(SnapshotStorageAccountTypes.Standard_ZRS, "StandardZrs", "csharp"); - -@@clientName(DiskSecurityTypes.ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey, - "ConfidentialVmGuestStateOnlyEncryptedWithPlatformKey", - "csharp" -); -@@clientName(DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithPlatformKey, - "ConfidentialVmDiskEncryptedWithPlatformKey", - "csharp" -); -@@clientName(DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithCustomerKey, - "ConfidentialVmDiskEncryptedWithCustomerKey", - "csharp" -); -@@clientName(DiskSecurityTypes.ConfidentialVM_NonPersistedTPM, "ConfidentialVmNonPersistedTPM", "csharp"); - -@@clientName(DiskState.ActiveSAS, "ActiveSas", "csharp"); -@@clientName(DiskState.ActiveSASFrozen, "ActiveSasFrozen", "csharp"); - -@@clientName(FileFormat.VHD, "Vhd", "csharp"); -@@clientName(FileFormat.VHDX, "Vhdx", "csharp"); - -@@clientName(SupportedSecurityOption.TrustedLaunchAndConfidentialVMSupported, - "TrustedLaunchAndConfidentialVmSupported", - "csharp" -); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp deleted file mode 100644 index 5a8ad4727c0b..000000000000 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/client.tsp +++ /dev/null @@ -1,372 +0,0 @@ -import "./main.tsp"; -import "@azure-tools/typespec-client-generator-core"; - -using Azure.ClientGenerator.Core; -using ComputeGallery; - -// ── Os→OS property casing renames (C# backward compat) ── -@@clientName(GalleryImageProperties.osType, "OSType", "csharp"); -@@clientName(GalleryImageProperties.osState, "OSState", "csharp"); -@@clientName(EncryptionImages.osDiskImage, "OSDiskImage", "csharp"); -@@clientName(GalleryImageVersionStorageProfile.osDiskImage, - "OSDiskImage", - "csharp" -); -@@clientName(GalleryInVMAccessControlProfileProperties.osType, - "OSType", - "csharp" -); -@@clientName(SharedGalleryImageProperties.osType, "OSType", "csharp"); -@@clientName(SharedGalleryImageProperties.osState, "OSState", "csharp"); -@@clientName(SharedGalleryImageVersionStorageProfile.osDiskImage, - "OSDiskImage", - "csharp" -); -@@clientName(CommunityGalleryImageProperties.osType, "OSType", "csharp"); -@@clientName(CommunityGalleryImageProperties.osState, "OSState", "csharp"); - -@@clientName(GalleryTargetExtendedLocation.storageAccountType, - "GalleryStorageAccountType", - "csharp" -); - -// Main's autorest.md re-typed `softDeletedTime` from string -> date-time: -// GallerySoftDeletedResource.properties.softDeletedTime: -|date-time -// and the AutoRest naming convention then renamed `Time` -> `On`. -// Spec keeps it as `string`; mirror the legacy C# shape for back-compat. -@@alternateType(GallerySoftDeletedResourceProperties.softDeletedTime, - utcDateTime, - "csharp" -); -@@clientName(GallerySoftDeletedResourceProperties.softDeletedTime, - "softDeletedOn", - "csharp" -); - -// C# enum singular←plural rename -@@clientName(SharedToValues, "SharedToValue", "csharp"); - -// C# renames for backward compatibility (migration from AutoRest) -@@clientName(UserArtifactManage, "UserArtifactManagement", "csharp"); -@@clientName(ValidationsProfile, "GalleryImageValidationsProfile", "csharp"); -@@clientName(PolicyViolation, "GalleryImageVersionPolicyViolation", "csharp"); -@@clientName(ReplicationMode, "GalleryReplicationMode", "csharp"); -@@clientName(StorageAccountType, "ImageStorageAccountType", "csharp"); -@@clientName(PlatformAttribute, "ComputeGalleryPlatformAttribute", "csharp"); -@@clientName(ExecutedValidation, "GalleryImageExecutedValidation", "csharp"); -@@clientName(ValidationStatus, "ComputeGalleryValidationStatus", "csharp"); -@@clientName(GallerySharingPermissionTypes, - "GallerySharingPermissionType", - "csharp" -); - -// Accessibility overrides -@@access(CommunityGalleryIdentifier, Access.public, "csharp"); -@@access(CommunityGalleryImageIdentifier, Access.public, "csharp"); -@@access(SharedGalleryIdentifier, Access.public, "csharp"); - -// Resource type InVM→InVm casing renames (backward compat with AutoRest output) -@@clientName(GalleryInVMAccessControlProfile, - "GalleryInVmAccessControlProfile", - "csharp" -); -@@clientName(GalleryInVMAccessControlProfileVersion, - "GalleryInVmAccessControlProfileVersion", - "csharp" -); -@@clientName(GalleryInVMAccessControlProfileProperties, - "GalleryInVmAccessControlProfileProperties", - "csharp" -); -@@clientName(GalleryInVMAccessControlProfileUpdate, - "GalleryInVmAccessControlProfilePatch", - "csharp" -); -@@clientName(GalleryInVMAccessControlProfileVersionProperties, - "GalleryInVmAccessControlProfileVersionProperties", - "csharp" -); -@@clientName(GalleryInVMAccessControlProfileVersionUpdate, - "GalleryInVmAccessControlProfileVersionPatch", - "csharp" -); -@@clientName(GalleryInVMAccessControlProfileList, - "GalleryInVmAccessControlProfileList", - "csharp" -); -@@clientName(GalleryInVMAccessControlProfileVersionList, - "GalleryInVmAccessControlProfileVersionList", - "csharp" -); - -// AccessControlRules and EndpointAccess renames (backward compat with AutoRest RP-prefix) -@@clientName(AccessControlRules, "GalleryInVmAccessControlRules", "csharp"); -@@clientName(AccessControlRulesMode, - "GalleryInVmAccessControlRulesMode", - "csharp" -); -@@clientName(AccessControlRulesPrivilege, - "GalleryInVmAccessControlRulesPrivilege", - "csharp" -); -@@clientName(AccessControlRulesRole, - "GalleryInVmAccessControlRulesRole", - "csharp" -); -@@clientName(AccessControlRulesIdentity, - "GalleryInVmAccessControlRulesIdentity", - "csharp" -); -@@clientName(AccessControlRulesRoleAssignment, - "GalleryInVmAccessControlRulesRoleAssignment", - "csharp" -); -@@clientName(EndpointAccess, "ComputeGalleryEndpointAccess", "csharp"); - -// Rename child identifier properties to avoid CS0108 hiding conflict with base class Identifier -@@clientName(CommunityGalleryImageProperties.identifier, - "ImageIdentifier", - "csharp" -); -@@clientName(SharedGalleryImageProperties.identifier, - "ImageIdentifier", - "csharp" -); - -// Rename raw gallery operations to match old SDK method names -@@clientName(SharedGalleries.get, "GetSharedGalleryData", "csharp"); -@@clientName(SharedGalleries.list, "GetSharedGalleries", "csharp"); -@@clientName(SharedGalleryImages.get, "GetSharedGalleryImage", "csharp"); -@@clientName(SharedGalleryImages.list, "GetSharedGalleryImages", "csharp"); -@@clientName(SharedGalleryImageVersions.get, - "GetSharedGalleryImageVersion", - "csharp" -); -@@clientName(SharedGalleryImageVersions.list, - "GetSharedGalleryImageVersions", - "csharp" -); -@@clientName(CommunityGalleries.get, "GetCommunityGalleryData", "csharp"); -@@clientName(CommunityGalleryImages.get, "GetCommunityGalleryImage", "csharp"); -@@clientName(CommunityGalleryImages.list, - "GetCommunityGalleryImages", - "csharp" -); -@@clientName(CommunityGalleryImageVersions.get, - "GetCommunityGalleryImageVersion", - "csharp" -); -@@clientName(CommunityGalleryImageVersions.list, - "GetCommunityGalleryImageVersions", - "csharp" -); - -// Type renames for backward compatibility -@@clientName(EndpointTypes, "ComputeGalleryEndpointType", "csharp"); -@@clientName(EndpointTypes.IMDS, "Imds", "csharp"); -@@clientName(GallerySoftDeletedResource, - "GallerySoftDeletedResourceDetails", - "csharp" -); -@@clientName(PirResource, "PirResourceData", "csharp"); -@@clientName(PirSharedGalleryResource, - "PirSharedGalleryResourceData", - "csharp" -); -@@clientName(PirSharedGalleryResource.identifier, - "galleryIdentifier", - "csharp" -); -@@clientName(PirCommunityGalleryResource, - "PirCommunityGalleryResourceData", - "csharp" -); -@@clientName(PirCommunityGalleryResource.identifier, - "galleryIdentifier", - "csharp" -); - -// Rename gallery models to *Data for backward compatibility (they were ARM resources before) -@@clientName(SharedGallery, "SharedGalleryData", "csharp"); -@@clientName(SharedGalleryImage, "SharedGalleryImageData", "csharp"); -@@clientName(SharedGalleryImageVersion, - "SharedGalleryImageVersionData", - "csharp" -); -@@clientName(CommunityGallery, "CommunityGalleryData", "csharp"); -@@clientName(CommunityGalleryImage, "CommunityGalleryImageData", "csharp"); -@@clientName(CommunityGalleryImageVersion, - "CommunityGalleryImageVersionData", - "csharp" -); - -// ── Plural→singular enum renames (C# backward compat) ── -@@clientName(ReplicationStatusTypes, "ReplicationStatusType", "csharp"); -@@clientName(SelectPermissions, "SelectPermission", "csharp"); -@@clientName(SharingProfileGroupTypes, "SharingProfileGroupType", "csharp"); -@@clientName(SharingUpdateOperationTypes, - "SharingUpdateOperationType", - "csharp" -); -@@clientName(SoftDeletedArtifactTypes, - "GallerySoftDeletedArtifactType", - "csharp" -); - -// ── VM→Vm casing renames (C# backward compat) ── -@@clientName(ConfidentialVMEncryptionType, - "ConfidentialVmEncryptionType", - "csharp" -); - -// ── Other renames (C# backward compat) ── -@@clientName(GalleryExpandParams, "GalleryExpand", "csharp"); -@@clientName(PolicyViolationCategory, - "GalleryImageVersionPolicyViolationCategory", - "csharp" -); -@@clientName(ReplicationState, "RegionalReplicationState", "csharp"); - -// ── Property casing renames: acronym case normalization (C# backward compat) ── -@@clientName(OSDiskImageSecurityProfile.confidentialVMEncryptionType, - "ConfidentialVmEncryptionType", - "csharp" -); -@@clientName(OSDiskImageSecurityProfile.secureVMDiskEncryptionSetId, - "SecureVmDiskEncryptionSetId", - "csharp" -); -@@clientName(RecommendedMachineConfiguration.vCPUs, "VCpus", "csharp"); - -// ── Is* prefix property renames (C# backward compat) ── -@@clientName(GalleryApplicationCustomActionParameter.required, - "IsRequired", - "csharp" -); -@@clientName(GalleryImageVersionSafetyProfile.blockDeletionBeforeEndOfLife, - "IsBlockedDeletionBeforeEndOfLife", - "csharp" -); -@@clientName(GalleryImageVersionSafetyProfile.reportedForPolicyViolation, - "IsReportedForPolicyViolation", - "csharp" -); -@@clientName(TargetRegion.excludeFromLatest, "IsExcludedFromLatest", "csharp"); -@@clientName(GalleryArtifactPublishingProfileBase.excludeFromLatest, - "IsExcludedFromLatest", - "csharp" -); -@@clientName(SharedGalleryImageVersionProperties.excludeFromLatest, - "IsExcludedFromLatest", - "csharp" -); -@@clientName(CommunityGalleryImageVersionProperties.excludeFromLatest, - "IsExcludedFromLatest", - "csharp" -); -// Match v1.14.0 baseline: property is `Restore` (no Is* prefix). -@@clientName(GalleryImageVersionProperties.restore, "Restore", "csharp"); - -// ── Qualified property name renames (C# backward compat) ── -@@clientName(GalleryApplicationCustomActionParameter.type, - "ParameterType", - "csharp" -); -@@clientName(GalleryExtendedLocation.type, "ExtendedLocationType", "csharp"); -@@clientName(ExecutedValidation.type, "ExecutedValidationType", "csharp"); -@@clientName(GalleryScriptParameter.type, "ParameterType", "csharp"); -@@clientName(SharingProfileGroup.type, "GroupType", "csharp"); -@@clientName(UefiKey.type, "KeyType", "csharp"); - -// ── Other property renames (C# backward compat) ── -@@clientName(ValidationsProfile.validationEtag, "ValidationETag", "csharp"); -@@clientName(SharingProfile.permissions, "Permission", "csharp"); - -// ── alternateType: string → Uri for C# (migration from AutoRest) ── -@@alternateType(GalleryImageProperties.privacyStatementUri, url, "csharp"); -@@alternateType(GalleryImageProperties.releaseNoteUri, url, "csharp"); -@@alternateType(GalleryApplicationProperties.privacyStatementUri, - url, - "csharp" -); -@@alternateType(GalleryApplicationProperties.releaseNoteUri, url, "csharp"); -@@alternateType(GalleryScriptProperties.privacyStatementUri, url, "csharp"); -@@alternateType(GalleryScriptProperties.releaseNoteUri, url, "csharp"); -@@alternateType(SharedGalleryImageProperties.privacyStatementUri, - url, - "csharp" -); -@@alternateType(CommunityGalleryInfo.publisherUri, url, "csharp"); -@@alternateType(CommunityGalleryMetadata.privacyStatementUri, url, "csharp"); -@@alternateType(CommunityGalleryImageProperties.privacyStatementUri, - url, - "csharp" -); - -// ── alternateType: string → ResourceIdentifier for C# (migration from AutoRest) ── - -// Wrapper model id properties → ResourceIdentifier -@@alternateType(GalleryArtifactVersionSource.id, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// Direct string properties → ResourceIdentifier -@@alternateType(GalleryArtifactVersionFullSource.virtualMachineId, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@alternateType(GalleryDiskImageSource.storageAccountId, - Azure.Core.armResourceIdentifier, - "csharp" -); -@@alternateType(DiskImageEncryption.diskEncryptionSetId, - Azure.Core.armResourceIdentifier, - "csharp" -); - -// ── PirCommunityGalleryResource.type: rename + retype for C# back-compat ── -// Spec emits `type?: string`. The previously shipped C# SDK exposed it as -// `ResourceType` of type `Azure.Core.ResourceType?`. Restore both. -@@clientName(PirCommunityGalleryResource.type, "ResourceType", "csharp"); -@@alternateType(PirCommunityGalleryResource.type, - Azure.Core.armResourceType, - "csharp" -); - -// ── alternateType: Identity → ManagedServiceIdentity for C# ── -@@alternateType(Gallery.identity, - Azure.ResourceManager.Foundations.ManagedServiceIdentity, - "csharp" -); -@@alternateType(GalleryUpdate.identity, - Azure.ResourceManager.Foundations.ManagedServiceIdentity, - "csharp" -); - - -// .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. -@@clientName(StorageAccountType.Standard_LRS, "StandardLrs", "csharp"); -@@clientName(StorageAccountType.Standard_ZRS, "StandardZrs", "csharp"); -@@clientName(StorageAccountType.Premium_LRS, "PremiumLrs", "csharp"); -@@clientName(StorageAccountType.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); - -@@clientName(EdgeZoneStorageAccountType.Standard_LRS, "StandardLrs", "csharp"); -@@clientName(EdgeZoneStorageAccountType.Standard_ZRS, "StandardZrs", "csharp"); -@@clientName(EdgeZoneStorageAccountType.StandardSSD_LRS, "StandardSsdLrs", "csharp"); -@@clientName(EdgeZoneStorageAccountType.Premium_LRS, "PremiumLrs", "csharp"); - -@@clientName(ConfidentialVMEncryptionType.EncryptedVMGuestStateOnlyWithPmk, - "EncryptedVmGuestStateOnlyWithPmk", - "csharp" -); - -@@clientName(PolicyViolationCategory.IpTheft, "IPTheft", "csharp"); - -@@clientName(StorageAccountStrategy.PreferStandard_ZRS, "PreferStandardZrs", "csharp"); -@@clientName(StorageAccountStrategy.DefaultStandard_LRS, "DefaultStandardLrs", "csharp"); - -// ── Azure.ClientGenerator.Core.Usage.input forces public ctor + property setters on output-only models ── -// .NET back-compat: GallerySoftDeletedResource previously shipped with a public -// parameterless ctor and writable properties. Restore via Azure.ClientGenerator.Core.Usage.input for csharp. -@@usage(GallerySoftDeletedResource, Azure.ClientGenerator.Core.Usage.input, "csharp"); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp deleted file mode 100644 index 9af3b303bf19..000000000000 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp +++ /dev/null @@ -1,8 +0,0 @@ -// Stub types for @@alternateType decorators. -// These resolve to real C# SDK types at generation time. -// The generator replaces the TypeSpec type with the specified C# type. - -namespace Azure.ResourceManager.Models { - model SubResource {} - model WritableSubResource {} -} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 5f6421fbf17c..d25bc762998c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -1,9 +1,8 @@ import "@azure-tools/typespec-client-generator-core"; import "./Compute/client.tsp"; import "./ComputeDisk/client.tsp"; -import "./ComputeGallery/client.tsp"; +import "./ComputeGallery/main.tsp"; import "./ComputeSku/main.tsp"; -import "./alternate-type-stubs.tsp"; using Azure.ClientGenerator.Core; using Common; @@ -12,6 +11,19 @@ using ComputeDisk; using ComputeGallery; using ComputeSku; +// ── region: alternate-type stub models ── +// Stub declarations for `Azure.ResourceManager.Models` types referenced by +// `@@alternateType` decorators in the per-service client.tsp files (e.g. mapping +// Common.SubResource → Azure.ResourceManager.Models.SubResource for csharp). +// These are TypeSpec-only placeholders — the .NET emitter resolves them to the +// real ARM common types from `Azure.ResourceManager` at generation time and the +// stubs themselves never appear in the emitted SDK or wire payload. +namespace Azure.ResourceManager.Models { + model SubResource {} + model WritableSubResource {} +} +// ── endregion ── + /** * Compute Client */ @@ -227,3 +239,1773 @@ namespace ComputeCombine; ); @@apiVersion(NetworkProfile.networkApiVersion, false); @@apiVersion(ResourceSku.apiVersions, false); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — ARM common-types / base-type alternateTypes (csharp) +// CommonTypes v3 defines Resource.id as string, but the .NET SDK base classes +// (ResourceData/TrackedResourceData) expect ResourceIdentifier. The per-VM +// model ids also need ResourceIdentifier for backward compat with AutoRest output. +// ════════════════════════════════════════════════════════════════════════════ + +// CommonTypes v3 defines Resource.id as string, but the .NET SDK base classes +// (ResourceData/TrackedResourceData) expect ResourceIdentifier. Override for csharp. +@@alternateType(Azure.ResourceManager.CommonTypes.Resource.id, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// ApiEntityReference.id flattens to XxxId on parent models. Old AutoRest SDK +// emitted these as ResourceIdentifier; preserve that contract for csharp. +@@alternateType(ApiEntityReference.id, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// VirtualMachineImageResource (renamed VirtualMachineImageBase in csharp) had +// Location typed as AzureLocation in the old SDK; the spec models it as string. +@@alternateType(VirtualMachineImageResource.location, + Azure.Core.azureLocation, + "csharp" +); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — NetworkApiVersion enum member casing (csharp) +// AutoRest-based SDK generated V20201101/V20221101 names; restore baseline. +// ════════════════════════════════════════════════════════════════════════════ + +@@clientName(NetworkApiVersion.`2020-11-01`, "V20201101", "csharp"); +@@clientName(NetworkApiVersion.`2022-11-01`, "V20221101", "csharp"); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — diskControllerType / Placement property renames (csharp) +// Restore baseline property names that differ from the TypeSpec-generated defaults. +// ════════════════════════════════════════════════════════════════════════════ + +@@clientName(Placement.zonePlacementPolicy, "ZonePlacementPolicyType", "csharp"); +@@clientName(VirtualMachineScaleSetStorageProfile.diskControllerType, + "DiskControllerKind", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateStorageProfile.diskControllerType, + "DiskControllerKind", + "csharp" +); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — AdditionalProperties model wrappers (csharp) +// AutoRest's swagger had `additionalProperties: true` on these models so the +// service can return undocumented private properties the SDK must round-trip. +// TypeSpec equivalent: spread Record in a wrapper model then swap via +// @@alternateType for csharp only (other languages never had the bag). +// ════════════════════════════════════════════════════════════════════════════ + +/** + * Describes an upgrade policy - automatic, manual, or rolling. + */ +model UpgradePolicyWithAdditionalProperties { + ...UpgradePolicy; + ...Record; +} +@@alternateType(UpgradePolicy, + UpgradePolicyWithAdditionalProperties, + "csharp" +); +@@clientName(UpgradePolicyWithAdditionalProperties, + "VirtualMachineScaleSetUpgradePolicy", + "csharp" +); + +/** + * Describes the properties of a Virtual Machine Scale Set. + */ +model VirtualMachineScaleSetPropertiesWithAdditionalProperties { + ...VirtualMachineScaleSetProperties; + ...Record; +} +@@alternateType(VirtualMachineScaleSetProperties, + VirtualMachineScaleSetPropertiesWithAdditionalProperties, + "csharp" +); +@@clientName(VirtualMachineScaleSetPropertiesWithAdditionalProperties, + "VirtualMachineScaleSetProperties", + "csharp" +); + +/** + * Describes the properties of a virtual machine scale set virtual machine. + */ +model VirtualMachineScaleSetVMPropertiesWithAdditionalProperties { + ...VirtualMachineScaleSetVMProperties; + ...Record; +} +@@alternateType(VirtualMachineScaleSetVMProperties, + VirtualMachineScaleSetVMPropertiesWithAdditionalProperties, + "csharp" +); +@@clientName(VirtualMachineScaleSetVMPropertiesWithAdditionalProperties, + "VirtualMachineScaleSetVmProperties", + "csharp" +); + +/** + * Specifies VM Size Property settings on the virtual machine. + */ +model VMSizePropertiesWithAdditionalProperties { + ...VMSizeProperties; + ...Record; +} +@@alternateType(VMSizeProperties, + VMSizePropertiesWithAdditionalProperties, + "csharp" +); +@@clientName(VMSizePropertiesWithAdditionalProperties, + "VirtualMachineSizeProperties", + "csharp" +); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — operation location fixes (csharp) +// Both "list" and "listAll" on the same interface produce "GetAll" collection +// result names, causing duplicate type names. Move listAll to a separate +// interface so each gets a unique collection result type name. +// ════════════════════════════════════════════════════════════════════════════ + +@@clientLocation(VirtualMachineScaleSets.listAll, + "VirtualMachineScaleSetsSubscription", + "csharp" +); +@@clientLocation(VirtualMachines.listAll, + "VirtualMachinesSubscription", + "csharp" +); +@@clientLocation(RestorePointCollections.listAll, + "RestorePointCollectionsSubscription", + "csharp" +); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — OperationGroup operation renames (csharp) +// Mirror the override-operation-name entries from the deleted autorest.md and +// restore names that match the previously shipped API surface. +// ════════════════════════════════════════════════════════════════════════════ + +// VirtualMachineImagesEdgeZoneOperationGroup ops renamed to old API names. +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listPublishers, + "GetPublishersVirtualMachineImagesEdgeZones", + "csharp" +); +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listOffers, + "GetOffersVirtualMachineImagesEdgeZones", + "csharp" +); +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listSkus, + "GetVirtualMachineImageEdgeZoneSkus", + "csharp" +); +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.list, + "GetVirtualMachineImagesEdgeZones", + "csharp" +); +@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.get, + "GetVirtualMachineImagesEdgeZone", + "csharp" +); + +// VirtualMachineImagesOperationGroup ops renamed to old API names. +@@clientName(VirtualMachineImagesOperationGroup.listPublishers, + "GetVirtualMachineImagePublishers", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.listOffers, + "GetVirtualMachineImageOffers", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.listSkus, + "GetVirtualMachineImageSkus", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.list, + "GetVirtualMachineImages", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.get, + "GetVirtualMachineImage", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.listByEdgeZone, + "GetVirtualMachineImagesByEdgeZone", + "csharp" +); +@@clientName(VirtualMachineImagesOperationGroup.listWithProperties, + "GetVirtualMachineImagesWithProperties", + "csharp" +); + +// Other OperationGroup ops renamed to old API names. +@@clientName(UsageOperationGroup.list, "GetUsages", "csharp"); +@@clientName(VirtualMachineSizesOperationGroup.list, + "GetVirtualMachineSizes", + "csharp" +); +@@clientName(VirtualMachineRunCommandsOperationGroup.list, + "GetVirtualMachineRunCommands", + "csharp" +); +@@clientName(VirtualMachineRunCommandsOperationGroup.get, + "GetVirtualMachineRunCommand", + "csharp" +); +@@clientName(LogAnalyticsOperationGroup.exportThrottledRequests, + "ExportLogAnalyticsThrottledRequests", + "csharp" +); +@@clientName(LogAnalyticsOperationGroup.exportRequestRateByInterval, + "ExportLogAnalyticsRequestRateByInterval", + "csharp" +); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — type renames (csharp) +// Restore backward-compatible C# type names from the AutoRest migration. +// ════════════════════════════════════════════════════════════════════════════ + +// VM sub-model renames: prefix with "VirtualMachine" to match old C# names. +@@clientName(DataDisk, "VirtualMachineDataDisk", "csharp"); +@@clientName(HardwareProfile, "VirtualMachineHardwareProfile", "csharp"); +@@clientName(NetworkProfile, "VirtualMachineNetworkProfile", "csharp"); +@@clientName(OSProfile, "VirtualMachineOSProfile", "csharp"); +@@clientName(StorageProfile, "VirtualMachineStorageProfile", "csharp"); +@@clientName(ManagedDiskParameters, "VirtualMachineManagedDisk", "csharp"); + +// VMSS sub-model renames. +@@clientName(UpgradePolicy, "VirtualMachineScaleSetUpgradePolicy", "csharp"); +@@clientName(PriorityMixPolicy, + "VirtualMachineScaleSetPriorityMixPolicy", + "csharp" +); + +// Enum singular←plural renames. +@@clientName(CachingTypes, "CachingType", "csharp"); +@@clientName(DiskCreateOptionTypes, "DiskCreateOptionType", "csharp"); +@@clientName(DiskDeleteOptionTypes, "DiskDeleteOptionType", "csharp"); +@@clientName(DiskDetachOptionTypes, "DiskDetachOptionType", "csharp"); + +// RP-prefix renames. +@@clientName(Plan, "ComputePlan", "csharp"); +@@clientName(SkuProfile, "ComputeSkuProfile", "csharp"); +@@clientName(UpdateResource, "ComputeResourcePatch", "csharp"); + +// Base type rename. +@@clientName(VirtualMachineImageResource, "VirtualMachineImageBase", "csharp"); + +// Long enum/type renames. +@@clientName(ExpandTypesForGetCapacityReservationGroups, + "CapacityReservationGroupGetExpand", + "csharp" +); + +// VM→Vm casing renames (old C# convention used lowercase "Vm"). +@@clientName(VirtualMachineScaleSetVMInstanceIDs, + "VirtualMachineScaleSetVmInstanceIds", + "csharp" +); +@@clientName(ResilientVMDeletionStatus, "ResilientVmDeletionStatus", "csharp"); +@@clientName(LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + "LinuxVmGuestPatchAutomaticByPlatformRebootSetting", + "csharp" +); +@@clientName(WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + "WindowsVmGuestPatchAutomaticByPlatformRebootSetting", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMInstanceView, + "VirtualMachineScaleSetVmInstanceView", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMProperties, + "VirtualMachineScaleSetVmProperties", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMProtectionPolicy, + "VirtualMachineScaleSetVmProtectionPolicy", + "csharp" +); + +// Enum/union plural→singular renames. +@@clientName(ArchitectureTypes, "ArchitectureType", "csharp"); +@@clientName(ConsistencyModeTypes, "ConsistencyModeType", "csharp"); +@@clientName(DedicatedHostLicenseTypes, "DedicatedHostLicenseType", "csharp"); +@@clientName(OperatingSystemStateTypes, "OperatingSystemStateType", "csharp"); +@@clientName(OrchestrationServiceNames, "OrchestrationServiceName", "csharp"); +@@clientName(VirtualMachineEvictionPolicyTypes, + "VirtualMachineEvictionPolicyType", + "csharp" +); +@@clientName(VirtualMachinePriorityTypes, + "VirtualMachinePriorityType", + "csharp" +); +@@clientName(VirtualMachineScaleSetScaleInRules, + "VirtualMachineScaleSetScaleInRule", + "csharp" +); +@@clientName(VMGuestPatchClassificationLinux, + "VmGuestPatchClassificationForLinux", + "csharp" +); +@@clientName(VMGuestPatchClassificationWindows, + "VmGuestPatchClassificationForWindows", + "csharp" +); + +// Model casing renames. +@@clientName(DedicatedHostAllocatableVM, + "DedicatedHostAllocatableVm", + "csharp" +); + +// Resource type VM→Vm casing renames (backward compat with AutoRest output). +@@clientName(VirtualMachineScaleSetVM, "VirtualMachineScaleSetVm", "csharp"); +@@clientName(VirtualMachineScaleSetVMExtension, + "VirtualMachineScaleSetVmExtension", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMNetworkProfileConfiguration, + "VirtualMachineScaleSetVmNetworkProfileConfiguration", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMInstanceRequiredIDs, + "VirtualMachineScaleSetVmInstanceRequiredIds", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMExtensionsSummary, + "VirtualMachineScaleSetVmExtensionsSummary", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMReimageParameters, + "VirtualMachineScaleSetVmReimageContent", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMExtensionUpdate, + "VirtualMachineScaleSetVmExtensionPatch", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMExtensionsListResult, + "VirtualMachineScaleSetVmExtensionsListResult", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMListResult, + "VirtualMachineScaleSetVmListResult", + "csharp" +); + +// RP-prefix renames (old AutoRest prepend-rp-prefix convention). +@@clientName(ApiError, "ComputeApiError", "csharp"); +@@clientName(Placement, "VirtualMachinePlacement", "csharp"); +@@clientName(ScheduledEventsProfile, "ComputeScheduledEventsProfile", "csharp"); +@@clientName(SubResourceWithColocationStatus, + "ComputeSubResourceDataWithColocationStatus", + "csharp" +); +@@clientName(UsageName, "ComputeUsageName", "csharp"); +// `OperatingSystemTypes` (closed enum, Windows/Linux) was named `SupportedOperatingSystemType` +// in the old SDK; the union `OperatingSystemType` kept its spec name (extensible struct). +@@clientName(OperatingSystemTypes, "SupportedOperatingSystemType", "csharp"); +@@clientName(ReservationType, "CapacityReservationType", "csharp"); +@@clientName(ApiErrorBase, "ComputeApiErrorBase", "csharp"); +@@clientName(VMGalleryApplication, + "VirtualMachineGalleryApplication", + "csharp" +); +@@clientName(NetworkInterfaceReference, + "VirtualMachineNetworkInterfaceReference", + "csharp" +); +@@clientName(SkuProfileVMSize, "ComputeSkuProfileVmSize", "csharp"); +@@clientName(VirtualMachineScaleSetVMProfile, + "VirtualMachineScaleSetVmProfile", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateVMProfile, + "VirtualMachineScaleSetUpdateVmProfile", + "csharp" +); + +// Accessibility overrides (types generated as internal that should be public). +@@access(VirtualMachineScaleSetVMProfile, Access.public, "csharp"); +@@access(VirtualMachineScaleSetProperties, Access.public, "csharp"); +@@access(VirtualMachineScaleSetUpdateVMProfile, Access.public, "csharp"); +@@access(VirtualMachineScaleSetVMProperties, Access.public, "csharp"); + +// Rename listByLocation operations to avoid name collision (both map to GetByLocation). +@@clientName(VirtualMachinesOperationGroup.listByLocation, + "GetVirtualMachinesByLocation", + "csharp" +); +@@clientName(VirtualMachineScaleSetsOperationGroup.listByLocation, + "GetVirtualMachineScaleSetsByLocation", + "csharp" +); + +// Rename extension property "type" to avoid conflict with base class "Type" property. +@@clientName(VirtualMachineScaleSetExtensionProperties.type, + "ExtensionType", + "csharp" +); +@@clientName(VirtualMachineExtensionProperties.type, "ExtensionType", "csharp"); +@@clientName(VirtualMachineExtensionUpdateProperties.type, + "ExtensionType", + "csharp" +); + +// Disable safe-flatten on AllInstancesDown / UserInitiatedRedeploy so they remain +// public types in the C# SDK (preserves backward compatibility with previously shipped surface). +#suppress "@azure-tools/typespec-client-generator-core/client-option" "Preserve type for public API surface" +#suppress "@azure-tools/typespec-client-generator-core/client-option-requires-scope" "Preserve type for public API surface" +@@clientOption(UserInitiatedRedeploy, "disable-safe-flatten", true, "csharp"); +#suppress "@azure-tools/typespec-client-generator-core/client-option" "Preserve type for public API surface" +#suppress "@azure-tools/typespec-client-generator-core/client-option-requires-scope" "Preserve type for public API surface" +@@clientOption(AllInstancesDown, "disable-safe-flatten", true, "csharp"); + +// Resource type rename for backward compatibility. +@@clientName(RollingUpgradeStatusInfo, + "VirtualMachineScaleSetRollingUpgrade", + "csharp" +); +@@clientName(RollingUpgradeStatusInfoProperties, + "VirtualMachineScaleSetRollingUpgradeProperties", + "csharp" +); + +// ARM resource renames for backward compatibility. +// Image → DiskImage (old: DiskImageResource, DiskImageData, DiskImageCollection). +@@clientName(Image, "DiskImage", "csharp"); + +// RestorePointCollection → RestorePointGroup (old: RestorePointGroupResource, RestorePointGroupData). +@@clientName(RestorePointCollection, "RestorePointGroup", "csharp"); +@@clientName(RestorePointCollectionSourceProperties, + "RestorePointGroupSource", + "csharp" +); + +// Rename non-resource model SshPublicKey → SshPublicKeyConfiguration to free the name, +// then rename the resource model SshPublicKeyResource → SshPublicKey. +@@clientName(Compute.SshPublicKey, "SshPublicKeyConfiguration", "csharp"); +@@clientName(SshPublicKeyResource, "SshPublicKey", "csharp"); + +// VirtualMachineScaleSetVMRunCommands interface → Vm casing. +@@clientName(VirtualMachineScaleSetVMRunCommands, + "VirtualMachineScaleSetVmRunCommands", + "csharp" +); + +// Mark non-pageable list operations as pageable for backward compatibility. +@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineExtensions.list, + "csharp" +); +@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineScaleSetVMExtensions.list, + "csharp" +); +@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineImagesOperationGroup.listByEdgeZone, + "csharp" +); + +// Type renames (batch). +@@clientName(PublicIPAddressSku, "ComputePublicIPAddressSku", "csharp"); +@@clientName(SecurityPostureReference, + "ComputeSecurityPostureReference", + "csharp" +); +@@clientName(StatusLevelTypes, "ComputeStatusLevelType", "csharp"); +@@clientName(UpgradeMode, "VirtualMachineScaleSetUpgradeMode", "csharp"); +@@clientName(SettingNames, "SettingName", "csharp"); +@@clientName(ProtocolTypes, "WinRMListenerProtocolType", "csharp"); +@@clientName(InstanceViewTypes, "InstanceViewType", "csharp"); +@@clientName(MaintenanceOperationResultCodeTypes, + "MaintenanceOperationResultCodeType", + "csharp" +); +@@clientName(OSDisk, "VirtualMachineOSDisk", "csharp"); +@@clientName(VMDiskSecurityProfile, + "VirtualMachineDiskSecurityProfile", + "csharp" +); +@@clientName(VMSizeProperties, "VirtualMachineSizeProperties", "csharp"); +@@clientName(VirtualMachineScaleSetManagedDiskParameters, + "VirtualMachineScaleSetManagedDisk", + "csharp" +); +@@clientName(AlternativeOption, "ImageAlternativeOption", "csharp"); +@@clientName(LogAnalyticsOperationResult, "LogAnalytics", "csharp"); +@@clientName(RunCommandResult, "VirtualMachineRunCommandResult", "csharp"); +@@clientName(ConvertToVirtualMachineScaleSetInput, + "ConvertToVirtualMachineScaleSetContent", + "csharp" +); +@@clientName(MigrateVMToVirtualMachineScaleSetInput, + "MigrateVmToVirtualMachineScaleSetContent", + "csharp" +); +@@clientName(OrchestrationServiceStateInput, + "OrchestrationServiceStateContent", + "csharp" +); +@@clientName(RequestRateByIntervalInput, + "RequestRateByIntervalContent", + "csharp" +); +@@clientName(ThrottledRequestsInput, "ThrottledRequestsContent", "csharp"); +@@clientName(VirtualMachineCaptureParameters, + "VirtualMachineCaptureContent", + "csharp" +); +@@clientName(VirtualMachineInstallPatchesParameters, + "VirtualMachineInstallPatchesContent", + "csharp" +); +@@clientName(VirtualMachineReimageParameters, + "VirtualMachineReimageContent", + "csharp" +); +@@clientName(VirtualMachineScaleSetReimageParameters, + "VirtualMachineScaleSetReimageContent", + "csharp" +); +@@clientName(VMScaleSetConvertToSinglePlacementGroupInput, + "VirtualMachineScaleSetConvertToSinglePlacementGroupContent", + "csharp" +); +@@clientName(VMScaleSetScaleOutInput, + "VirtualMachineScaleSetScaleOutContent", + "csharp" +); +@@clientName(SshGenerateKeyPairInputParameters, + "SshGenerateKeyPairInputContent", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateProperties, + "VirtualMachineScaleSetPatchProperties", + "csharp" +); +@@clientName(ExpandTypeForListVMs, "GetVirtualMachineExpandType", "csharp"); +@@clientName(ExpandTypesForGetVMScaleSets, + "VirtualMachineScaleSetGetExpand", + "csharp" +); +@@clientName(Modes, "HostEndpointSettingsMode", "csharp"); + +// ── Plural→singular enum renames (C# backward compat) ── +@@clientName(CapacityReservationGroupInstanceViewTypes, + "CapacityReservationGroupInstanceViewType", + "csharp" +); +@@clientName(CapacityReservationInstanceViewTypes, + "CapacityReservationInstanceViewType", + "csharp" +); +@@clientName(DiffDiskOptions, "DiffDiskOption", "csharp"); +@@clientName(DiskControllerTypes, "DiskControllerType", "csharp"); +@@clientName(DomainNameLabelScopeTypes, "DomainNameLabelScopeType", "csharp"); +@@clientName(ExpandTypesForListVMs, "ExpandTypesForListVm", "csharp"); +@@clientName(ResourceIdOptionsForGetCapacityReservationGroups, + "ResourceIdOptionsForGetCapacityReservationGroup", + "csharp" +); +@@clientName(ScriptShellTypes, "ScriptShellType", "csharp"); +@@clientName(SecurityEncryptionTypes, "SecurityEncryptionType", "csharp"); +@@clientName(SecurityTypes, "SecurityType", "csharp"); +@@clientName(SshEncryptionTypes, "SshEncryptionType", "csharp"); +@@clientName(StorageAccountTypes, "StorageAccountType", "csharp"); +@@clientName(VirtualMachineSizeTypes, "VirtualMachineSizeType", "csharp"); + +// ── RP-prefix renames (C# backward compat) ── +@@clientName(AllocationStrategy, "ComputeAllocationStrategy", "csharp"); +@@clientName(DeleteOptions, "ComputeDeleteOption", "csharp"); +@@clientName(NetworkInterfaceAuxiliaryMode, + "ComputeNetworkInterfaceAuxiliaryMode", + "csharp" +); +@@clientName(NetworkInterfaceAuxiliarySku, + "ComputeNetworkInterfaceAuxiliarySku", + "csharp" +); +@@clientName(PublicIPAddressSkuName, "ComputePublicIPAddressSkuName", "csharp"); +@@clientName(PublicIPAddressSkuTier, "ComputePublicIPAddressSkuTier", "csharp"); + +// ── VM→Vm casing renames (C# backward compat) ── +@@clientName(LinuxVMGuestPatchAutomaticByPlatformSettings, + "LinuxVmGuestPatchAutomaticByPlatformSettings", + "csharp" +); +@@clientName(LinuxVMGuestPatchMode, "LinuxVmGuestPatchMode", "csharp"); +@@clientName(VMGuestPatchRebootBehavior, + "VmGuestPatchRebootBehavior", + "csharp" +); +@@clientName(VMGuestPatchRebootSetting, "VmGuestPatchRebootSetting", "csharp"); +@@clientName(VMGuestPatchRebootStatus, "VmGuestPatchRebootStatus", "csharp"); +@@clientName(WindowsVMGuestPatchAutomaticByPlatformSettings, + "WindowsVmGuestPatchAutomaticByPlatformSettings", + "csharp" +); +@@clientName(WindowsVMGuestPatchMode, "WindowsVmGuestPatchMode", "csharp"); + +// ── IP→Ip casing renames (C# backward compat) ── +@@clientName(VirtualMachineIpTag, "VirtualMachineIPTag", "csharp"); +@@clientName(VirtualMachineScaleSetIpTag, + "VirtualMachineScaleSetIPTag", + "csharp" +); + +// ── Other renames (C# backward compat) ── +@@clientName(AlternativeType, "ImageAlternativeType", "csharp"); +@@clientName(RestorePointExpandOptions, "RestorePointExpand", "csharp"); +@@clientName(RestorePointCollectionExpandOptions, + "RestorePointGroupExpand", + "csharp" +); +@@clientName(RestorePointSourceVMDataDisk, + "RestorePointSourceVmDataDisk", + "csharp" +); +@@clientName(RestorePointSourceVMOSDisk, + "RestorePointSourceVmOSDisk", + "csharp" +); +@@clientName(RestorePointSourceVMStorageProfile, + "RestorePointSourceVmStorageProfile", + "csharp" +); +@@clientName(RebalanceBehavior, "VmssRebalanceBehavior", "csharp"); +@@clientName(RebalanceStrategy, "VmssRebalanceStrategy", "csharp"); +@@clientName(VmDiskTypes, "VirtualMachineDiskType", "csharp"); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — property renames (csharp) +// ════════════════════════════════════════════════════════════════════════════ + +// ── Os→OS property casing renames (C# backward compat) ── +@@clientName(VirtualMachineSize.osDiskSizeInMB, "OSDiskSizeInMB", "csharp"); +@@clientName(AutomaticOSUpgradePolicy.osRollingUpgradeDeferral, + "OSRollingUpgradeDeferral", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMProfile.osProfile, "OSProfile", "csharp"); +@@clientName(VirtualMachineScaleSetStorageProfile.osDisk, "OSDisk", "csharp"); +@@clientName(VirtualMachineScaleSetOSDisk.osType, "OSType", "csharp"); +@@clientName(ScheduledEventsProfile.osImageNotificationProfile, + "OSImageNotificationProfile", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateVMProfile.osProfile, + "OSProfile", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateStorageProfile.osDisk, + "OSDisk", + "csharp" +); +@@clientName(VirtualMachineReimageParameters.osProfile, "OSProfile", "csharp"); +@@clientName(VirtualMachineScaleSetVMProperties.osProfile, + "OSProfile", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMInstanceView.osName, "OSName", "csharp"); +@@clientName(VirtualMachineScaleSetVMInstanceView.osVersion, + "OSVersion", + "csharp" +); +@@clientName(StorageProfile.osDisk, "OSDisk", "csharp"); +@@clientName(OSDisk.osType, "OSType", "csharp"); +@@clientName(VirtualMachineProperties.osProfile, "OSProfile", "csharp"); +@@clientName(VirtualMachineInstanceView.osName, "OSName", "csharp"); +@@clientName(VirtualMachineInstanceView.osVersion, "OSVersion", "csharp"); +@@clientName(VirtualMachineImageProperties.osDiskImage, + "OSDiskImage", + "csharp" +); +@@clientName(ImageStorageProfile.osDisk, "OSDisk", "csharp"); +@@clientName(ImageOSDisk.osType, "OSType", "csharp"); +@@clientName(ImageOSDisk.osState, "OSState", "csharp"); +@@clientName(RestorePointSourceMetadata.osProfile, "OSProfile", "csharp"); +@@clientName(RestorePointSourceVMStorageProfile.osDisk, "OSDisk", "csharp"); +@@clientName(RestorePointSourceVMOSDisk.osType, "OSType", "csharp"); +@@clientName(RunCommandDocumentBase.osType, "OSType", "csharp"); + +// ── Property casing renames: acronym case normalization (C# backward compat) ── +@@clientName(AdditionalCapabilities.ultraSSDEnabled, + "UltraSsdEnabled", + "csharp" +); +@@clientName(DedicatedHostGroupPropertiesAdditionalCapabilities.ultraSSDEnabled, + "UltraSsdEnabled", + "csharp" +); +@@clientName(DedicatedHostGroupProperties.hosts, "DedicatedHosts", "csharp"); +@@clientName(HostEndpointSettings.inVMAccessControlProfileReferenceId, + "InVmAccessControlProfileReferenceId", + "csharp" +); +@@clientName(LinuxConfiguration.enableVMAgentPlatformUpdates, + "IsVmAgentPlatformUpdatesEnabled", + "csharp" +); +@@clientName(LinuxConfiguration.disablePasswordAuthentication, + "IsPasswordAuthenticationDisabled", + "csharp" +); +@@clientName(LinuxConfiguration.provisionVMAgent, "ProvisionVmAgent", "csharp"); +@@clientName(WindowsConfiguration.enableAutomaticUpdates, + "IsAutomaticUpdatesEnabled", + "csharp" +); +// Rename the nested-model parent properties so the auto-flattened C# names +// become ResilientVm... instead of ResilientVM... (matches v1.14.0 baseline). +@@clientName(ResiliencyPolicy.resilientVMCreationPolicy, + "resilientVmCreationPolicy", + "csharp" +); +@@clientName(ResiliencyPolicy.resilientVMDeletionPolicy, + "resilientVmDeletionPolicy", + "csharp" +); +@@clientName(WindowsConfiguration.provisionVMAgent, + "ProvisionVmAgent", + "csharp" +); +@@clientName(ScaleInPolicy.prioritizeUnhealthyVMs, + "PrioritizeUnhealthyVms", + "csharp" +); +@@clientName(DataDisk.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); +@@clientName(VirtualMachineInstanceView.isVMInStandbyPool, + "IsVmInStandbyPool", + "csharp" +); +@@clientName(VirtualMachineScaleSetDataDisk.diskIOPSReadWrite, + "DiskIopsReadWrite", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateProperties.doNotRunExtensionsOnOverprovisionedVMs, + "DoNotRunExtensionsOnOverprovisionedVms", + "csharp" +); +@@clientName(VirtualMachineScaleSetProperties.doNotRunExtensionsOnOverprovisionedVMs, + "DoNotRunExtensionsOnOverprovisionedVms", + "csharp" +); +@@clientName(VirtualMachineScaleSetVMProperties.resilientVMDeletionStatus, + "ResilientVmDeletionStatus", + "csharp" +); +@@clientName(VMSizeProperties.vCPUsAvailable, "VCpusAvailable", "csharp"); +@@clientName(VMSizeProperties.vCPUsPerCore, "VCpusPerCore", "csharp"); +@@clientName(StorageProfile.alignRegionalDisksToVMZone, + "AlignRegionalDisksToVmZone", + "csharp" +); +@@clientName(MigrateVMToVirtualMachineScaleSetInput.targetVMSize, + "TargetVmSize", + "csharp" +); +@@clientName(VirtualMachineExtensionImageProperties.vmScaleSetEnabled, + "VirtualMachineScaleSetEnabled", + "csharp" +); + +// ── IP→Ip property casing renames (C# backward compat) ── +@@clientName(VirtualMachineIpTag.ipTagType, "IPTagType", "csharp"); +@@clientName(VirtualMachineScaleSetIpTag.ipTagType, "IPTagType", "csharp"); +@@clientName(VirtualMachineNetworkInterfaceConfigurationProperties.ipConfigurations, + "IPConfigurations", + "csharp" +); +@@clientName(VirtualMachinePublicIPAddressConfigurationProperties.ipTags, + "IPTags", + "csharp" +); +@@clientName(VirtualMachineScaleSetNetworkConfigurationProperties.ipConfigurations, + "IPConfigurations", + "csharp" +); +@@clientName(VirtualMachineScaleSetPublicIPAddressConfigurationProperties.ipTags, + "IPTags", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.ipConfigurations, + "IPConfigurations", + "csharp" +); + +// ── Is* prefix / verb prefix property renames (C# backward compat) ── +@@clientName(EventGridAndResourceGraph.enable, "IsEnabled", "csharp"); +@@clientName(RollingUpgradePolicy.maxSurge, "IsMaxSurgeEnabled", "csharp"); +@@clientName(UefiSettings.secureBootEnabled, "IsSecureBootEnabled", "csharp"); +@@clientName(UefiSettings.vTpmEnabled, "IsVirtualTpmEnabled", "csharp"); +@@clientName(VirtualMachineScaleSetProperties.constrainedMaximumCapacity, + "IsMaximumCapacityConstrained", + "csharp" +); +@@clientName(WindowsConfiguration.enableVMAgentPlatformUpdates, + "IsVmAgentPlatformUpdatesEnabled", + "csharp" +); +@@clientName(VirtualMachineNetworkInterfaceConfigurationProperties.disableTcpStateTracking, + "IsTcpStateTrackingDisabled", + "csharp" +); +@@clientName(VirtualMachineScaleSetNetworkConfigurationProperties.disableTcpStateTracking, + "IsTcpStateTrackingDisabled", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.disableTcpStateTracking, + "IsTcpStateTrackingDisabled", + "csharp" +); + +// ── Qualified property name renames (C# backward compat) ── +@@clientName(AlternativeOption.type, "AlternativeType", "csharp"); +@@clientName(RestorePointEncryption.type, "EncryptionType", "csharp"); +@@clientName(RunCommandParameterDefinition.type, + "RunCommandParameterDefinitionType", + "csharp" +); +@@clientName(UpgradeOperationHistoricalStatusInfo.type, + "UpgradeOperationHistoricalStatusInfoType", + "csharp" +); +@@clientName(VirtualMachineExtensionHandlerInstanceView.type, + "VirtualMachineExtensionHandlerInstanceViewType", + "csharp" +); +@@clientName(VirtualMachineExtensionInstanceView.type, + "VirtualMachineExtensionInstanceViewType", + "csharp" +); + +// ── Other property renames (C# backward compat) ── +@@clientName(ImageReference.sharedGalleryImageId, + "SharedGalleryImageUniqueId", + "csharp" +); +@@clientName(OrchestrationServiceSummary.lastStatusChangeTime, + "LastStatusChangedOn", + "csharp" +); +@@clientName(RestorePointCollectionProperties.restorePointCollectionId, + "RestorePointGroupId", + "csharp" +); +@@clientName(VMScaleSetScaleOutInputProperties.zone, + "VmScaleSetScaleOutInputZone", + "csharp" +); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — alternateType remappings (csharp) +// ════════════════════════════════════════════════════════════════════════════ + +// ── alternateType: string → ResourceIdentifier (C# backward compat) ── + +// Wrapper model id properties → ResourceIdentifier. +@@alternateType(ServiceArtifactReference.id, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(SecurityPostureReference.id, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(SshPublicKeyGenerateKeyPairResult.id, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(RestorePointCollectionSourceProperties.id, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// Direct string properties → ResourceIdentifier. +@@alternateType(VirtualMachineScaleSetVMInstanceView.assignedHost, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// ── alternateType: string → Uri (C# backward compat) ── +@@alternateType(BootDiagnostics.storageUri, url, "csharp"); +@@alternateType(BootDiagnosticsInstanceView.consoleScreenshotBlobUri, + url, + "csharp" +); +@@alternateType(BootDiagnosticsInstanceView.serialConsoleLogBlobUri, + url, + "csharp" +); +@@alternateType(ImageDisk.blobUri, url, "csharp"); +@@alternateType(KeyVaultKeyReference.keyUrl, url, "csharp"); +@@alternateType(KeyVaultSecretReference.secretUrl, url, "csharp"); +@@alternateType(LogAnalyticsInputBase.blobContainerSasUri, url, "csharp"); +@@alternateType(RetrieveBootDiagnosticsDataResult.consoleScreenshotBlobUri, + url, + "csharp" +); +@@alternateType(RetrieveBootDiagnosticsDataResult.serialConsoleLogBlobUri, + url, + "csharp" +); +@@alternateType(VaultCertificate.certificateUrl, url, "csharp"); +@@alternateType(VirtualHardDisk.uri, url, "csharp"); +@@alternateType(VirtualMachineRunCommandProperties.outputBlobUri, + url, + "csharp" +); +@@alternateType(VirtualMachineRunCommandProperties.errorBlobUri, url, "csharp"); +@@alternateType(VirtualMachineRunCommandScriptSource.scriptUri, url, "csharp"); +@@alternateType(WinRMListener.certificateUrl, url, "csharp"); + +// ── alternateType: Identity types → ManagedServiceIdentity (C# backward compat) ── +@@alternateType(VirtualMachineScaleSet.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdate.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(VirtualMachineScaleSetVM.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(VirtualMachine.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(VirtualMachineUpdate.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); + +// ── alternateType: SubResource[] for C# backward compat ── +@@alternateType(AvailabilitySetProperties.virtualMachines, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationGatewayBackendAddressPools, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationSecurityGroups, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerBackendAddressPools, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerInboundNatPools, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(DedicatedHostGroupProperties.hosts, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(DedicatedHostProperties.virtualMachines, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(CapacityReservationGroupProperties.capacityReservations, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(CapacityReservationGroupProperties.virtualMachinesAssociated, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(CapacityReservationProperties.virtualMachinesAssociated, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(CapacityReservationUtilization.virtualMachinesAllocated, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(ResourceSharingProfile.subscriptionIds, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); +@@alternateType(CapacityReservationGroupInstanceView.sharedSubscriptionIds, + Azure.ResourceManager.Models.SubResource[], + "csharp" +); +@@alternateType(RestorePointProperties.excludeDisks, + Azure.ResourceManager.Models.WritableSubResource[], + "csharp" +); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — extensible enum wrappers (csharp) +// The old SDK had these as extensible enums (readonly struct). TypeSpec defines +// them as closed unions, which would generate fixed enums. Define extensible +// wrappers and use @@alternateType to replace all usages automatically. +// ════════════════════════════════════════════════════════════════════════════ + +/** + * The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. + */ +union ComponentName { + ComponentNames, + string, +} + +/** + * The pass name. Currently, the only allowable value is OobeSystem. + */ +union PassName { + PassNames, + string, +} + +@@alternateType(ComponentNames, ComponentName, "csharp"); +@@alternateType(PassNames, PassName, "csharp"); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — VirtualMachineSizeType member casing (csharp) +// The generator lowercases size suffixes (s, m, r) differently from old SDK. +// ════════════════════════════════════════════════════════════════════════════ + +@@clientName(VirtualMachineSizeTypes.Standard_A2m_v2, "StandardA2MV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_A4m_v2, "StandardA4MV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_A8m_v2, "StandardA8MV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_B1ms, "StandardB1Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_B1s, "StandardB1S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_B2ms, "StandardB2Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_B2s, "StandardB2S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_B4ms, "StandardB4Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_B8ms, "StandardB8Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_D16s_v3, "StandardD16SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_D2s_v3, "StandardD2SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_D32s_v3, "StandardD32SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_D4s_v3, "StandardD4SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_D64s_v3, "StandardD64SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_D8s_v3, "StandardD8SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_E16s_v3, "StandardE16SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_E2s_v3, "StandardE2SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E32-8s_v3`, "StandardE328SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_E32s_v3, "StandardE32SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_E4s_v3, "StandardE4SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E64-16s_v3`, "StandardE6416SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_E64-32s_v3`, "StandardE6432SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_E64s_v3, "StandardE64SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_E8s_v3, "StandardE8SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F16s, "StandardF16S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F16s_v2, "StandardF16SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F1s, "StandardF1S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F2s, "StandardF2S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F2s_v2, "StandardF2SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F32s_v2, "StandardF32SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F4s, "StandardF4S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F4s_v2, "StandardF4SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F64s_v2, "StandardF64SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F72s_v2, "StandardF72SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F8s, "StandardF8S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_F8s_v2, "StandardF8SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_H16m, "StandardH16M", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_H16mr, "StandardH16Mr", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_H16r, "StandardH16R", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_H8m, "StandardH8M", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_L16s, "StandardL16S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_L32s, "StandardL32S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_L4s, "StandardL4S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_L8s, "StandardL8S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M128-32ms`, "StandardM12832Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M128-64ms`, "StandardM12864Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_M128ms, "StandardM128Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_M128s, "StandardM128S", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M64-16ms`, "StandardM6416Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.`Standard_M64-32ms`, "StandardM6432Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_M64ms, "StandardM64Ms", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_M64s, "StandardM64S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_NC12s_v2, "StandardNC12SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_NC12s_v3, "StandardNC12SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_NC24r, "StandardNC24R", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_NC24rs_v2, "StandardNC24RsV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_NC24rs_v3, "StandardNC24RsV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_NC24s_v2, "StandardNC24SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_NC24s_v3, "StandardNC24SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_NC6s_v2, "StandardNC6SV2", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_NC6s_v3, "StandardNC6SV3", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_ND12s, "StandardND12S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_ND24rs, "StandardND24Rs", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_ND24s, "StandardND24S", "csharp"); +@@clientName(VirtualMachineSizeTypes.Standard_ND6s, "StandardND6S", "csharp"); + +// ════════════════════════════════════════════════════════════════════════════ +// region: Compute — ComputeUsageUnit extensible enum + Usage.input (csharp) +// The spec narrows Usage.unit to string literal "Count"; retype to a union so +// the C# emitter generates the extensible-enum struct used in v1.13.1 baseline. +// ════════════════════════════════════════════════════════════════════════════ + +union ComputeUsageUnit { + string, + + /** The unit of measurement is a count. */ + Count: "Count", +} +@@alternateType(Compute.Usage.unit, ComputeUsageUnit, "csharp"); + +// .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. +@@clientName(StorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(StorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); +@@clientName(StorageAccountTypes.StandardSSD_LRS, "StandardSsdLrs", "csharp"); +@@clientName(StorageAccountTypes.UltraSSD_LRS, "UltraSsdLrs", "csharp"); +@@clientName(StorageAccountTypes.Premium_ZRS, "PremiumZrs", "csharp"); +@@clientName(StorageAccountTypes.StandardSSD_ZRS, "StandardSsdZrs", "csharp"); +@@clientName(StorageAccountTypes.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); + +@@clientName(SecurityTypes.ConfidentialVM, "ConfidentialVm", "csharp"); + +@@clientName(SecurityEncryptionTypes.VMGuestStateOnly, "VmGuestStateOnly", "csharp"); +@@clientName(SecurityEncryptionTypes.DiskWithVMGuestState, + "DiskWithVmGuestState", + "csharp" +); + +@@clientName(DiskControllerTypes.SCSI, "Scsi", "csharp"); + +@@clientName(VirtualMachineScaleSetScaleInRules.OldestVM, "OldestVm", "csharp"); +@@clientName(VirtualMachineScaleSetScaleInRules.NewestVM, "NewestVm", "csharp"); + +@@clientName(ExpandTypesForGetCapacityReservationGroups.`virtualMachineScaleSetVMs/$ref`, + "VirtualMachineScaleSetVmsRef", + "csharp" +); +@@clientName(ExpandTypesForGetCapacityReservationGroups.`virtualMachines/$ref`, + "VirtualMachinesRef", + "csharp" +); + +// ── Azure.ClientGenerator.Core.Usage.input forces public ctor + property setters on output-only models ── +// .NET back-compat: these models previously shipped (via AutoRest) with a public +// parameterless ctor and writable properties. TypeSpec's default Output-only usage +// removes both. Force Azure.ClientGenerator.Core.Usage.input for csharp to restore the legacy surface. +@@usage(VirtualMachineImage, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(VirtualMachineImageResource, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(VirtualMachineExtensionImage, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(VirtualMachineImageFeature, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(ImageDeprecationStatus, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(AlternativeOption, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(PurchasePlan, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(SubResourceWithColocationStatus, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(RollingUpgradeStatusInfo, Azure.ClientGenerator.Core.Usage.input, "csharp"); + +// ════════════════════════════════════════════════════════════════════════════ +// region: ComputeDisk — type/property renames (csharp) +// Restore backward-compatible C# names for the Disk RP during TypeSpec migration. +// ════════════════════════════════════════════════════════════════════════════ + +// ── Os→OS property casing renames (C# backward compat) ── +@@clientName(DiskProperties.osType, "OSType", "csharp"); +@@clientName(DiskUpdateProperties.osType, "OSType", "csharp"); +@@clientName(DiskRestorePointProperties.osType, "OSType", "csharp"); +@@clientName(SnapshotProperties.osType, "OSType", "csharp"); +@@clientName(SnapshotUpdateProperties.osType, "OSType", "csharp"); + +// C# renames for backward compatibility (migration from AutoRest). +@@clientName(CreationData, "DiskCreationData", "csharp"); +@@clientName(FileFormat, "DiskImageFileFormat", "csharp"); +@@clientName(PublicNetworkAccess, "DiskPublicNetworkAccess", "csharp"); +@@clientName(EncryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(Encryption, "DiskEncryption", "csharp"); + +// ARM resource renames for backward compatibility. +// Disk → ManagedDisk (old: ManagedDiskResource, ManagedDiskData, ManagedDiskCollection). +@@clientName(Disk, "ManagedDisk", "csharp"); + +// PrivateEndpointConnection → ComputePrivateEndpointConnection (old RP-prefix convention). +@@clientName(PrivateEndpointConnection, + "ComputePrivateEndpointConnection", + "csharp" +); + +// Type rename for backward compatibility. +@@clientName(PrivateLinkResource, "ComputePrivateLinkResourceData", "csharp"); + +// ── Plural→singular enum renames (C# backward compat) ── +@@clientName(DiskSecurityTypes, "DiskSecurityType", "csharp"); +@@clientName(DiskStorageAccountTypes, "DiskStorageAccountType", "csharp"); +@@clientName(SnapshotStorageAccountTypes, "SnapshotStorageAccountType", "csharp"); + +// ── RP-prefix renames (C# backward compat) ── +@@clientName(EncryptionType, "ComputeEncryptionType", "csharp"); + +// ── Property casing renames: acronym case normalization (C# backward compat) ── +@@clientName(AccessUri.accessSAS, "AccessSas", "csharp"); +@@clientName(AccessUri.securityDataAccessSAS, "SecurityDataAccessSas", "csharp"); +@@clientName(AccessUri.securityMetadataAccessSAS, "SecurityMetadataAccessSas", "csharp"); +@@clientName(DiskSecurityProfile.secureVMDiskEncryptionSetId, "SecureVmDiskEncryptionSetId", "csharp"); +@@clientName(GrantAccessData.getSecureVMGuestStateSAS, "GetSecureVmGuestStateSas", "csharp"); +@@clientName(DiskProperties.diskIOPSReadOnly, "DiskIopsReadOnly", "csharp"); +@@clientName(DiskProperties.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); +@@clientName(DiskUpdateProperties.diskIOPSReadOnly, "DiskIopsReadOnly", "csharp"); +@@clientName(DiskUpdateProperties.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); + +// ── Is* prefix property renames (C# backward compat) ── +@@clientName(CreationData.performancePlus, "IsPerformancePlusEnabled", "csharp"); +@@clientName(DiskProperties.optimizedForFrequentAttach, "IsOptimizedForFrequentAttach", "csharp"); +@@clientName(DiskUpdateProperties.optimizedForFrequentAttach, "IsOptimizedForFrequentAttach", "csharp"); + +// ── Qualified property name renames (C# backward compat) ── +@@clientName(Encryption.type, "EncryptionType", "csharp"); + +// ── Other property renames (C# backward compat) ── +@@clientName(DiskProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(DiskUpdateProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(SnapshotProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(SnapshotUpdateProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); +@@clientName(PrivateEndpointConnectionProperties.privateLinkServiceConnectionState, "ConnectionState", "csharp"); + +// ── alternateType overrides: string → armResourceIdentifier (C# backward compat) ── + +// Wrapper model id properties → ResourceIdentifier. +@@alternateType(SourceVault.id, Azure.Core.armResourceIdentifier, "csharp"); +@@alternateType(PrivateEndpoint.id, Azure.Core.armResourceIdentifier, "csharp"); +@@alternateType(ImageDiskReference.id, Azure.Core.armResourceIdentifier, "csharp"); + +// Disk. +@@alternateType(Disk.managedBy, Azure.Core.armResourceIdentifier, "csharp"); +@@alternateType(Disk.managedByExtended, + Azure.Core.armResourceIdentifier[], + "csharp" +); +@@alternateType(DiskProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// DiskUpdate. +@@alternateType(DiskUpdateProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// DiskRestorePoint. +// .NET back-compat: previously shipped DiskRestorePointData with a public ctor and +// settable properties. TypeSpec's default usage flags this as output-only, which +// removes both. Forcing Azure.ClientGenerator.Core.Usage.input restores the public ctor + property setters. +@@usage(DiskRestorePoint, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@alternateType(DiskRestorePointProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(DiskRestorePointProperties.sourceResourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// Snapshot. +@@alternateType(SnapshotProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// SnapshotUpdate. +@@alternateType(SnapshotUpdateProperties.diskAccessId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// CreationData. +@@alternateType(CreationData.sourceResourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(CreationData.storageAccountId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(CreationData.elasticSanResourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// Encryption. +@@alternateType(Encryption.diskEncryptionSetId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// DiskSecurityProfile. +@@alternateType(DiskSecurityProfile.secureVMDiskEncryptionSetId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// PrivateLinkResource. +@@alternateType(PrivateLinkResourceProperties.groupId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// ── alternateType: Identity → ManagedServiceIdentity (C# backward compat) ── +@@alternateType(DiskEncryptionSet.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(DiskEncryptionSetUpdate.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); + +// ── alternateType: string → Uri (C# backward compat) ── +@@alternateType(CreationData.sourceUri, url, "csharp"); +@@alternateType(CreationData.securityDataUri, url, "csharp"); +@@alternateType(KeyForDiskEncryptionSet.keyUrl, url, "csharp"); +@@alternateType(KeyVaultAndKeyReference.keyUrl, url, "csharp"); +@@alternateType(KeyVaultAndSecretReference.secretUrl, url, "csharp"); +@@alternateType(ShareInfoElement.vmUri, url, "csharp"); + +// Mark non-pageable list operations as pageable for backward compatibility. +@@Azure.ClientGenerator.Core.Legacy.markAsPageable(DiskAccesses.getPrivateLinkResources, + "csharp" +); + +// .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. +@@clientName(DiskStorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(DiskStorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); +@@clientName(DiskStorageAccountTypes.StandardSSD_LRS, "StandardSsdLrs", "csharp"); +@@clientName(DiskStorageAccountTypes.UltraSSD_LRS, "UltraSsdLrs", "csharp"); +@@clientName(DiskStorageAccountTypes.Premium_ZRS, "PremiumZrs", "csharp"); +@@clientName(DiskStorageAccountTypes.StandardSSD_ZRS, "StandardSsdZrs", "csharp"); +@@clientName(DiskStorageAccountTypes.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); + +@@clientName(SnapshotStorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(SnapshotStorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); +@@clientName(SnapshotStorageAccountTypes.Standard_ZRS, "StandardZrs", "csharp"); + +@@clientName(DiskSecurityTypes.ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey, + "ConfidentialVmGuestStateOnlyEncryptedWithPlatformKey", + "csharp" +); +@@clientName(DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithPlatformKey, + "ConfidentialVmDiskEncryptedWithPlatformKey", + "csharp" +); +@@clientName(DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithCustomerKey, + "ConfidentialVmDiskEncryptedWithCustomerKey", + "csharp" +); +@@clientName(DiskSecurityTypes.ConfidentialVM_NonPersistedTPM, + "ConfidentialVmNonPersistedTPM", + "csharp" +); + +@@clientName(DiskState.ActiveSAS, "ActiveSas", "csharp"); +@@clientName(DiskState.ActiveSASFrozen, "ActiveSasFrozen", "csharp"); + +@@clientName(FileFormat.VHD, "Vhd", "csharp"); +@@clientName(FileFormat.VHDX, "Vhdx", "csharp"); + +@@clientName(SupportedSecurityOption.TrustedLaunchAndConfidentialVMSupported, + "TrustedLaunchAndConfidentialVmSupported", + "csharp" +); + +// ════════════════════════════════════════════════════════════════════════════ +// region: ComputeGallery — type/property renames (csharp) +// Restore backward-compatible C# names for the Gallery RP during TypeSpec migration. +// ════════════════════════════════════════════════════════════════════════════ + +// ── Os→OS property casing renames (C# backward compat) ── +@@clientName(GalleryImageProperties.osType, "OSType", "csharp"); +@@clientName(GalleryImageProperties.osState, "OSState", "csharp"); +@@clientName(EncryptionImages.osDiskImage, "OSDiskImage", "csharp"); +@@clientName(GalleryImageVersionStorageProfile.osDiskImage, + "OSDiskImage", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileProperties.osType, + "OSType", + "csharp" +); +@@clientName(SharedGalleryImageProperties.osType, "OSType", "csharp"); +@@clientName(SharedGalleryImageProperties.osState, "OSState", "csharp"); +@@clientName(SharedGalleryImageVersionStorageProfile.osDiskImage, + "OSDiskImage", + "csharp" +); +@@clientName(CommunityGalleryImageProperties.osType, "OSType", "csharp"); +@@clientName(CommunityGalleryImageProperties.osState, "OSState", "csharp"); + +@@clientName(GalleryTargetExtendedLocation.storageAccountType, + "GalleryStorageAccountType", + "csharp" +); + +// Main's autorest.md re-typed `softDeletedTime` from string -> date-time: +// GallerySoftDeletedResource.properties.softDeletedTime: -|date-time +// and the AutoRest naming convention then renamed `Time` -> `On`. +// Spec keeps it as `string`; mirror the legacy C# shape for back-compat. +@@alternateType(GallerySoftDeletedResourceProperties.softDeletedTime, + utcDateTime, + "csharp" +); +@@clientName(GallerySoftDeletedResourceProperties.softDeletedTime, + "softDeletedOn", + "csharp" +); + +// C# enum singular←plural rename. +@@clientName(SharedToValues, "SharedToValue", "csharp"); + +// C# renames for backward compatibility (migration from AutoRest). +@@clientName(UserArtifactManage, "UserArtifactManagement", "csharp"); +@@clientName(ValidationsProfile, "GalleryImageValidationsProfile", "csharp"); +@@clientName(PolicyViolation, "GalleryImageVersionPolicyViolation", "csharp"); +@@clientName(ReplicationMode, "GalleryReplicationMode", "csharp"); +@@clientName(StorageAccountType, "ImageStorageAccountType", "csharp"); +@@clientName(PlatformAttribute, "ComputeGalleryPlatformAttribute", "csharp"); +@@clientName(ExecutedValidation, "GalleryImageExecutedValidation", "csharp"); +@@clientName(ValidationStatus, "ComputeGalleryValidationStatus", "csharp"); +@@clientName(GallerySharingPermissionTypes, + "GallerySharingPermissionType", + "csharp" +); + +// Accessibility overrides. +@@access(CommunityGalleryIdentifier, Access.public, "csharp"); +@@access(CommunityGalleryImageIdentifier, Access.public, "csharp"); +@@access(SharedGalleryIdentifier, Access.public, "csharp"); + +// Resource type InVM→InVm casing renames (backward compat with AutoRest output). +@@clientName(GalleryInVMAccessControlProfile, + "GalleryInVmAccessControlProfile", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileVersion, + "GalleryInVmAccessControlProfileVersion", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileProperties, + "GalleryInVmAccessControlProfileProperties", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileUpdate, + "GalleryInVmAccessControlProfilePatch", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileVersionProperties, + "GalleryInVmAccessControlProfileVersionProperties", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileVersionUpdate, + "GalleryInVmAccessControlProfileVersionPatch", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileList, + "GalleryInVmAccessControlProfileList", + "csharp" +); +@@clientName(GalleryInVMAccessControlProfileVersionList, + "GalleryInVmAccessControlProfileVersionList", + "csharp" +); + +// AccessControlRules and EndpointAccess renames (backward compat with AutoRest RP-prefix). +@@clientName(AccessControlRules, "GalleryInVmAccessControlRules", "csharp"); +@@clientName(AccessControlRulesMode, + "GalleryInVmAccessControlRulesMode", + "csharp" +); +@@clientName(AccessControlRulesPrivilege, + "GalleryInVmAccessControlRulesPrivilege", + "csharp" +); +@@clientName(AccessControlRulesRole, + "GalleryInVmAccessControlRulesRole", + "csharp" +); +@@clientName(AccessControlRulesIdentity, + "GalleryInVmAccessControlRulesIdentity", + "csharp" +); +@@clientName(AccessControlRulesRoleAssignment, + "GalleryInVmAccessControlRulesRoleAssignment", + "csharp" +); +@@clientName(EndpointAccess, "ComputeGalleryEndpointAccess", "csharp"); + +// Rename child identifier properties to avoid CS0108 hiding conflict with base class Identifier. +@@clientName(CommunityGalleryImageProperties.identifier, + "ImageIdentifier", + "csharp" +); +@@clientName(SharedGalleryImageProperties.identifier, + "ImageIdentifier", + "csharp" +); + +// Rename raw gallery operations to match old SDK method names. +@@clientName(SharedGalleries.get, "GetSharedGalleryData", "csharp"); +@@clientName(SharedGalleries.list, "GetSharedGalleries", "csharp"); +@@clientName(SharedGalleryImages.get, "GetSharedGalleryImage", "csharp"); +@@clientName(SharedGalleryImages.list, "GetSharedGalleryImages", "csharp"); +@@clientName(SharedGalleryImageVersions.get, + "GetSharedGalleryImageVersion", + "csharp" +); +@@clientName(SharedGalleryImageVersions.list, + "GetSharedGalleryImageVersions", + "csharp" +); +@@clientName(CommunityGalleries.get, "GetCommunityGalleryData", "csharp"); +@@clientName(CommunityGalleryImages.get, "GetCommunityGalleryImage", "csharp"); +@@clientName(CommunityGalleryImages.list, + "GetCommunityGalleryImages", + "csharp" +); +@@clientName(CommunityGalleryImageVersions.get, + "GetCommunityGalleryImageVersion", + "csharp" +); +@@clientName(CommunityGalleryImageVersions.list, + "GetCommunityGalleryImageVersions", + "csharp" +); + +// Type renames for backward compatibility. +@@clientName(EndpointTypes, "ComputeGalleryEndpointType", "csharp"); +@@clientName(EndpointTypes.IMDS, "Imds", "csharp"); +@@clientName(GallerySoftDeletedResource, + "GallerySoftDeletedResourceDetails", + "csharp" +); +@@clientName(PirResource, "PirResourceData", "csharp"); +@@clientName(PirSharedGalleryResource, + "PirSharedGalleryResourceData", + "csharp" +); +@@clientName(PirSharedGalleryResource.identifier, + "galleryIdentifier", + "csharp" +); +@@clientName(PirCommunityGalleryResource, + "PirCommunityGalleryResourceData", + "csharp" +); +@@clientName(PirCommunityGalleryResource.identifier, + "galleryIdentifier", + "csharp" +); + +// Rename gallery models to *Data for backward compatibility (they were ARM resources before). +@@clientName(SharedGallery, "SharedGalleryData", "csharp"); +@@clientName(SharedGalleryImage, "SharedGalleryImageData", "csharp"); +@@clientName(SharedGalleryImageVersion, + "SharedGalleryImageVersionData", + "csharp" +); +@@clientName(CommunityGallery, "CommunityGalleryData", "csharp"); +@@clientName(CommunityGalleryImage, "CommunityGalleryImageData", "csharp"); +@@clientName(CommunityGalleryImageVersion, + "CommunityGalleryImageVersionData", + "csharp" +); + +// ── Plural→singular enum renames (C# backward compat) ── +@@clientName(ReplicationStatusTypes, "ReplicationStatusType", "csharp"); +@@clientName(SelectPermissions, "SelectPermission", "csharp"); +@@clientName(SharingProfileGroupTypes, "SharingProfileGroupType", "csharp"); +@@clientName(SharingUpdateOperationTypes, + "SharingUpdateOperationType", + "csharp" +); +@@clientName(SoftDeletedArtifactTypes, + "GallerySoftDeletedArtifactType", + "csharp" +); + +// ── VM→Vm casing renames (C# backward compat) ── +@@clientName(ConfidentialVMEncryptionType, + "ConfidentialVmEncryptionType", + "csharp" +); + +// ── Other renames (C# backward compat) ── +@@clientName(GalleryExpandParams, "GalleryExpand", "csharp"); +@@clientName(PolicyViolationCategory, + "GalleryImageVersionPolicyViolationCategory", + "csharp" +); +@@clientName(ReplicationState, "RegionalReplicationState", "csharp"); + +// ── Property casing renames: acronym case normalization (C# backward compat) ── +@@clientName(OSDiskImageSecurityProfile.confidentialVMEncryptionType, + "ConfidentialVmEncryptionType", + "csharp" +); +@@clientName(OSDiskImageSecurityProfile.secureVMDiskEncryptionSetId, + "SecureVmDiskEncryptionSetId", + "csharp" +); +@@clientName(RecommendedMachineConfiguration.vCPUs, "VCpus", "csharp"); + +// ── Is* prefix property renames (C# backward compat) ── +@@clientName(GalleryApplicationCustomActionParameter.required, + "IsRequired", + "csharp" +); +@@clientName(GalleryImageVersionSafetyProfile.blockDeletionBeforeEndOfLife, + "IsBlockedDeletionBeforeEndOfLife", + "csharp" +); +@@clientName(GalleryImageVersionSafetyProfile.reportedForPolicyViolation, + "IsReportedForPolicyViolation", + "csharp" +); +@@clientName(TargetRegion.excludeFromLatest, "IsExcludedFromLatest", "csharp"); +@@clientName(GalleryArtifactPublishingProfileBase.excludeFromLatest, + "IsExcludedFromLatest", + "csharp" +); +@@clientName(SharedGalleryImageVersionProperties.excludeFromLatest, + "IsExcludedFromLatest", + "csharp" +); +@@clientName(CommunityGalleryImageVersionProperties.excludeFromLatest, + "IsExcludedFromLatest", + "csharp" +); +// Match v1.14.0 baseline: property is `Restore` (no Is* prefix). +@@clientName(GalleryImageVersionProperties.restore, "Restore", "csharp"); + +// ── Qualified property name renames (C# backward compat) ── +@@clientName(GalleryApplicationCustomActionParameter.type, + "ParameterType", + "csharp" +); +@@clientName(GalleryExtendedLocation.type, "ExtendedLocationType", "csharp"); +@@clientName(ExecutedValidation.type, "ExecutedValidationType", "csharp"); +@@clientName(GalleryScriptParameter.type, "ParameterType", "csharp"); +@@clientName(SharingProfileGroup.type, "GroupType", "csharp"); +@@clientName(UefiKey.type, "KeyType", "csharp"); + +// ── Other property renames (C# backward compat) ── +@@clientName(ValidationsProfile.validationEtag, "ValidationETag", "csharp"); +@@clientName(SharingProfile.permissions, "Permission", "csharp"); + +// ── alternateType: string → Uri (C# backward compat) ── +@@alternateType(GalleryImageProperties.privacyStatementUri, url, "csharp"); +@@alternateType(GalleryImageProperties.releaseNoteUri, url, "csharp"); +@@alternateType(GalleryApplicationProperties.privacyStatementUri, + url, + "csharp" +); +@@alternateType(GalleryApplicationProperties.releaseNoteUri, url, "csharp"); +@@alternateType(GalleryScriptProperties.privacyStatementUri, url, "csharp"); +@@alternateType(GalleryScriptProperties.releaseNoteUri, url, "csharp"); +@@alternateType(SharedGalleryImageProperties.privacyStatementUri, + url, + "csharp" +); +@@alternateType(CommunityGalleryInfo.publisherUri, url, "csharp"); +@@alternateType(CommunityGalleryMetadata.privacyStatementUri, url, "csharp"); +@@alternateType(CommunityGalleryImageProperties.privacyStatementUri, + url, + "csharp" +); + +// ── alternateType: string → ResourceIdentifier (C# backward compat) ── + +// Wrapper model id properties → ResourceIdentifier. +@@alternateType(GalleryArtifactVersionSource.id, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// Direct string properties → ResourceIdentifier. +@@alternateType(GalleryArtifactVersionFullSource.virtualMachineId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(GalleryDiskImageSource.storageAccountId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(DiskImageEncryption.diskEncryptionSetId, + Azure.Core.armResourceIdentifier, + "csharp" +); + +// ── PirCommunityGalleryResource.type: rename + retype for C# back-compat ── +// Spec emits `type?: string`. The previously shipped C# SDK exposed it as +// `ResourceType` of type `Azure.Core.ResourceType?`. Restore both. +@@clientName(PirCommunityGalleryResource.type, "ResourceType", "csharp"); +@@alternateType(PirCommunityGalleryResource.type, + Azure.Core.armResourceType, + "csharp" +); + +// ── alternateType: Identity → ManagedServiceIdentity (C# backward compat) ── +@@alternateType(Gallery.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); +@@alternateType(GalleryUpdate.identity, + Azure.ResourceManager.Foundations.ManagedServiceIdentity, + "csharp" +); + +// .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. +@@clientName(StorageAccountType.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(StorageAccountType.Standard_ZRS, "StandardZrs", "csharp"); +@@clientName(StorageAccountType.Premium_LRS, "PremiumLrs", "csharp"); +@@clientName(StorageAccountType.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); + +@@clientName(EdgeZoneStorageAccountType.Standard_LRS, "StandardLrs", "csharp"); +@@clientName(EdgeZoneStorageAccountType.Standard_ZRS, "StandardZrs", "csharp"); +@@clientName(EdgeZoneStorageAccountType.StandardSSD_LRS, "StandardSsdLrs", "csharp"); +@@clientName(EdgeZoneStorageAccountType.Premium_LRS, "PremiumLrs", "csharp"); + +@@clientName(ConfidentialVMEncryptionType.EncryptedVMGuestStateOnlyWithPmk, + "EncryptedVmGuestStateOnlyWithPmk", + "csharp" +); + +@@clientName(PolicyViolationCategory.IpTheft, "IPTheft", "csharp"); + +@@clientName(StorageAccountStrategy.PreferStandard_ZRS, "PreferStandardZrs", "csharp"); +@@clientName(StorageAccountStrategy.DefaultStandard_LRS, "DefaultStandardLrs", "csharp"); + +// ── Azure.ClientGenerator.Core.Usage.input forces public ctor + property setters on output-only models ── +// .NET back-compat: GallerySoftDeletedResource previously shipped with a public +// parameterless ctor and writable properties. Restore via Azure.ClientGenerator.Core.Usage.input for csharp. +@@usage(GallerySoftDeletedResource, Azure.ClientGenerator.Core.Usage.input, "csharp"); From ad691bbf983669cabd2d9afdcba386c0376f1be8 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 6 May 2026 11:36:31 +0800 Subject: [PATCH 067/103] Restore alternate-type-stubs.tsp as separate file TypeSpec's blockless-namespace-first rule disallows placing a blocked namespace declaration before the blockless 'namespace ComputeCombine;' in client.tsp, so the alternate-type stubs are kept in a dedicated file and imported from client.tsp. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/alternate-type-stubs.tsp | 17 +++++++++++++++++ .../Microsoft.Compute/Compute/client.tsp | 14 +------------- 2 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp new file mode 100644 index 000000000000..e581b02ceada --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp @@ -0,0 +1,17 @@ +// Stub declarations for `Azure.ResourceManager.Models` types referenced by +// `@@alternateType` decorators in client.tsp (e.g. mapping +// Common.SubResource → Azure.ResourceManager.Models.SubResource for csharp). +// +// These are TypeSpec-only placeholders — the .NET emitter resolves them to the +// real ARM common types from `Azure.ResourceManager` at generation time and the +// stubs themselves never appear in the emitted SDK or wire payload. +// +// This file is kept separate from client.tsp because TypeSpec's +// blockless-namespace-first rule disallows placing a blocked +// `namespace { ... }` declaration before the blockless `namespace ComputeCombine;` +// in client.tsp. + +namespace Azure.ResourceManager.Models { + model SubResource {} + model WritableSubResource {} +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index d25bc762998c..ee6c90ebf1e8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -1,4 +1,5 @@ import "@azure-tools/typespec-client-generator-core"; +import "./alternate-type-stubs.tsp"; import "./Compute/client.tsp"; import "./ComputeDisk/client.tsp"; import "./ComputeGallery/main.tsp"; @@ -11,19 +12,6 @@ using ComputeDisk; using ComputeGallery; using ComputeSku; -// ── region: alternate-type stub models ── -// Stub declarations for `Azure.ResourceManager.Models` types referenced by -// `@@alternateType` decorators in the per-service client.tsp files (e.g. mapping -// Common.SubResource → Azure.ResourceManager.Models.SubResource for csharp). -// These are TypeSpec-only placeholders — the .NET emitter resolves them to the -// real ARM common types from `Azure.ResourceManager` at generation time and the -// stubs themselves never appear in the emitted SDK or wire payload. -namespace Azure.ResourceManager.Models { - model SubResource {} - model WritableSubResource {} -} -// ── endregion ── - /** * Compute Client */ From 113cdc82e5580ad330f68fc6a2624ea8aea5cc6d Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 6 May 2026 16:45:07 +0800 Subject: [PATCH 068/103] Rename alternate-type-stubs.tsp -> csharp-alternate-type-stubs.tsp The stub models are only consumed by csharp-scoped @@alternateType decorators; the filename now reflects that scope. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 2 +- ...alternate-type-stubs.tsp => csharp-alternate-type-stubs.tsp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename specification/compute/resource-manager/Microsoft.Compute/Compute/{alternate-type-stubs.tsp => csharp-alternate-type-stubs.tsp} (100%) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index ee6c90ebf1e8..bf1e1e655b3f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -1,5 +1,5 @@ import "@azure-tools/typespec-client-generator-core"; -import "./alternate-type-stubs.tsp"; +import "./csharp-alternate-type-stubs.tsp"; import "./Compute/client.tsp"; import "./ComputeDisk/client.tsp"; import "./ComputeGallery/main.tsp"; diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/csharp-alternate-type-stubs.tsp similarity index 100% rename from specification/compute/resource-manager/Microsoft.Compute/Compute/alternate-type-stubs.tsp rename to specification/compute/resource-manager/Microsoft.Compute/Compute/csharp-alternate-type-stubs.tsp From 1295e43ecc9873a758b06dfb4f984abca8fa248c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 6 May 2026 18:28:27 +0800 Subject: [PATCH 069/103] Add C# clientName for VMScaleSetLifecycleHookEvent* (VM->Vm) and vmInstanceIDs (ID->Id) on VMSS body params - Renames 8 VMScaleSetLifecycleHookEvent* types to VmScaleSetLifecycleHookEvent* for csharp - Overrides vmInstanceIDs body parameter to vmInstanceIds for csharp on the 10 VirtualMachineScaleSets power/lifecycle operations - Leaves a TODO for the GalleryInVMAccessControlProfile path-parameter renames (need to figure out the correct @@clientName target syntax for ResourceNameParameter-derived path params) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/client.tsp | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index bf1e1e655b3f..0e5f5e0a0a14 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -837,6 +837,85 @@ model VMSizePropertiesWithAdditionalProperties { "csharp" ); @@clientName(WindowsVMGuestPatchMode, "WindowsVmGuestPatchMode", "csharp"); +@@clientName(VMScaleSetLifecycleHookEvent, + "VmScaleSetLifecycleHookEvent", + "csharp" +); +@@clientName(VMScaleSetLifecycleHookEventState, + "VmScaleSetLifecycleHookEventState", + "csharp" +); +@@clientName(VMScaleSetLifecycleHookEventTargetResource, + "VmScaleSetLifecycleHookEventTargetResource", + "csharp" +); +@@clientName(VMScaleSetLifecycleHookEventProperties, + "VmScaleSetLifecycleHookEventProperties", + "csharp" +); +@@clientName(VMScaleSetLifecycleHookEventAdditionalContext, + "VmScaleSetLifecycleHookEventAdditionalContext", + "csharp" +); +@@clientName(VMScaleSetLifecycleHookEventType, + "VmScaleSetLifecycleHookEventType", + "csharp" +); +@@clientName(VMScaleSetLifecycleHookEventUpdate, + "VmScaleSetLifecycleHookEventUpdate", + "csharp" +); +@@clientName(VMScaleSetLifecycleHookEventListResult, + "VmScaleSetLifecycleHookEventListResult", + "csharp" +); + +// ── ID→Id casing renames on VMSS body parameters (C# backward compat) ── +// back-compatible.tsp renames these to `vmInstanceIDs` for all languages; override to `vmInstanceIds` for C#. +@@clientName(VirtualMachineScaleSets.approveRollingUpgrade::parameters.body, + "vmInstanceIds", + "csharp" +); +@@clientName(VirtualMachineScaleSets.deallocate::parameters.body, + "vmInstanceIds", + "csharp" +); +@@clientName(VirtualMachineScaleSets.deleteInstances::parameters.body, + "vmInstanceIds", + "csharp" +); +@@clientName(VirtualMachineScaleSets.updateInstances::parameters.body, + "vmInstanceIds", + "csharp" +); +@@clientName(VirtualMachineScaleSets.performMaintenance::parameters.body, + "vmInstanceIds", + "csharp" +); +@@clientName(VirtualMachineScaleSets.powerOff::parameters.body, + "vmInstanceIds", + "csharp" +); +@@clientName(VirtualMachineScaleSets.redeploy::parameters.body, + "vmInstanceIds", + "csharp" +); +@@clientName(VirtualMachineScaleSets.reimageAll::parameters.body, + "vmInstanceIds", + "csharp" +); +@@clientName(VirtualMachineScaleSets.restart::parameters.body, + "vmInstanceIds", + "csharp" +); +@@clientName(VirtualMachineScaleSets.start::parameters.body, + "vmInstanceIds", + "csharp" +); + +// ── VM→Vm casing renames on GalleryInVMAccessControlProfile path parameters (C# backward compat) ── +// TODO: figure out the correct @@clientName target syntax for ResourceNameParameter-derived path params. +// Currently the C# methods expose `inVMAccessControlProfileName` / `inVMAccessControlProfileVersionName` (KeyName casing). // ── IP→Ip casing renames (C# backward compat) ── @@clientName(VirtualMachineIpTag, "VirtualMachineIPTag", "csharp"); From 1665dc107c24b29b570de0e6f311c0d689244dcf Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 6 May 2026 19:19:37 +0800 Subject: [PATCH 070/103] Revert path-param .name @@clientName attempt Renaming the synthesized resource model's .name property does fix the operation path-param casing in C#, but it also surfaces a new public Name property on the corresponding *Data model. Reverting and tracking as a known issue on the SDK PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 0e5f5e0a0a14..a2567ff504d4 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -915,7 +915,9 @@ model VMSizePropertiesWithAdditionalProperties { // ── VM→Vm casing renames on GalleryInVMAccessControlProfile path parameters (C# backward compat) ── // TODO: figure out the correct @@clientName target syntax for ResourceNameParameter-derived path params. -// Currently the C# methods expose `inVMAccessControlProfileName` / `inVMAccessControlProfileVersionName` (KeyName casing). +// Renaming the resource model's `.name` property does flip the path parameter casing in operations, +// but it also surfaces a new public `Name` property on the corresponding *Data model — unacceptable. +// Tracked as a "Known issue" on the SDK PR; awaiting team input. // ── IP→Ip casing renames (C# backward compat) ── @@clientName(VirtualMachineIpTag, "VirtualMachineIPTag", "csharp"); From e2451d1e470b2d6b77b2f9479ca12c876d3b4eb8 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 7 May 2026 12:31:05 +0800 Subject: [PATCH 071/103] client.tsp: rename VmScaleSetLifecycleHookEventTargetResource to drop Resource suffix --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index a2567ff504d4..772e259ae0a1 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -846,7 +846,7 @@ model VMSizePropertiesWithAdditionalProperties { "csharp" ); @@clientName(VMScaleSetLifecycleHookEventTargetResource, - "VmScaleSetLifecycleHookEventTargetResource", + "VmScaleSetLifecycleHookEventTarget", "csharp" ); @@clientName(VMScaleSetLifecycleHookEventProperties, From 27110b2b97788e975e0031305473cdbf967e85b2 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 7 May 2026 12:55:32 +0800 Subject: [PATCH 072/103] client.tsp: drop alternateType(url) on CommunityGalleryInfo.publisherUri; rename to publisherUriString to match baseline --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 772e259ae0a1..0e0e30cddd6f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -2005,7 +2005,7 @@ union ComputeUsageUnit { url, "csharp" ); -@@alternateType(CommunityGalleryInfo.publisherUri, url, "csharp"); +@@clientName(CommunityGalleryInfo.publisherUri, "publisherUriString", "csharp"); @@alternateType(CommunityGalleryMetadata.privacyStatementUri, url, "csharp"); @@alternateType(CommunityGalleryImageProperties.privacyStatementUri, url, From 997d06deed6f8096cfeb76ef593f7d29a795bea1 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 15 May 2026 11:27:32 +0800 Subject: [PATCH 073/103] client.tsp: pin VmScaleSetLifecycleHookEventPatch C# name Recent generator change started honoring @@clientName for patch model types that previously had a hard-coded `Patch` suffix. Without this fix the model would be renamed to VmScaleSetLifecycleHookEventUpdate on the C# side, which is a breaking change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 0e0e30cddd6f..f55f6dce14a1 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -862,7 +862,7 @@ model VMSizePropertiesWithAdditionalProperties { "csharp" ); @@clientName(VMScaleSetLifecycleHookEventUpdate, - "VmScaleSetLifecycleHookEventUpdate", + "VmScaleSetLifecycleHookEventPatch", "csharp" ); @@clientName(VMScaleSetLifecycleHookEventListResult, From 0d4b6477465be50a50bb044eee47939044e89cb3 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 27 May 2026 13:46:15 +0800 Subject: [PATCH 074/103] Add hierarchyBuilding for VMSS extensions and test GalleryUpdate --- .../Microsoft.Compute/Compute/client.tsp | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index f55f6dce14a1..b2a6d90811e5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -182,6 +182,39 @@ namespace ComputeCombine; @@clientName(Compute.VirtualMachineExtensionUpdateProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); @@clientName(Compute.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); +// ── VMSS extension base type (csharp only) ── +// Backward compatibility: the previous .NET SDK exposed VirtualMachineScaleSetExtensionData as a direct ResourceData-derived model. +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type and VMSS extension request serialization shape." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Compute.VirtualMachineScaleSetExtension, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type and VM extension request serialization shape." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Compute.VirtualMachineScaleSetVMExtension, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for VMSS extension patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Compute.VirtualMachineScaleSetExtensionUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for VM extension patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Compute.VirtualMachineScaleSetVMExtensionUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +// ── Test: Gallery patch model base type (csharp only) ── +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Test preserving previous base type for GalleryUpdate." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); + // ── G7: rename `source` → `gallerySource` (csharp only) on GalleryDiskImage and GalleryImageVersionStorageProfile // so the generated property matches the previously-shipped name `GallerySource` of the discriminator-typed // property. A separate partial-class shim restores the deprecated base-typed `Source` member that backed From ee740e75b15327a6f2ab161de6956c28697b8ef7 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 27 May 2026 14:06:18 +0800 Subject: [PATCH 075/103] Use ProxyResource for GalleryUpdate hierarchyBuilding test --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index b2a6d90811e5..e93af246dc78 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -211,7 +211,7 @@ namespace ComputeCombine; // ── Test: Gallery patch model base type (csharp only) ── #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Test preserving previous base type for GalleryUpdate." @@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryUpdate, - Azure.ResourceManager.Foundations.Resource, + Azure.ResourceManager.Foundations.ProxyResource, "csharp" ); From bf19852c9f635ba5c148c296f5ff00ff1de34158 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 27 May 2026 14:18:45 +0800 Subject: [PATCH 076/103] Add hierarchyBuilding for all Gallery patch models --- .../Microsoft.Compute/Compute/client.tsp | 55 ++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index e93af246dc78..11b072434777 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -208,13 +208,64 @@ namespace ComputeCombine; "csharp" ); -// ── Test: Gallery patch model base type (csharp only) ── -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Test preserving previous base type for GalleryUpdate." +// ── Gallery patch models base type (csharp only) ── +// Backward compatibility: gallery patch models previously inherited ResourceData in the old SDK. +// Without this override, they inherit UpdateResourceDefinition which doesn't derive from ResourceData, +// breaking the API contract. +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." @@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryUpdate, Azure.ResourceManager.Foundations.ProxyResource, "csharp" ); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryImageUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryImageVersionUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryApplicationUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryApplicationVersionUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryScriptUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryScriptVersionUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryInVMAccessControlProfileUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryInVMAccessControlProfileVersionUpdate, + Azure.ResourceManager.Foundations.ProxyResource, + "csharp" +); + // ── G7: rename `source` → `gallerySource` (csharp only) on GalleryDiskImage and GalleryImageVersionStorageProfile // so the generated property matches the previously-shipped name `GallerySource` of the discriminator-typed // property. A separate partial-class shim restores the deprecated base-typed `Source` member that backed From 2fe0e57be55b8de01000c8da68afe880a5fd9acd Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 27 May 2026 16:37:07 +0800 Subject: [PATCH 077/103] Test alternateType approach for GalleryUpdate --- .../Microsoft.Compute/Compute/client.tsp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 11b072434777..d04d774753d6 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -212,11 +212,16 @@ namespace ComputeCombine; // Backward compatibility: gallery patch models previously inherited ResourceData in the old SDK. // Without this override, they inherit UpdateResourceDefinition which doesn't derive from ResourceData, // breaking the API contract. -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +// #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." +// @@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryUpdate, +// Azure.ResourceManager.Foundations.ProxyResource, +// "csharp" +// ); +@clientName("GalleryPatch", "csharp") +model CSharpGalleryUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(ComputeGallery.GalleryUpdate, CSharpGalleryUpdate, "csharp"); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." @@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryImageUpdate, From 3b51f4d1f0c4605b170d919541edfc968b1f7938 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 27 May 2026 17:14:14 +0800 Subject: [PATCH 078/103] Apply alternateType pattern to all Gallery patches and VMSS extensions --- .../Microsoft.Compute/Compute/client.tsp | 135 +++++++++--------- 1 file changed, 67 insertions(+), 68 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index d04d774753d6..d6490aee349d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -183,93 +183,92 @@ namespace ComputeCombine; @@clientName(Compute.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); // ── VMSS extension base type (csharp only) ── -// Backward compatibility: the previous .NET SDK exposed VirtualMachineScaleSetExtensionData as a direct ResourceData-derived model. -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type and VMSS extension request serialization shape." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Compute.VirtualMachineScaleSetExtension, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +// Backward compatibility: VMSS extension data/patch models previously inherited ResourceData directly. +// Use alternateType to swap the spec model with a C#-only model that extends ProxyResource, since +// hierarchyBuilding drops properties that were inherited from the original base and are not on the new +// base (e.g. tags). Tracked in: https://github.com/Azure/typespec-azure/issues/4505 +@clientName("VirtualMachineScaleSetExtensionData", "csharp") +model CSharpVirtualMachineScaleSetExtension extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(Compute.VirtualMachineScaleSetExtension, CSharpVirtualMachineScaleSetExtension, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type and VM extension request serialization shape." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Compute.VirtualMachineScaleSetVMExtension, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("VirtualMachineScaleSetVmExtensionData", "csharp") +model CSharpVirtualMachineScaleSetVMExtension extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(Compute.VirtualMachineScaleSetVMExtension, CSharpVirtualMachineScaleSetVMExtension, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for VMSS extension patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Compute.VirtualMachineScaleSetExtensionUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("VirtualMachineScaleSetExtensionPatch", "csharp") +model CSharpVirtualMachineScaleSetExtensionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(Compute.VirtualMachineScaleSetExtensionUpdate, CSharpVirtualMachineScaleSetExtensionUpdate, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for VM extension patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Compute.VirtualMachineScaleSetVMExtensionUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("VirtualMachineScaleSetVmExtensionPatch", "csharp") +model CSharpVirtualMachineScaleSetVMExtensionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(Compute.VirtualMachineScaleSetVMExtensionUpdate, CSharpVirtualMachineScaleSetVMExtensionUpdate, "csharp"); // ── Gallery patch models base type (csharp only) ── // Backward compatibility: gallery patch models previously inherited ResourceData in the old SDK. -// Without this override, they inherit UpdateResourceDefinition which doesn't derive from ResourceData, -// breaking the API contract. -// #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -// @@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryUpdate, -// Azure.ResourceManager.Foundations.ProxyResource, -// "csharp" -// ); +// Use alternateType to swap each spec model with a C#-only model that extends ProxyResource and keeps +// all properties (including tags). hierarchyBuilding alone drops the tags property because it was on +// the original UpdateResourceDefinition base. Tracked in: https://github.com/Azure/typespec-azure/issues/4505 @clientName("GalleryPatch", "csharp") model CSharpGalleryUpdate extends Azure.ResourceManager.Foundations.ProxyResource { ...OmitProperties; } @@alternateType(ComputeGallery.GalleryUpdate, CSharpGalleryUpdate, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryImageUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("GalleryImagePatch", "csharp") +model CSharpGalleryImageUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(ComputeGallery.GalleryImageUpdate, CSharpGalleryImageUpdate, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryImageVersionUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("GalleryImageVersionPatch", "csharp") +model CSharpGalleryImageVersionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(ComputeGallery.GalleryImageVersionUpdate, CSharpGalleryImageVersionUpdate, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryApplicationUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("GalleryApplicationPatch", "csharp") +model CSharpGalleryApplicationUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(ComputeGallery.GalleryApplicationUpdate, CSharpGalleryApplicationUpdate, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryApplicationVersionUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("GalleryApplicationVersionPatch", "csharp") +model CSharpGalleryApplicationVersionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(ComputeGallery.GalleryApplicationVersionUpdate, CSharpGalleryApplicationVersionUpdate, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryScriptUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("GalleryScriptPatch", "csharp") +model CSharpGalleryScriptUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(ComputeGallery.GalleryScriptUpdate, CSharpGalleryScriptUpdate, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryScriptVersionUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("GalleryScriptVersionPatch", "csharp") +model CSharpGalleryScriptVersionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(ComputeGallery.GalleryScriptVersionUpdate, CSharpGalleryScriptVersionUpdate, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryInVMAccessControlProfileUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("GalleryInVmAccessControlProfilePatch", "csharp") +model CSharpGalleryInVMAccessControlProfileUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(ComputeGallery.GalleryInVMAccessControlProfileUpdate, CSharpGalleryInVMAccessControlProfileUpdate, "csharp"); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve the previous .NET base type for Gallery patch models." -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ComputeGallery.GalleryInVMAccessControlProfileVersionUpdate, - Azure.ResourceManager.Foundations.ProxyResource, - "csharp" -); +@clientName("GalleryInVmAccessControlProfileVersionPatch", "csharp") +model CSharpGalleryInVMAccessControlProfileVersionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { + ...OmitProperties; +} +@@alternateType(ComputeGallery.GalleryInVMAccessControlProfileVersionUpdate, CSharpGalleryInVMAccessControlProfileVersionUpdate, "csharp"); // ── G7: rename `source` → `gallerySource` (csharp only) on GalleryDiskImage and GalleryImageVersionStorageProfile // so the generated property matches the previously-shipped name `GallerySource` of the discriminator-typed From 67efcafde6d00cd5a1a318b218863d1b798e1c03 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 27 May 2026 18:04:34 +0800 Subject: [PATCH 079/103] Revert hierarchyBuilding and alternateType experiments Reverts client.tsp changes from: - 0d4b6477465 Add hierarchyBuilding for VMSS extensions and test GalleryUpdate - ee740e75b15 Use ProxyResource for GalleryUpdate hierarchyBuilding test - bf19852c9f6 Add hierarchyBuilding for all Gallery patch models - 2fe0e57be55 Test alternateType approach for GalleryUpdate - 3b51f4d1f0c Apply alternateType pattern to all Gallery patches and VMSS extensions Blocked on TCGC bug Azure/typespec-azure#4505 where hierarchyBuilding drops inherited properties (e.g. tags) that aren't on the new base. Will revisit once the upstream fix lands. --- .../Microsoft.Compute/Compute/client.tsp | 88 ------------------- 1 file changed, 88 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index d6490aee349d..f55f6dce14a1 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -182,94 +182,6 @@ namespace ComputeCombine; @@clientName(Compute.VirtualMachineExtensionUpdateProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); @@clientName(Compute.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); -// ── VMSS extension base type (csharp only) ── -// Backward compatibility: VMSS extension data/patch models previously inherited ResourceData directly. -// Use alternateType to swap the spec model with a C#-only model that extends ProxyResource, since -// hierarchyBuilding drops properties that were inherited from the original base and are not on the new -// base (e.g. tags). Tracked in: https://github.com/Azure/typespec-azure/issues/4505 -@clientName("VirtualMachineScaleSetExtensionData", "csharp") -model CSharpVirtualMachineScaleSetExtension extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(Compute.VirtualMachineScaleSetExtension, CSharpVirtualMachineScaleSetExtension, "csharp"); - -@clientName("VirtualMachineScaleSetVmExtensionData", "csharp") -model CSharpVirtualMachineScaleSetVMExtension extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(Compute.VirtualMachineScaleSetVMExtension, CSharpVirtualMachineScaleSetVMExtension, "csharp"); - -@clientName("VirtualMachineScaleSetExtensionPatch", "csharp") -model CSharpVirtualMachineScaleSetExtensionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(Compute.VirtualMachineScaleSetExtensionUpdate, CSharpVirtualMachineScaleSetExtensionUpdate, "csharp"); - -@clientName("VirtualMachineScaleSetVmExtensionPatch", "csharp") -model CSharpVirtualMachineScaleSetVMExtensionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(Compute.VirtualMachineScaleSetVMExtensionUpdate, CSharpVirtualMachineScaleSetVMExtensionUpdate, "csharp"); - -// ── Gallery patch models base type (csharp only) ── -// Backward compatibility: gallery patch models previously inherited ResourceData in the old SDK. -// Use alternateType to swap each spec model with a C#-only model that extends ProxyResource and keeps -// all properties (including tags). hierarchyBuilding alone drops the tags property because it was on -// the original UpdateResourceDefinition base. Tracked in: https://github.com/Azure/typespec-azure/issues/4505 -@clientName("GalleryPatch", "csharp") -model CSharpGalleryUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(ComputeGallery.GalleryUpdate, CSharpGalleryUpdate, "csharp"); - -@clientName("GalleryImagePatch", "csharp") -model CSharpGalleryImageUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(ComputeGallery.GalleryImageUpdate, CSharpGalleryImageUpdate, "csharp"); - -@clientName("GalleryImageVersionPatch", "csharp") -model CSharpGalleryImageVersionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(ComputeGallery.GalleryImageVersionUpdate, CSharpGalleryImageVersionUpdate, "csharp"); - -@clientName("GalleryApplicationPatch", "csharp") -model CSharpGalleryApplicationUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(ComputeGallery.GalleryApplicationUpdate, CSharpGalleryApplicationUpdate, "csharp"); - -@clientName("GalleryApplicationVersionPatch", "csharp") -model CSharpGalleryApplicationVersionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(ComputeGallery.GalleryApplicationVersionUpdate, CSharpGalleryApplicationVersionUpdate, "csharp"); - -@clientName("GalleryScriptPatch", "csharp") -model CSharpGalleryScriptUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(ComputeGallery.GalleryScriptUpdate, CSharpGalleryScriptUpdate, "csharp"); - -@clientName("GalleryScriptVersionPatch", "csharp") -model CSharpGalleryScriptVersionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(ComputeGallery.GalleryScriptVersionUpdate, CSharpGalleryScriptVersionUpdate, "csharp"); - -@clientName("GalleryInVmAccessControlProfilePatch", "csharp") -model CSharpGalleryInVMAccessControlProfileUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(ComputeGallery.GalleryInVMAccessControlProfileUpdate, CSharpGalleryInVMAccessControlProfileUpdate, "csharp"); - -@clientName("GalleryInVmAccessControlProfileVersionPatch", "csharp") -model CSharpGalleryInVMAccessControlProfileVersionUpdate extends Azure.ResourceManager.Foundations.ProxyResource { - ...OmitProperties; -} -@@alternateType(ComputeGallery.GalleryInVMAccessControlProfileVersionUpdate, CSharpGalleryInVMAccessControlProfileVersionUpdate, "csharp"); - // ── G7: rename `source` → `gallerySource` (csharp only) on GalleryDiskImage and GalleryImageVersionStorageProfile // so the generated property matches the previously-shipped name `GallerySource` of the discriminator-typed // property. A separate partial-class shim restores the deprecated base-typed `Source` member that backed From 60abc3b291e2f83bf95cf601c5f841776ca2e7ab Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 10 Jun 2026 09:22:36 +0800 Subject: [PATCH 080/103] Clean up Compute C# SubResource customizations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/client.tsp | 156 ++++++++---------- .../Compute/csharp-alternate-type-stubs.tsp | 17 -- 2 files changed, 68 insertions(+), 105 deletions(-) delete mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/csharp-alternate-type-stubs.tsp diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index ae0ef8d70073..2d8afdd597b1 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -1,5 +1,4 @@ import "@azure-tools/typespec-client-generator-core"; -import "./csharp-alternate-type-stubs.tsp"; import "./Compute/client.tsp"; import "./ComputeDisk/client.tsp"; import "./ComputeGallery/main.tsp"; @@ -79,6 +78,74 @@ namespace ComputeCombine; @@clientName(Common.SubResource, "ComputeWriteableSubResourceData", "csharp"); @@clientName(Common.SubResourceReadOnly, "ComputeSubResourceData", "csharp"); +// SubResource/WritableSubResource properties now use Compute-local subresource models. +// Keep generated names distinct so SDK customizations can restore the old ARM common +// SubResource/WritableSubResource property names for binary compatibility. +@@clientName(AvailabilitySetProperties.virtualMachines, "VirtualMachineResources", "csharp"); +@@clientName(VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools, + "ApplicationGatewayBackendAddressPoolResources", + "csharp" +); +@@clientName(VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups, + "ApplicationSecurityGroupResources", + "csharp" +); +@@clientName(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools, + "LoadBalancerBackendAddressPoolResources", + "csharp" +); +@@clientName(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools, + "LoadBalancerInboundNatPoolResources", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationGatewayBackendAddressPools, + "ApplicationGatewayBackendAddressPoolResources", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationSecurityGroups, + "ApplicationSecurityGroupResources", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerBackendAddressPools, + "LoadBalancerBackendAddressPoolResources", + "csharp" +); +@@clientName(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerInboundNatPools, + "LoadBalancerInboundNatPoolResources", + "csharp" +); +@@clientName(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups, + "ApplicationSecurityGroupResources", + "csharp" +); +@@clientName(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools, + "ApplicationGatewayBackendAddressPoolResources", + "csharp" +); +@@clientName(VirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools, + "LoadBalancerBackendAddressPoolResources", + "csharp" +); +@@clientName(DedicatedHostGroupProperties.hosts, "DedicatedHostResources", "csharp"); +@@clientName(DedicatedHostProperties.virtualMachines, "VirtualMachineResources", "csharp"); +@@clientName(CapacityReservationGroupProperties.capacityReservations, + "CapacityReservationResources", + "csharp" +); +@@clientName(CapacityReservationGroupProperties.virtualMachinesAssociated, + "AssociatedVirtualMachineResources", + "csharp" +); +@@clientName(CapacityReservationProperties.virtualMachinesAssociated, + "AssociatedVirtualMachineResources", + "csharp" +); +@@clientName(ResourceSharingProfile.subscriptionIds, + "SharingSubscriptionResources", + "csharp" +); +@@clientName(RestorePointProperties.excludeDisks, "ExcludedDisks", "csharp"); + // Replace Compute's local ExtendedLocation / ExtendedLocationType with ARM common types @@alternateType(Common.ExtendedLocation, Azure.ResourceManager.CommonTypes.ExtendedLocation, @@ -1017,7 +1084,6 @@ model VMSizePropertiesWithAdditionalProperties { "UltraSsdEnabled", "csharp" ); -@@clientName(DedicatedHostGroupProperties.hosts, "DedicatedHosts", "csharp"); @@clientName(HostEndpointSettings.inVMAccessControlProfileReferenceId, "InVmAccessControlProfileReferenceId", "csharp" @@ -1261,92 +1327,6 @@ model VMSizePropertiesWithAdditionalProperties { "csharp" ); -// ── alternateType: SubResource[] for C# backward compat ── -@@alternateType(AvailabilitySetProperties.virtualMachines, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationGatewayBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationSecurityGroups, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerInboundNatPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(VirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(DedicatedHostGroupProperties.hosts, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(DedicatedHostProperties.virtualMachines, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(CapacityReservationGroupProperties.capacityReservations, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(CapacityReservationGroupProperties.virtualMachinesAssociated, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(CapacityReservationProperties.virtualMachinesAssociated, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(CapacityReservationUtilization.virtualMachinesAllocated, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(ResourceSharingProfile.subscriptionIds, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); -@@alternateType(CapacityReservationGroupInstanceView.sharedSubscriptionIds, - Azure.ResourceManager.Models.SubResource[], - "csharp" -); -@@alternateType(RestorePointProperties.excludeDisks, - Azure.ResourceManager.Models.WritableSubResource[], - "csharp" -); - // ════════════════════════════════════════════════════════════════════════════ // region: Compute — extensible enum wrappers (csharp) // The old SDK had these as extensible enums (readonly struct). TypeSpec defines diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/csharp-alternate-type-stubs.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/csharp-alternate-type-stubs.tsp deleted file mode 100644 index e581b02ceada..000000000000 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/csharp-alternate-type-stubs.tsp +++ /dev/null @@ -1,17 +0,0 @@ -// Stub declarations for `Azure.ResourceManager.Models` types referenced by -// `@@alternateType` decorators in client.tsp (e.g. mapping -// Common.SubResource → Azure.ResourceManager.Models.SubResource for csharp). -// -// These are TypeSpec-only placeholders — the .NET emitter resolves them to the -// real ARM common types from `Azure.ResourceManager` at generation time and the -// stubs themselves never appear in the emitted SDK or wire payload. -// -// This file is kept separate from client.tsp because TypeSpec's -// blockless-namespace-first rule disallows placing a blocked -// `namespace { ... }` declaration before the blockless `namespace ComputeCombine;` -// in client.tsp. - -namespace Azure.ResourceManager.Models { - model SubResource {} - model WritableSubResource {} -} From 2edb9b81e568b4ce7b099e6cd29f7be3e6d9e507 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 10 Jun 2026 13:41:24 +0800 Subject: [PATCH 081/103] Hide Compute provider operations for C# Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 2d8afdd597b1..fbbc98d863a2 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -268,6 +268,9 @@ namespace ComputeCombine; // ── C# operation renames for backward compatibility (migration from AutoRest) ── // These mirror the override-operation-name entries from the deleted autorest.md. +// Operations.list is not using the standard ARM operation template, so omit it +// from the generated C# SDK surface. +@@access(Operations.list, Access.internal, "csharp"); @@clientName(Compute.VirtualMachines.start, "PowerOn", "csharp"); @@clientName(Compute.VirtualMachines.migrateToVMScaleSet, "MigrateToVirtualMachineScaleSet", From 76be8b3584b87ded77d989b4b3bde60dfd5dea07 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 10 Jun 2026 14:04:13 +0800 Subject: [PATCH 082/103] Scope Compute provider operations out of C# Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index fbbc98d863a2..1457b9174cd2 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -270,7 +270,7 @@ namespace ComputeCombine; // These mirror the override-operation-name entries from the deleted autorest.md. // Operations.list is not using the standard ARM operation template, so omit it // from the generated C# SDK surface. -@@access(Operations.list, Access.internal, "csharp"); +@@scope(Operations.list, "!csharp"); @@clientName(Compute.VirtualMachines.start, "PowerOn", "csharp"); @@clientName(Compute.VirtualMachines.migrateToVMScaleSet, "MigrateToVirtualMachineScaleSet", From 0f89509d163a1af0125ab5742855e40ff6df3203 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 10 Jun 2026 17:39:20 +0800 Subject: [PATCH 083/103] Restore Compute lifecycle hook C# names Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 1457b9174cd2..9cbf20010f2b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -923,13 +923,17 @@ model VMSizePropertiesWithAdditionalProperties { "csharp" ); @@clientName(VMScaleSetLifecycleHookEventTargetResource, - "VmScaleSetLifecycleHookEventTarget", + "VirtualMachineScaleSetLifecycleHookEventTarget", "csharp" ); @@clientName(VMScaleSetLifecycleHookEventProperties, "VmScaleSetLifecycleHookEventProperties", "csharp" ); +@@clientName(VMScaleSetLifecycleHookEventProperties.type, + "EventType", + "csharp" +); @@clientName(VMScaleSetLifecycleHookEventAdditionalContext, "VmScaleSetLifecycleHookEventAdditionalContext", "csharp" @@ -939,7 +943,7 @@ model VMSizePropertiesWithAdditionalProperties { "csharp" ); @@clientName(VMScaleSetLifecycleHookEventUpdate, - "VmScaleSetLifecycleHookEventPatch", + "VirtualMachineScaleSetLifecycleHookEventPatch", "csharp" ); @@clientName(VMScaleSetLifecycleHookEventListResult, From 7372250d6331789ff71cccfecb8bc77d6e12dea9 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 10 Jun 2026 18:03:38 +0800 Subject: [PATCH 084/103] Restore lifecycle hook event data name Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 9cbf20010f2b..80484c1000f3 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -915,7 +915,7 @@ model VMSizePropertiesWithAdditionalProperties { ); @@clientName(WindowsVMGuestPatchMode, "WindowsVmGuestPatchMode", "csharp"); @@clientName(VMScaleSetLifecycleHookEvent, - "VmScaleSetLifecycleHookEvent", + "VirtualMachineScaleSetLifecycleHookEventData", "csharp" ); @@clientName(VMScaleSetLifecycleHookEventState, From 76d6f36d1ce7d55a1b8749ccd972c0295a9cfbf5 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 10 Jun 2026 18:32:43 +0800 Subject: [PATCH 085/103] Rename gallery update base model for C# Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 80484c1000f3..e8627383ff70 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -1762,6 +1762,7 @@ union ComputeUsageUnit { "GallerySharingPermissionType", "csharp" ); +@@clientName(UpdateResourceDefinition, "GalleryResourcePatch", "csharp"); // Accessibility overrides. @@access(CommunityGalleryIdentifier, Access.public, "csharp"); From c5fdca096111765c6222cb1ccaa0208188b3c8a0 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 10 Jun 2026 21:48:22 +0800 Subject: [PATCH 086/103] Restore Compute gallery patch base types Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/client.tsp | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index e8627383ff70..bab200f585ab 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -1762,7 +1762,53 @@ union ComputeUsageUnit { "GallerySharingPermissionType", "csharp" ); -@@clientName(UpdateResourceDefinition, "GalleryResourcePatch", "csharp"); + +// Gallery update models previously shipped as ResourceData-derived patch models. +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryImageUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryImageVersionUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryApplicationUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryApplicationVersionUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryScriptUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryScriptVersionUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryInVMAccessControlProfileUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryInVMAccessControlProfileVersionUpdate, + Azure.ResourceManager.Foundations.Resource, + "csharp" +); // Accessibility overrides. @@access(CommunityGalleryIdentifier, Access.public, "csharp"); From 62035f187ec193b2ad759182c0bc2ee82ef8cc50 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 11 Jun 2026 14:54:04 +0800 Subject: [PATCH 087/103] Add Compute C# compatibility customizations --- .../Microsoft.Compute/Compute/client.tsp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index bab200f585ab..3e38d95f5c7f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -319,6 +319,9 @@ namespace ComputeCombine; "csharp" ); +// ApiEntityReference is too generic for the public .NET SDK model surface. +@@clientName(ApiEntityReference, "ComputeApiEntityReference", "csharp"); + // ApiEntityReference.id flattens to XxxId on parent models. Old AutoRest SDK // emitted these as ResourceIdentifier; preserve that contract for csharp. @@alternateType(ApiEntityReference.id, @@ -915,7 +918,7 @@ model VMSizePropertiesWithAdditionalProperties { ); @@clientName(WindowsVMGuestPatchMode, "WindowsVmGuestPatchMode", "csharp"); @@clientName(VMScaleSetLifecycleHookEvent, - "VirtualMachineScaleSetLifecycleHookEventData", + "VirtualMachineScaleSetLifecycleHookEvent", "csharp" ); @@clientName(VMScaleSetLifecycleHookEventState, @@ -942,6 +945,10 @@ model VMSizePropertiesWithAdditionalProperties { "VmScaleSetLifecycleHookEventType", "csharp" ); +@@clientName(LifecycleHook.type, + "VmScaleSetLifecycleHookEventType", + "csharp" +); @@clientName(VMScaleSetLifecycleHookEventUpdate, "VirtualMachineScaleSetLifecycleHookEventPatch", "csharp" From eaf87b68897bbb1679759d518e785c5a02d41202 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 12:04:44 +0800 Subject: [PATCH 088/103] Restore Compute C# gallery property names Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 3e38d95f5c7f..b0672a1f0b37 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -1880,13 +1880,13 @@ union ComputeUsageUnit { ); @@clientName(EndpointAccess, "ComputeGalleryEndpointAccess", "csharp"); -// Rename child identifier properties to avoid CS0108 hiding conflict with base class Identifier. +// Rename community gallery child identifier property to avoid CS0108 hiding conflict with base class Identifier. @@clientName(CommunityGalleryImageProperties.identifier, "ImageIdentifier", "csharp" ); @@clientName(SharedGalleryImageProperties.identifier, - "ImageIdentifier", + "Identifier", "csharp" ); @@ -2021,8 +2021,8 @@ union ComputeUsageUnit { "IsExcludedFromLatest", "csharp" ); -// Match v1.14.0 baseline: property is `Restore` (no Is* prefix). -@@clientName(GalleryImageVersionProperties.restore, "Restore", "csharp"); +// Match v1.14.0 baseline: property is `IsRestoreEnabled`. +@@clientName(GalleryImageVersionProperties.restore, "IsRestoreEnabled", "csharp"); // ── Qualified property name renames (C# backward compat) ── @@clientName(GalleryApplicationCustomActionParameter.type, From f8c615b9b890be3006e9fef50f0c25b3f1e0b635 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 14:34:23 +0800 Subject: [PATCH 089/103] format --- .../Microsoft.Compute/Compute/client.tsp | 1510 ++++++++++++----- .../Compute/stable/2024-03-03/GalleryRP.json | 52 +- .../Compute/stable/2025-03-03/GalleryRP.json | 52 +- 3 files changed, 1192 insertions(+), 422 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index b0672a1f0b37..ca3d7bbb0dc8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -81,137 +81,179 @@ namespace ComputeCombine; // SubResource/WritableSubResource properties now use Compute-local subresource models. // Keep generated names distinct so SDK customizations can restore the old ARM common // SubResource/WritableSubResource property names for binary compatibility. -@@clientName(AvailabilitySetProperties.virtualMachines, "VirtualMachineResources", "csharp"); -@@clientName(VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools, +@@clientName( + AvailabilitySetProperties.virtualMachines, + "VirtualMachineResources", + "csharp" +); +@@clientName( + VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools, "ApplicationGatewayBackendAddressPoolResources", "csharp" ); -@@clientName(VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups, +@@clientName( + VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups, "ApplicationSecurityGroupResources", "csharp" ); -@@clientName(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools, +@@clientName( + VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools, "LoadBalancerBackendAddressPoolResources", "csharp" ); -@@clientName(VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools, +@@clientName( + VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools, "LoadBalancerInboundNatPoolResources", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationGatewayBackendAddressPools, +@@clientName( + VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationGatewayBackendAddressPools, "ApplicationGatewayBackendAddressPoolResources", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationSecurityGroups, +@@clientName( + VirtualMachineScaleSetUpdateIPConfigurationProperties.applicationSecurityGroups, "ApplicationSecurityGroupResources", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerBackendAddressPools, +@@clientName( + VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerBackendAddressPools, "LoadBalancerBackendAddressPoolResources", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerInboundNatPools, +@@clientName( + VirtualMachineScaleSetUpdateIPConfigurationProperties.loadBalancerInboundNatPools, "LoadBalancerInboundNatPoolResources", "csharp" ); -@@clientName(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups, +@@clientName( + VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups, "ApplicationSecurityGroupResources", "csharp" ); -@@clientName(VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools, +@@clientName( + VirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools, "ApplicationGatewayBackendAddressPoolResources", "csharp" ); -@@clientName(VirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools, +@@clientName( + VirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools, "LoadBalancerBackendAddressPoolResources", "csharp" ); -@@clientName(DedicatedHostGroupProperties.hosts, "DedicatedHostResources", "csharp"); -@@clientName(DedicatedHostProperties.virtualMachines, "VirtualMachineResources", "csharp"); -@@clientName(CapacityReservationGroupProperties.capacityReservations, +@@clientName( + DedicatedHostGroupProperties.hosts, + "DedicatedHostResources", + "csharp" +); +@@clientName( + DedicatedHostProperties.virtualMachines, + "VirtualMachineResources", + "csharp" +); +@@clientName( + CapacityReservationGroupProperties.capacityReservations, "CapacityReservationResources", "csharp" ); -@@clientName(CapacityReservationGroupProperties.virtualMachinesAssociated, +@@clientName( + CapacityReservationGroupProperties.virtualMachinesAssociated, "AssociatedVirtualMachineResources", "csharp" ); -@@clientName(CapacityReservationProperties.virtualMachinesAssociated, +@@clientName( + CapacityReservationProperties.virtualMachinesAssociated, "AssociatedVirtualMachineResources", "csharp" ); -@@clientName(ResourceSharingProfile.subscriptionIds, +@@clientName( + ResourceSharingProfile.subscriptionIds, "SharingSubscriptionResources", "csharp" ); @@clientName(RestorePointProperties.excludeDisks, "ExcludedDisks", "csharp"); // Replace Compute's local ExtendedLocation / ExtendedLocationType with ARM common types -@@alternateType(Common.ExtendedLocation, +@@alternateType( + Common.ExtendedLocation, Azure.ResourceManager.CommonTypes.ExtendedLocation, "csharp" ); -@@alternateType(ComputeSku.ResourceSkuLocationInfo.type, +@@alternateType( + ComputeSku.ResourceSkuLocationInfo.type, Azure.ResourceManager.CommonTypes.ExtendedLocationType, "csharp" ); // ComputeSku namespace types @@clientName(ComputeSku.ResourceSku, "ComputeResourceSku", "csharp"); -@@clientName(ComputeSku.ResourceSkuCapabilities, +@@clientName( + ComputeSku.ResourceSkuCapabilities, "ComputeResourceSkuCapabilities", "csharp" ); -@@clientName(ComputeSku.ResourceSkuCapacity, +@@clientName( + ComputeSku.ResourceSkuCapacity, "ComputeResourceSkuCapacity", "csharp" ); -@@clientName(ComputeSku.ResourceSkuCapacityScaleType, +@@clientName( + ComputeSku.ResourceSkuCapacityScaleType, "ComputeResourceSkuCapacityScaleType", "csharp" ); -@@clientName(ComputeSku.ResourceSkuLocationInfo, +@@clientName( + ComputeSku.ResourceSkuLocationInfo, "ComputeResourceSkuLocationInfo", "csharp" ); -@@clientName(ComputeSku.ResourceSkuRestrictionInfo, +@@clientName( + ComputeSku.ResourceSkuRestrictionInfo, "ComputeResourceSkuRestrictionInfo", "csharp" ); -@@clientName(ComputeSku.ResourceSkuRestrictions, +@@clientName( + ComputeSku.ResourceSkuRestrictions, "ComputeResourceSkuRestrictions", "csharp" ); -@@clientName(ComputeSku.ResourceSkuRestrictionsReasonCode, +@@clientName( + ComputeSku.ResourceSkuRestrictionsReasonCode, "ComputeResourceSkuRestrictionsReasonCode", "csharp" ); -@@clientName(ComputeSku.ResourceSkuRestrictionsType, +@@clientName( + ComputeSku.ResourceSkuRestrictionsType, "ComputeResourceSkuRestrictionsType", "csharp" ); -@@clientName(ComputeSku.ResourceSkuZoneDetails, +@@clientName( + ComputeSku.ResourceSkuZoneDetails, "ComputeResourceSkuZoneDetails", "csharp" ); // ComputeSku property renames (C# backward compat) @@clientName(ComputeSku.ResourceSkuCosts.meterID, "MeterId", "csharp"); -@@clientName(ComputeSku.ResourceSkuRestrictions.type, +@@clientName( + ComputeSku.ResourceSkuRestrictions.type, "RestrictionsType", "csharp" ); -@@clientName(ComputeSku.ExtendedLocationType, +@@clientName( + ComputeSku.ExtendedLocationType, "ComputeExtendedLocationType", "csharp" ); -@@clientName(ComputeSku.ResourceSkuLocationInfo.type, +@@clientName( + ComputeSku.ResourceSkuLocationInfo.type, "ExtendedLocationType", "csharp" ); // ── alternateType: SubResource.id → ResourceIdentifier for C# (migration from AutoRest) ── -@@alternateType(Common.SubResource.id, +@@alternateType( + Common.SubResource.id, Azure.Core.armResourceIdentifier, "csharp" ); @@ -222,45 +264,145 @@ namespace ComputeCombine; // Baseline shipped a single ArchitectureType / HyperVGeneration / IPVersion; // the spec splits them into multiple unions. Retype the minority-enum properties // to the canonical union so the C# SDK exposes a single type per concept. -@@alternateType(ComputeDisk.SupportedCapabilities.architecture, Compute.ArchitectureTypes, "csharp"); -@@alternateType(ComputeGallery.GalleryImageProperties.architecture, Compute.ArchitectureTypes, "csharp"); -@@alternateType(ComputeGallery.SharedGalleryImageProperties.architecture, Compute.ArchitectureTypes, "csharp"); -@@alternateType(ComputeGallery.CommunityGalleryImageProperties.architecture, Compute.ArchitectureTypes, "csharp"); +@@alternateType( + ComputeDisk.SupportedCapabilities.architecture, + Compute.ArchitectureTypes, + "csharp" +); +@@alternateType( + ComputeGallery.GalleryImageProperties.architecture, + Compute.ArchitectureTypes, + "csharp" +); +@@alternateType( + ComputeGallery.SharedGalleryImageProperties.architecture, + Compute.ArchitectureTypes, + "csharp" +); +@@alternateType( + ComputeGallery.CommunityGalleryImageProperties.architecture, + Compute.ArchitectureTypes, + "csharp" +); -@@alternateType(Compute.VirtualMachineImageProperties.hyperVGeneration, Common.HyperVGeneration, "csharp"); -@@alternateType(Compute.ImageProperties.hyperVGeneration, Common.HyperVGeneration, "csharp"); -@@alternateType(Compute.RestorePointSourceMetadata.hyperVGeneration, Common.HyperVGeneration, "csharp"); -@@alternateType(Compute.VirtualMachineInstanceView.hyperVGeneration, Common.HyperVGeneration, "csharp"); +@@alternateType( + Compute.VirtualMachineImageProperties.hyperVGeneration, + Common.HyperVGeneration, + "csharp" +); +@@alternateType( + Compute.ImageProperties.hyperVGeneration, + Common.HyperVGeneration, + "csharp" +); +@@alternateType( + Compute.RestorePointSourceMetadata.hyperVGeneration, + Common.HyperVGeneration, + "csharp" +); +@@alternateType( + Compute.VirtualMachineInstanceView.hyperVGeneration, + Common.HyperVGeneration, + "csharp" +); -@@alternateType(Compute.VirtualMachineNetworkInterfaceIPConfigurationProperties.privateIPAddressVersion, Compute.IPVersion, "csharp"); -@@alternateType(Compute.VirtualMachinePublicIPAddressConfigurationProperties.publicIPAddressVersion, Compute.IPVersion, "csharp"); +@@alternateType( + Compute.VirtualMachineNetworkInterfaceIPConfigurationProperties.privateIPAddressVersion, + Compute.IPVersion, + "csharp" +); +@@alternateType( + Compute.VirtualMachinePublicIPAddressConfigurationProperties.publicIPAddressVersion, + Compute.IPVersion, + "csharp" +); // ── G2: location / resourceType narrowed to string in spec; restore Azure.Core.azureLocation/armResourceType ── -@@alternateType(ComputeSku.ResourceSku.locations, Azure.Core.azureLocation[], "csharp"); -@@alternateType(ComputeSku.ResourceSkuRestrictionInfo.locations, Azure.Core.azureLocation[], "csharp"); -@@alternateType(ComputeSku.ResourceSkuLocationInfo.location, Azure.Core.azureLocation, "csharp"); -@@alternateType(ComputeDisk.DiskRestorePointProperties.sourceResourceLocation, Azure.Core.azureLocation, "csharp"); -@@alternateType(ComputeGallery.PirResource.location, Azure.Core.azureLocation, "csharp"); -@@alternateType(ComputeGallery.PirCommunityGalleryResource.location, Azure.Core.azureLocation, "csharp"); -@@alternateType(Compute.RestorePointCollectionSourceProperties.location, Azure.Core.azureLocation, "csharp"); -@@alternateType(Compute.RestorePointSourceMetadata.location, Azure.Core.azureLocation, "csharp"); -@@alternateType(Compute.UpgradeOperationHistoricalStatusInfo.location, Azure.Core.azureLocation, "csharp"); -@@alternateType(Compute.VirtualMachineScaleSetVMExtension.location, Azure.Core.azureLocation, "csharp"); -@@alternateType(Compute.VirtualMachineScaleSetSku.resourceType, Azure.Core.armResourceType, "csharp"); +@@alternateType( + ComputeSku.ResourceSku.locations, + Azure.Core.azureLocation[], + "csharp" +); +@@alternateType( + ComputeSku.ResourceSkuRestrictionInfo.locations, + Azure.Core.azureLocation[], + "csharp" +); +@@alternateType( + ComputeSku.ResourceSkuLocationInfo.location, + Azure.Core.azureLocation, + "csharp" +); +@@alternateType( + ComputeDisk.DiskRestorePointProperties.sourceResourceLocation, + Azure.Core.azureLocation, + "csharp" +); +@@alternateType( + ComputeGallery.PirResource.location, + Azure.Core.azureLocation, + "csharp" +); +@@alternateType( + ComputeGallery.PirCommunityGalleryResource.location, + Azure.Core.azureLocation, + "csharp" +); +@@alternateType( + Compute.RestorePointCollectionSourceProperties.location, + Azure.Core.azureLocation, + "csharp" +); +@@alternateType( + Compute.RestorePointSourceMetadata.location, + Azure.Core.azureLocation, + "csharp" +); +@@alternateType( + Compute.UpgradeOperationHistoricalStatusInfo.location, + Azure.Core.azureLocation, + "csharp" +); +@@alternateType( + Compute.VirtualMachineScaleSetVMExtension.location, + Azure.Core.azureLocation, + "csharp" +); +@@alternateType( + Compute.VirtualMachineScaleSetSku.resourceType, + Azure.Core.armResourceType, + "csharp" +); // ── G5: rename `protectedSettingsFromKeyVault` → `keyVaultProtectedSettings` (csharp only) so the generated // property matches the previously-shipped name `KeyVaultProtectedSettings` of type KeyVaultSecretReference. // A separate partial-class shim restores the deprecated BinaryData `ProtectedSettingsFromKeyVault` member. -@@clientName(Compute.VirtualMachineExtensionProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); -@@clientName(Compute.VirtualMachineExtensionUpdateProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); -@@clientName(Compute.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault, "keyVaultProtectedSettings", "csharp"); +@@clientName( + Compute.VirtualMachineExtensionProperties.protectedSettingsFromKeyVault, + "keyVaultProtectedSettings", + "csharp" +); +@@clientName( + Compute.VirtualMachineExtensionUpdateProperties.protectedSettingsFromKeyVault, + "keyVaultProtectedSettings", + "csharp" +); +@@clientName( + Compute.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault, + "keyVaultProtectedSettings", + "csharp" +); // ── G7: rename `source` → `gallerySource` (csharp only) on GalleryDiskImage and GalleryImageVersionStorageProfile // so the generated property matches the previously-shipped name `GallerySource` of the discriminator-typed // property. A separate partial-class shim restores the deprecated base-typed `Source` member that backed // the previous AutoRest `source: GallerySource` rename-mapping directive. @@clientName(ComputeGallery.GalleryDiskImage.source, "gallerySource", "csharp"); -@@clientName(ComputeGallery.GalleryImageVersionStorageProfile.source, "gallerySource", "csharp"); +@@clientName( + ComputeGallery.GalleryImageVersionStorageProfile.source, + "gallerySource", + "csharp" +); // ── G7: rename GalleryDiskImageSource.uri → sourceUri (csharp only) to avoid collision with the // previously-shipped virtual `Uri` (System.Uri) accessor on the GalleryArtifactVersionSource base. // The base accessor is restored as a partial-class shim for backward compatibility with v1.14.0. @@ -272,25 +414,30 @@ namespace ComputeCombine; // from the generated C# SDK surface. @@scope(Operations.list, "!csharp"); @@clientName(Compute.VirtualMachines.start, "PowerOn", "csharp"); -@@clientName(Compute.VirtualMachines.migrateToVMScaleSet, +@@clientName( + Compute.VirtualMachines.migrateToVMScaleSet, "MigrateToVirtualMachineScaleSet", "csharp" ); @@clientName(Compute.VirtualMachineScaleSets.start, "PowerOn", "csharp"); -@@clientName(Compute.VirtualMachineScaleSets.cancel, +@@clientName( + Compute.VirtualMachineScaleSets.cancel, "CancelVirtualMachineScaleSetRollingUpgrade", "csharp" ); -@@clientName(Compute.VirtualMachineScaleSets.startExtensionUpgrade, +@@clientName( + Compute.VirtualMachineScaleSets.startExtensionUpgrade, "StartExtensionUpgradeVirtualMachineScaleSetRollingUpgrade", "csharp" ); @@clientName(Compute.VirtualMachineScaleSetVMS.start, "PowerOn", "csharp"); -@@clientName(ComputeGallery.Galleries.gallerySharingProfileUpdate, +@@clientName( + ComputeGallery.Galleries.gallerySharingProfileUpdate, "UpdateSharingProfile", "csharp" ); -@@clientName(ComputeGallery.Galleries.listByArtifactName, +@@clientName( + ComputeGallery.Galleries.listByArtifactName, "GetSoftDeletedResourcesByArtifactName", "csharp" ); @@ -314,7 +461,8 @@ namespace ComputeCombine; // CommonTypes v3 defines Resource.id as string, but the .NET SDK base classes // (ResourceData/TrackedResourceData) expect ResourceIdentifier. Override for csharp. -@@alternateType(Azure.ResourceManager.CommonTypes.Resource.id, +@@alternateType( + Azure.ResourceManager.CommonTypes.Resource.id, Azure.Core.armResourceIdentifier, "csharp" ); @@ -324,14 +472,16 @@ namespace ComputeCombine; // ApiEntityReference.id flattens to XxxId on parent models. Old AutoRest SDK // emitted these as ResourceIdentifier; preserve that contract for csharp. -@@alternateType(ApiEntityReference.id, +@@alternateType( + ApiEntityReference.id, Azure.Core.armResourceIdentifier, "csharp" ); // VirtualMachineImageResource (renamed VirtualMachineImageBase in csharp) had // Location typed as AzureLocation in the old SDK; the spec models it as string. -@@alternateType(VirtualMachineImageResource.location, +@@alternateType( + VirtualMachineImageResource.location, Azure.Core.azureLocation, "csharp" ); @@ -349,12 +499,18 @@ namespace ComputeCombine; // Restore baseline property names that differ from the TypeSpec-generated defaults. // ════════════════════════════════════════════════════════════════════════════ -@@clientName(Placement.zonePlacementPolicy, "ZonePlacementPolicyType", "csharp"); -@@clientName(VirtualMachineScaleSetStorageProfile.diskControllerType, +@@clientName( + Placement.zonePlacementPolicy, + "ZonePlacementPolicyType", + "csharp" +); +@@clientName( + VirtualMachineScaleSetStorageProfile.diskControllerType, "DiskControllerKind", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateStorageProfile.diskControllerType, +@@clientName( + VirtualMachineScaleSetUpdateStorageProfile.diskControllerType, "DiskControllerKind", "csharp" ); @@ -374,11 +530,9 @@ model UpgradePolicyWithAdditionalProperties { ...UpgradePolicy; ...Record; } -@@alternateType(UpgradePolicy, +@@alternateType(UpgradePolicy, UpgradePolicyWithAdditionalProperties, "csharp"); +@@clientName( UpgradePolicyWithAdditionalProperties, - "csharp" -); -@@clientName(UpgradePolicyWithAdditionalProperties, "VirtualMachineScaleSetUpgradePolicy", "csharp" ); @@ -390,11 +544,13 @@ model VirtualMachineScaleSetPropertiesWithAdditionalProperties { ...VirtualMachineScaleSetProperties; ...Record; } -@@alternateType(VirtualMachineScaleSetProperties, +@@alternateType( + VirtualMachineScaleSetProperties, VirtualMachineScaleSetPropertiesWithAdditionalProperties, "csharp" ); -@@clientName(VirtualMachineScaleSetPropertiesWithAdditionalProperties, +@@clientName( + VirtualMachineScaleSetPropertiesWithAdditionalProperties, "VirtualMachineScaleSetProperties", "csharp" ); @@ -406,11 +562,13 @@ model VirtualMachineScaleSetVMPropertiesWithAdditionalProperties { ...VirtualMachineScaleSetVMProperties; ...Record; } -@@alternateType(VirtualMachineScaleSetVMProperties, +@@alternateType( + VirtualMachineScaleSetVMProperties, VirtualMachineScaleSetVMPropertiesWithAdditionalProperties, "csharp" ); -@@clientName(VirtualMachineScaleSetVMPropertiesWithAdditionalProperties, +@@clientName( + VirtualMachineScaleSetVMPropertiesWithAdditionalProperties, "VirtualMachineScaleSetVmProperties", "csharp" ); @@ -422,11 +580,13 @@ model VMSizePropertiesWithAdditionalProperties { ...VMSizeProperties; ...Record; } -@@alternateType(VMSizeProperties, +@@alternateType( + VMSizeProperties, VMSizePropertiesWithAdditionalProperties, "csharp" ); -@@clientName(VMSizePropertiesWithAdditionalProperties, +@@clientName( + VMSizePropertiesWithAdditionalProperties, "VirtualMachineSizeProperties", "csharp" ); @@ -438,15 +598,18 @@ model VMSizePropertiesWithAdditionalProperties { // interface so each gets a unique collection result type name. // ════════════════════════════════════════════════════════════════════════════ -@@clientLocation(VirtualMachineScaleSets.listAll, +@@clientLocation( + VirtualMachineScaleSets.listAll, "VirtualMachineScaleSetsSubscription", "csharp" ); -@@clientLocation(VirtualMachines.listAll, +@@clientLocation( + VirtualMachines.listAll, "VirtualMachinesSubscription", "csharp" ); -@@clientLocation(RestorePointCollections.listAll, +@@clientLocation( + RestorePointCollections.listAll, "RestorePointCollectionsSubscription", "csharp" ); @@ -458,76 +621,93 @@ model VMSizePropertiesWithAdditionalProperties { // ════════════════════════════════════════════════════════════════════════════ // VirtualMachineImagesEdgeZoneOperationGroup ops renamed to old API names. -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listPublishers, +@@clientName( + VirtualMachineImagesEdgeZoneOperationGroup.listPublishers, "GetPublishersVirtualMachineImagesEdgeZones", "csharp" ); -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listOffers, +@@clientName( + VirtualMachineImagesEdgeZoneOperationGroup.listOffers, "GetOffersVirtualMachineImagesEdgeZones", "csharp" ); -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.listSkus, +@@clientName( + VirtualMachineImagesEdgeZoneOperationGroup.listSkus, "GetVirtualMachineImageEdgeZoneSkus", "csharp" ); -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.list, +@@clientName( + VirtualMachineImagesEdgeZoneOperationGroup.list, "GetVirtualMachineImagesEdgeZones", "csharp" ); -@@clientName(VirtualMachineImagesEdgeZoneOperationGroup.get, +@@clientName( + VirtualMachineImagesEdgeZoneOperationGroup.get, "GetVirtualMachineImagesEdgeZone", "csharp" ); // VirtualMachineImagesOperationGroup ops renamed to old API names. -@@clientName(VirtualMachineImagesOperationGroup.listPublishers, +@@clientName( + VirtualMachineImagesOperationGroup.listPublishers, "GetVirtualMachineImagePublishers", "csharp" ); -@@clientName(VirtualMachineImagesOperationGroup.listOffers, +@@clientName( + VirtualMachineImagesOperationGroup.listOffers, "GetVirtualMachineImageOffers", "csharp" ); -@@clientName(VirtualMachineImagesOperationGroup.listSkus, +@@clientName( + VirtualMachineImagesOperationGroup.listSkus, "GetVirtualMachineImageSkus", "csharp" ); -@@clientName(VirtualMachineImagesOperationGroup.list, +@@clientName( + VirtualMachineImagesOperationGroup.list, "GetVirtualMachineImages", "csharp" ); -@@clientName(VirtualMachineImagesOperationGroup.get, +@@clientName( + VirtualMachineImagesOperationGroup.get, "GetVirtualMachineImage", "csharp" ); -@@clientName(VirtualMachineImagesOperationGroup.listByEdgeZone, +@@clientName( + VirtualMachineImagesOperationGroup.listByEdgeZone, "GetVirtualMachineImagesByEdgeZone", "csharp" ); -@@clientName(VirtualMachineImagesOperationGroup.listWithProperties, +@@clientName( + VirtualMachineImagesOperationGroup.listWithProperties, "GetVirtualMachineImagesWithProperties", "csharp" ); // Other OperationGroup ops renamed to old API names. @@clientName(UsageOperationGroup.list, "GetUsages", "csharp"); -@@clientName(VirtualMachineSizesOperationGroup.list, +@@clientName( + VirtualMachineSizesOperationGroup.list, "GetVirtualMachineSizes", "csharp" ); -@@clientName(VirtualMachineRunCommandsOperationGroup.list, +@@clientName( + VirtualMachineRunCommandsOperationGroup.list, "GetVirtualMachineRunCommands", "csharp" ); -@@clientName(VirtualMachineRunCommandsOperationGroup.get, +@@clientName( + VirtualMachineRunCommandsOperationGroup.get, "GetVirtualMachineRunCommand", "csharp" ); -@@clientName(LogAnalyticsOperationGroup.exportThrottledRequests, +@@clientName( + LogAnalyticsOperationGroup.exportThrottledRequests, "ExportLogAnalyticsThrottledRequests", "csharp" ); -@@clientName(LogAnalyticsOperationGroup.exportRequestRateByInterval, +@@clientName( + LogAnalyticsOperationGroup.exportRequestRateByInterval, "ExportLogAnalyticsRequestRateByInterval", "csharp" ); @@ -547,7 +727,8 @@ model VMSizePropertiesWithAdditionalProperties { // VMSS sub-model renames. @@clientName(UpgradePolicy, "VirtualMachineScaleSetUpgradePolicy", "csharp"); -@@clientName(PriorityMixPolicy, +@@clientName( + PriorityMixPolicy, "VirtualMachineScaleSetPriorityMixPolicy", "csharp" ); @@ -567,34 +748,41 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(VirtualMachineImageResource, "VirtualMachineImageBase", "csharp"); // Long enum/type renames. -@@clientName(ExpandTypesForGetCapacityReservationGroups, +@@clientName( + ExpandTypesForGetCapacityReservationGroups, "CapacityReservationGroupGetExpand", "csharp" ); // VM→Vm casing renames (old C# convention used lowercase "Vm"). -@@clientName(VirtualMachineScaleSetVMInstanceIDs, +@@clientName( + VirtualMachineScaleSetVMInstanceIDs, "VirtualMachineScaleSetVmInstanceIds", "csharp" ); @@clientName(ResilientVMDeletionStatus, "ResilientVmDeletionStatus", "csharp"); -@@clientName(LinuxVMGuestPatchAutomaticByPlatformRebootSetting, +@@clientName( + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, "LinuxVmGuestPatchAutomaticByPlatformRebootSetting", "csharp" ); -@@clientName(WindowsVMGuestPatchAutomaticByPlatformRebootSetting, +@@clientName( + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, "WindowsVmGuestPatchAutomaticByPlatformRebootSetting", "csharp" ); -@@clientName(VirtualMachineScaleSetVMInstanceView, +@@clientName( + VirtualMachineScaleSetVMInstanceView, "VirtualMachineScaleSetVmInstanceView", "csharp" ); -@@clientName(VirtualMachineScaleSetVMProperties, +@@clientName( + VirtualMachineScaleSetVMProperties, "VirtualMachineScaleSetVmProperties", "csharp" ); -@@clientName(VirtualMachineScaleSetVMProtectionPolicy, +@@clientName( + VirtualMachineScaleSetVMProtectionPolicy, "VirtualMachineScaleSetVmProtectionPolicy", "csharp" ); @@ -605,64 +793,78 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(DedicatedHostLicenseTypes, "DedicatedHostLicenseType", "csharp"); @@clientName(OperatingSystemStateTypes, "OperatingSystemStateType", "csharp"); @@clientName(OrchestrationServiceNames, "OrchestrationServiceName", "csharp"); -@@clientName(VirtualMachineEvictionPolicyTypes, +@@clientName( + VirtualMachineEvictionPolicyTypes, "VirtualMachineEvictionPolicyType", "csharp" ); -@@clientName(VirtualMachinePriorityTypes, +@@clientName( + VirtualMachinePriorityTypes, "VirtualMachinePriorityType", "csharp" ); -@@clientName(VirtualMachineScaleSetScaleInRules, +@@clientName( + VirtualMachineScaleSetScaleInRules, "VirtualMachineScaleSetScaleInRule", "csharp" ); -@@clientName(VMGuestPatchClassificationLinux, +@@clientName( + VMGuestPatchClassificationLinux, "VmGuestPatchClassificationForLinux", "csharp" ); -@@clientName(VMGuestPatchClassificationWindows, +@@clientName( + VMGuestPatchClassificationWindows, "VmGuestPatchClassificationForWindows", "csharp" ); // Model casing renames. -@@clientName(DedicatedHostAllocatableVM, +@@clientName( + DedicatedHostAllocatableVM, "DedicatedHostAllocatableVm", "csharp" ); // Resource type VM→Vm casing renames (backward compat with AutoRest output). @@clientName(VirtualMachineScaleSetVM, "VirtualMachineScaleSetVm", "csharp"); -@@clientName(VirtualMachineScaleSetVMExtension, +@@clientName( + VirtualMachineScaleSetVMExtension, "VirtualMachineScaleSetVmExtension", "csharp" ); -@@clientName(VirtualMachineScaleSetVMNetworkProfileConfiguration, +@@clientName( + VirtualMachineScaleSetVMNetworkProfileConfiguration, "VirtualMachineScaleSetVmNetworkProfileConfiguration", "csharp" ); -@@clientName(VirtualMachineScaleSetVMInstanceRequiredIDs, +@@clientName( + VirtualMachineScaleSetVMInstanceRequiredIDs, "VirtualMachineScaleSetVmInstanceRequiredIds", "csharp" ); -@@clientName(VirtualMachineScaleSetVMExtensionsSummary, +@@clientName( + VirtualMachineScaleSetVMExtensionsSummary, "VirtualMachineScaleSetVmExtensionsSummary", "csharp" ); -@@clientName(VirtualMachineScaleSetVMReimageParameters, +@@clientName( + VirtualMachineScaleSetVMReimageParameters, "VirtualMachineScaleSetVmReimageContent", "csharp" ); -@@clientName(VirtualMachineScaleSetVMExtensionUpdate, +@@clientName( + VirtualMachineScaleSetVMExtensionUpdate, "VirtualMachineScaleSetVmExtensionPatch", "csharp" ); -@@clientName(VirtualMachineScaleSetVMExtensionsListResult, +@@clientName( + VirtualMachineScaleSetVMExtensionsListResult, "VirtualMachineScaleSetVmExtensionsListResult", "csharp" ); -@@clientName(VirtualMachineScaleSetVMListResult, +@@clientName( + VirtualMachineScaleSetVMListResult, "VirtualMachineScaleSetVmListResult", "csharp" ); @@ -671,7 +873,8 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(ApiError, "ComputeApiError", "csharp"); @@clientName(Placement, "VirtualMachinePlacement", "csharp"); @@clientName(ScheduledEventsProfile, "ComputeScheduledEventsProfile", "csharp"); -@@clientName(SubResourceWithColocationStatus, +@@clientName( + SubResourceWithColocationStatus, "ComputeSubResourceDataWithColocationStatus", "csharp" ); @@ -681,20 +884,24 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(OperatingSystemTypes, "SupportedOperatingSystemType", "csharp"); @@clientName(ReservationType, "CapacityReservationType", "csharp"); @@clientName(ApiErrorBase, "ComputeApiErrorBase", "csharp"); -@@clientName(VMGalleryApplication, +@@clientName( + VMGalleryApplication, "VirtualMachineGalleryApplication", "csharp" ); -@@clientName(NetworkInterfaceReference, +@@clientName( + NetworkInterfaceReference, "VirtualMachineNetworkInterfaceReference", "csharp" ); @@clientName(SkuProfileVMSize, "ComputeSkuProfileVmSize", "csharp"); -@@clientName(VirtualMachineScaleSetVMProfile, +@@clientName( + VirtualMachineScaleSetVMProfile, "VirtualMachineScaleSetVmProfile", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateVMProfile, +@@clientName( + VirtualMachineScaleSetUpdateVMProfile, "VirtualMachineScaleSetUpdateVmProfile", "csharp" ); @@ -706,22 +913,26 @@ model VMSizePropertiesWithAdditionalProperties { @@access(VirtualMachineScaleSetVMProperties, Access.public, "csharp"); // Rename listByLocation operations to avoid name collision (both map to GetByLocation). -@@clientName(VirtualMachinesOperationGroup.listByLocation, +@@clientName( + VirtualMachinesOperationGroup.listByLocation, "GetVirtualMachinesByLocation", "csharp" ); -@@clientName(VirtualMachineScaleSetsOperationGroup.listByLocation, +@@clientName( + VirtualMachineScaleSetsOperationGroup.listByLocation, "GetVirtualMachineScaleSetsByLocation", "csharp" ); // Rename extension property "type" to avoid conflict with base class "Type" property. -@@clientName(VirtualMachineScaleSetExtensionProperties.type, +@@clientName( + VirtualMachineScaleSetExtensionProperties.type, "ExtensionType", "csharp" ); @@clientName(VirtualMachineExtensionProperties.type, "ExtensionType", "csharp"); -@@clientName(VirtualMachineExtensionUpdateProperties.type, +@@clientName( + VirtualMachineExtensionUpdateProperties.type, "ExtensionType", "csharp" ); @@ -736,11 +947,13 @@ model VMSizePropertiesWithAdditionalProperties { @@clientOption(AllInstancesDown, "disable-safe-flatten", true, "csharp"); // Resource type rename for backward compatibility. -@@clientName(RollingUpgradeStatusInfo, +@@clientName( + RollingUpgradeStatusInfo, "VirtualMachineScaleSetRollingUpgrade", "csharp" ); -@@clientName(RollingUpgradeStatusInfoProperties, +@@clientName( + RollingUpgradeStatusInfoProperties, "VirtualMachineScaleSetRollingUpgradeProperties", "csharp" ); @@ -751,7 +964,8 @@ model VMSizePropertiesWithAdditionalProperties { // RestorePointCollection → RestorePointGroup (old: RestorePointGroupResource, RestorePointGroupData). @@clientName(RestorePointCollection, "RestorePointGroup", "csharp"); -@@clientName(RestorePointCollectionSourceProperties, +@@clientName( + RestorePointCollectionSourceProperties, "RestorePointGroupSource", "csharp" ); @@ -762,25 +976,30 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(SshPublicKeyResource, "SshPublicKey", "csharp"); // VirtualMachineScaleSetVMRunCommands interface → Vm casing. -@@clientName(VirtualMachineScaleSetVMRunCommands, +@@clientName( + VirtualMachineScaleSetVMRunCommands, "VirtualMachineScaleSetVmRunCommands", "csharp" ); // Mark non-pageable list operations as pageable for backward compatibility. -@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineExtensions.list, +@@Azure.ClientGenerator.Core.Legacy.markAsPageable( + VirtualMachineExtensions.list, "csharp" ); -@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineScaleSetVMExtensions.list, +@@Azure.ClientGenerator.Core.Legacy.markAsPageable( + VirtualMachineScaleSetVMExtensions.list, "csharp" ); -@@Azure.ClientGenerator.Core.Legacy.markAsPageable(VirtualMachineImagesOperationGroup.listByEdgeZone, +@@Azure.ClientGenerator.Core.Legacy.markAsPageable( + VirtualMachineImagesOperationGroup.listByEdgeZone, "csharp" ); // Type renames (batch). @@clientName(PublicIPAddressSku, "ComputePublicIPAddressSku", "csharp"); -@@clientName(SecurityPostureReference, +@@clientName( + SecurityPostureReference, "ComputeSecurityPostureReference", "csharp" ); @@ -789,85 +1008,103 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(SettingNames, "SettingName", "csharp"); @@clientName(ProtocolTypes, "WinRMListenerProtocolType", "csharp"); @@clientName(InstanceViewTypes, "InstanceViewType", "csharp"); -@@clientName(MaintenanceOperationResultCodeTypes, +@@clientName( + MaintenanceOperationResultCodeTypes, "MaintenanceOperationResultCodeType", "csharp" ); @@clientName(OSDisk, "VirtualMachineOSDisk", "csharp"); -@@clientName(VMDiskSecurityProfile, +@@clientName( + VMDiskSecurityProfile, "VirtualMachineDiskSecurityProfile", "csharp" ); @@clientName(VMSizeProperties, "VirtualMachineSizeProperties", "csharp"); -@@clientName(VirtualMachineScaleSetManagedDiskParameters, +@@clientName( + VirtualMachineScaleSetManagedDiskParameters, "VirtualMachineScaleSetManagedDisk", "csharp" ); @@clientName(AlternativeOption, "ImageAlternativeOption", "csharp"); @@clientName(LogAnalyticsOperationResult, "LogAnalytics", "csharp"); @@clientName(RunCommandResult, "VirtualMachineRunCommandResult", "csharp"); -@@clientName(ConvertToVirtualMachineScaleSetInput, +@@clientName( + ConvertToVirtualMachineScaleSetInput, "ConvertToVirtualMachineScaleSetContent", "csharp" ); -@@clientName(MigrateVMToVirtualMachineScaleSetInput, +@@clientName( + MigrateVMToVirtualMachineScaleSetInput, "MigrateVmToVirtualMachineScaleSetContent", "csharp" ); -@@clientName(OrchestrationServiceStateInput, +@@clientName( + OrchestrationServiceStateInput, "OrchestrationServiceStateContent", "csharp" ); -@@clientName(RequestRateByIntervalInput, +@@clientName( + RequestRateByIntervalInput, "RequestRateByIntervalContent", "csharp" ); @@clientName(ThrottledRequestsInput, "ThrottledRequestsContent", "csharp"); -@@clientName(VirtualMachineCaptureParameters, +@@clientName( + VirtualMachineCaptureParameters, "VirtualMachineCaptureContent", "csharp" ); -@@clientName(VirtualMachineInstallPatchesParameters, +@@clientName( + VirtualMachineInstallPatchesParameters, "VirtualMachineInstallPatchesContent", "csharp" ); -@@clientName(VirtualMachineReimageParameters, +@@clientName( + VirtualMachineReimageParameters, "VirtualMachineReimageContent", "csharp" ); -@@clientName(VirtualMachineScaleSetReimageParameters, +@@clientName( + VirtualMachineScaleSetReimageParameters, "VirtualMachineScaleSetReimageContent", "csharp" ); -@@clientName(VMScaleSetConvertToSinglePlacementGroupInput, +@@clientName( + VMScaleSetConvertToSinglePlacementGroupInput, "VirtualMachineScaleSetConvertToSinglePlacementGroupContent", "csharp" ); -@@clientName(VMScaleSetScaleOutInput, +@@clientName( + VMScaleSetScaleOutInput, "VirtualMachineScaleSetScaleOutContent", "csharp" ); -@@clientName(SshGenerateKeyPairInputParameters, +@@clientName( + SshGenerateKeyPairInputParameters, "SshGenerateKeyPairInputContent", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateProperties, +@@clientName( + VirtualMachineScaleSetUpdateProperties, "VirtualMachineScaleSetPatchProperties", "csharp" ); @@clientName(ExpandTypeForListVMs, "GetVirtualMachineExpandType", "csharp"); -@@clientName(ExpandTypesForGetVMScaleSets, +@@clientName( + ExpandTypesForGetVMScaleSets, "VirtualMachineScaleSetGetExpand", "csharp" ); @@clientName(Modes, "HostEndpointSettingsMode", "csharp"); // ── Plural→singular enum renames (C# backward compat) ── -@@clientName(CapacityReservationGroupInstanceViewTypes, +@@clientName( + CapacityReservationGroupInstanceViewTypes, "CapacityReservationGroupInstanceViewType", "csharp" ); -@@clientName(CapacityReservationInstanceViewTypes, +@@clientName( + CapacityReservationInstanceViewTypes, "CapacityReservationInstanceViewType", "csharp" ); @@ -875,7 +1112,8 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(DiskControllerTypes, "DiskControllerType", "csharp"); @@clientName(DomainNameLabelScopeTypes, "DomainNameLabelScopeType", "csharp"); @@clientName(ExpandTypesForListVMs, "ExpandTypesForListVm", "csharp"); -@@clientName(ResourceIdOptionsForGetCapacityReservationGroups, +@@clientName( + ResourceIdOptionsForGetCapacityReservationGroups, "ResourceIdOptionsForGetCapacityReservationGroup", "csharp" ); @@ -889,11 +1127,13 @@ model VMSizePropertiesWithAdditionalProperties { // ── RP-prefix renames (C# backward compat) ── @@clientName(AllocationStrategy, "ComputeAllocationStrategy", "csharp"); @@clientName(DeleteOptions, "ComputeDeleteOption", "csharp"); -@@clientName(NetworkInterfaceAuxiliaryMode, +@@clientName( + NetworkInterfaceAuxiliaryMode, "ComputeNetworkInterfaceAuxiliaryMode", "csharp" ); -@@clientName(NetworkInterfaceAuxiliarySku, +@@clientName( + NetworkInterfaceAuxiliarySku, "ComputeNetworkInterfaceAuxiliarySku", "csharp" ); @@ -901,102 +1141,121 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(PublicIPAddressSkuTier, "ComputePublicIPAddressSkuTier", "csharp"); // ── VM→Vm casing renames (C# backward compat) ── -@@clientName(LinuxVMGuestPatchAutomaticByPlatformSettings, +@@clientName( + LinuxVMGuestPatchAutomaticByPlatformSettings, "LinuxVmGuestPatchAutomaticByPlatformSettings", "csharp" ); @@clientName(LinuxVMGuestPatchMode, "LinuxVmGuestPatchMode", "csharp"); -@@clientName(VMGuestPatchRebootBehavior, +@@clientName( + VMGuestPatchRebootBehavior, "VmGuestPatchRebootBehavior", "csharp" ); @@clientName(VMGuestPatchRebootSetting, "VmGuestPatchRebootSetting", "csharp"); @@clientName(VMGuestPatchRebootStatus, "VmGuestPatchRebootStatus", "csharp"); -@@clientName(WindowsVMGuestPatchAutomaticByPlatformSettings, +@@clientName( + WindowsVMGuestPatchAutomaticByPlatformSettings, "WindowsVmGuestPatchAutomaticByPlatformSettings", "csharp" ); @@clientName(WindowsVMGuestPatchMode, "WindowsVmGuestPatchMode", "csharp"); -@@clientName(VMScaleSetLifecycleHookEvent, +@@clientName( + VMScaleSetLifecycleHookEvent, "VirtualMachineScaleSetLifecycleHookEvent", "csharp" ); -@@clientName(VMScaleSetLifecycleHookEventState, +@@clientName( + VMScaleSetLifecycleHookEventState, "VmScaleSetLifecycleHookEventState", "csharp" ); -@@clientName(VMScaleSetLifecycleHookEventTargetResource, +@@clientName( + VMScaleSetLifecycleHookEventTargetResource, "VirtualMachineScaleSetLifecycleHookEventTarget", "csharp" ); -@@clientName(VMScaleSetLifecycleHookEventProperties, +@@clientName( + VMScaleSetLifecycleHookEventProperties, "VmScaleSetLifecycleHookEventProperties", "csharp" ); -@@clientName(VMScaleSetLifecycleHookEventProperties.type, +@@clientName( + VMScaleSetLifecycleHookEventProperties.type, "EventType", "csharp" ); -@@clientName(VMScaleSetLifecycleHookEventAdditionalContext, +@@clientName( + VMScaleSetLifecycleHookEventAdditionalContext, "VmScaleSetLifecycleHookEventAdditionalContext", "csharp" ); -@@clientName(VMScaleSetLifecycleHookEventType, - "VmScaleSetLifecycleHookEventType", - "csharp" -); -@@clientName(LifecycleHook.type, +@@clientName( + VMScaleSetLifecycleHookEventType, "VmScaleSetLifecycleHookEventType", "csharp" ); -@@clientName(VMScaleSetLifecycleHookEventUpdate, +@@clientName(LifecycleHook.type, "VmScaleSetLifecycleHookEventType", "csharp"); +@@clientName( + VMScaleSetLifecycleHookEventUpdate, "VirtualMachineScaleSetLifecycleHookEventPatch", "csharp" ); -@@clientName(VMScaleSetLifecycleHookEventListResult, +@@clientName( + VMScaleSetLifecycleHookEventListResult, "VmScaleSetLifecycleHookEventListResult", "csharp" ); // ── ID→Id casing renames on VMSS body parameters (C# backward compat) ── // back-compatible.tsp renames these to `vmInstanceIDs` for all languages; override to `vmInstanceIds` for C#. -@@clientName(VirtualMachineScaleSets.approveRollingUpgrade::parameters.body, +@@clientName( + VirtualMachineScaleSets.approveRollingUpgrade::parameters.body, "vmInstanceIds", "csharp" ); -@@clientName(VirtualMachineScaleSets.deallocate::parameters.body, +@@clientName( + VirtualMachineScaleSets.deallocate::parameters.body, "vmInstanceIds", "csharp" ); -@@clientName(VirtualMachineScaleSets.deleteInstances::parameters.body, +@@clientName( + VirtualMachineScaleSets.deleteInstances::parameters.body, "vmInstanceIds", "csharp" ); -@@clientName(VirtualMachineScaleSets.updateInstances::parameters.body, +@@clientName( + VirtualMachineScaleSets.updateInstances::parameters.body, "vmInstanceIds", "csharp" ); -@@clientName(VirtualMachineScaleSets.performMaintenance::parameters.body, +@@clientName( + VirtualMachineScaleSets.performMaintenance::parameters.body, "vmInstanceIds", "csharp" ); -@@clientName(VirtualMachineScaleSets.powerOff::parameters.body, +@@clientName( + VirtualMachineScaleSets.powerOff::parameters.body, "vmInstanceIds", "csharp" ); -@@clientName(VirtualMachineScaleSets.redeploy::parameters.body, +@@clientName( + VirtualMachineScaleSets.redeploy::parameters.body, "vmInstanceIds", "csharp" ); -@@clientName(VirtualMachineScaleSets.reimageAll::parameters.body, +@@clientName( + VirtualMachineScaleSets.reimageAll::parameters.body, "vmInstanceIds", "csharp" ); -@@clientName(VirtualMachineScaleSets.restart::parameters.body, +@@clientName( + VirtualMachineScaleSets.restart::parameters.body, "vmInstanceIds", "csharp" ); -@@clientName(VirtualMachineScaleSets.start::parameters.body, +@@clientName( + VirtualMachineScaleSets.start::parameters.body, "vmInstanceIds", "csharp" ); @@ -1009,7 +1268,8 @@ model VMSizePropertiesWithAdditionalProperties { // ── IP→Ip casing renames (C# backward compat) ── @@clientName(VirtualMachineIpTag, "VirtualMachineIPTag", "csharp"); -@@clientName(VirtualMachineScaleSetIpTag, +@@clientName( + VirtualMachineScaleSetIpTag, "VirtualMachineScaleSetIPTag", "csharp" ); @@ -1017,19 +1277,23 @@ model VMSizePropertiesWithAdditionalProperties { // ── Other renames (C# backward compat) ── @@clientName(AlternativeType, "ImageAlternativeType", "csharp"); @@clientName(RestorePointExpandOptions, "RestorePointExpand", "csharp"); -@@clientName(RestorePointCollectionExpandOptions, +@@clientName( + RestorePointCollectionExpandOptions, "RestorePointGroupExpand", "csharp" ); -@@clientName(RestorePointSourceVMDataDisk, +@@clientName( + RestorePointSourceVMDataDisk, "RestorePointSourceVmDataDisk", "csharp" ); -@@clientName(RestorePointSourceVMOSDisk, +@@clientName( + RestorePointSourceVMOSDisk, "RestorePointSourceVmOSDisk", "csharp" ); -@@clientName(RestorePointSourceVMStorageProfile, +@@clientName( + RestorePointSourceVMStorageProfile, "RestorePointSourceVmStorageProfile", "csharp" ); @@ -1043,32 +1307,38 @@ model VMSizePropertiesWithAdditionalProperties { // ── Os→OS property casing renames (C# backward compat) ── @@clientName(VirtualMachineSize.osDiskSizeInMB, "OSDiskSizeInMB", "csharp"); -@@clientName(AutomaticOSUpgradePolicy.osRollingUpgradeDeferral, +@@clientName( + AutomaticOSUpgradePolicy.osRollingUpgradeDeferral, "OSRollingUpgradeDeferral", "csharp" ); @@clientName(VirtualMachineScaleSetVMProfile.osProfile, "OSProfile", "csharp"); @@clientName(VirtualMachineScaleSetStorageProfile.osDisk, "OSDisk", "csharp"); @@clientName(VirtualMachineScaleSetOSDisk.osType, "OSType", "csharp"); -@@clientName(ScheduledEventsProfile.osImageNotificationProfile, +@@clientName( + ScheduledEventsProfile.osImageNotificationProfile, "OSImageNotificationProfile", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateVMProfile.osProfile, +@@clientName( + VirtualMachineScaleSetUpdateVMProfile.osProfile, "OSProfile", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateStorageProfile.osDisk, +@@clientName( + VirtualMachineScaleSetUpdateStorageProfile.osDisk, "OSDisk", "csharp" ); @@clientName(VirtualMachineReimageParameters.osProfile, "OSProfile", "csharp"); -@@clientName(VirtualMachineScaleSetVMProperties.osProfile, +@@clientName( + VirtualMachineScaleSetVMProperties.osProfile, "OSProfile", "csharp" ); @@clientName(VirtualMachineScaleSetVMInstanceView.osName, "OSName", "csharp"); -@@clientName(VirtualMachineScaleSetVMInstanceView.osVersion, +@@clientName( + VirtualMachineScaleSetVMInstanceView.osVersion, "OSVersion", "csharp" ); @@ -1077,7 +1347,8 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(VirtualMachineProperties.osProfile, "OSProfile", "csharp"); @@clientName(VirtualMachineInstanceView.osName, "OSName", "csharp"); @@clientName(VirtualMachineInstanceView.osVersion, "OSVersion", "csharp"); -@@clientName(VirtualMachineImageProperties.osDiskImage, +@@clientName( + VirtualMachineImageProperties.osDiskImage, "OSDiskImage", "csharp" ); @@ -1090,81 +1361,99 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(RunCommandDocumentBase.osType, "OSType", "csharp"); // ── Property casing renames: acronym case normalization (C# backward compat) ── -@@clientName(AdditionalCapabilities.ultraSSDEnabled, +@@clientName( + AdditionalCapabilities.ultraSSDEnabled, "UltraSsdEnabled", "csharp" ); -@@clientName(DedicatedHostGroupPropertiesAdditionalCapabilities.ultraSSDEnabled, +@@clientName( + DedicatedHostGroupPropertiesAdditionalCapabilities.ultraSSDEnabled, "UltraSsdEnabled", "csharp" ); -@@clientName(HostEndpointSettings.inVMAccessControlProfileReferenceId, +@@clientName( + HostEndpointSettings.inVMAccessControlProfileReferenceId, "InVmAccessControlProfileReferenceId", "csharp" ); -@@clientName(LinuxConfiguration.enableVMAgentPlatformUpdates, +@@clientName( + LinuxConfiguration.enableVMAgentPlatformUpdates, "IsVmAgentPlatformUpdatesEnabled", "csharp" ); -@@clientName(LinuxConfiguration.disablePasswordAuthentication, +@@clientName( + LinuxConfiguration.disablePasswordAuthentication, "IsPasswordAuthenticationDisabled", "csharp" ); @@clientName(LinuxConfiguration.provisionVMAgent, "ProvisionVmAgent", "csharp"); -@@clientName(WindowsConfiguration.enableAutomaticUpdates, +@@clientName( + WindowsConfiguration.enableAutomaticUpdates, "IsAutomaticUpdatesEnabled", "csharp" ); // Rename the nested-model parent properties so the auto-flattened C# names // become ResilientVm... instead of ResilientVM... (matches v1.14.0 baseline). -@@clientName(ResiliencyPolicy.resilientVMCreationPolicy, +@@clientName( + ResiliencyPolicy.resilientVMCreationPolicy, "resilientVmCreationPolicy", "csharp" ); -@@clientName(ResiliencyPolicy.resilientVMDeletionPolicy, +@@clientName( + ResiliencyPolicy.resilientVMDeletionPolicy, "resilientVmDeletionPolicy", "csharp" ); -@@clientName(WindowsConfiguration.provisionVMAgent, +@@clientName( + WindowsConfiguration.provisionVMAgent, "ProvisionVmAgent", "csharp" ); -@@clientName(ScaleInPolicy.prioritizeUnhealthyVMs, +@@clientName( + ScaleInPolicy.prioritizeUnhealthyVMs, "PrioritizeUnhealthyVms", "csharp" ); @@clientName(DataDisk.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); -@@clientName(VirtualMachineInstanceView.isVMInStandbyPool, +@@clientName( + VirtualMachineInstanceView.isVMInStandbyPool, "IsVmInStandbyPool", "csharp" ); -@@clientName(VirtualMachineScaleSetDataDisk.diskIOPSReadWrite, +@@clientName( + VirtualMachineScaleSetDataDisk.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateProperties.doNotRunExtensionsOnOverprovisionedVMs, +@@clientName( + VirtualMachineScaleSetUpdateProperties.doNotRunExtensionsOnOverprovisionedVMs, "DoNotRunExtensionsOnOverprovisionedVms", "csharp" ); -@@clientName(VirtualMachineScaleSetProperties.doNotRunExtensionsOnOverprovisionedVMs, +@@clientName( + VirtualMachineScaleSetProperties.doNotRunExtensionsOnOverprovisionedVMs, "DoNotRunExtensionsOnOverprovisionedVms", "csharp" ); -@@clientName(VirtualMachineScaleSetVMProperties.resilientVMDeletionStatus, +@@clientName( + VirtualMachineScaleSetVMProperties.resilientVMDeletionStatus, "ResilientVmDeletionStatus", "csharp" ); @@clientName(VMSizeProperties.vCPUsAvailable, "VCpusAvailable", "csharp"); @@clientName(VMSizeProperties.vCPUsPerCore, "VCpusPerCore", "csharp"); -@@clientName(StorageProfile.alignRegionalDisksToVMZone, +@@clientName( + StorageProfile.alignRegionalDisksToVMZone, "AlignRegionalDisksToVmZone", "csharp" ); -@@clientName(MigrateVMToVirtualMachineScaleSetInput.targetVMSize, +@@clientName( + MigrateVMToVirtualMachineScaleSetInput.targetVMSize, "TargetVmSize", "csharp" ); -@@clientName(VirtualMachineExtensionImageProperties.vmScaleSetEnabled, +@@clientName( + VirtualMachineExtensionImageProperties.vmScaleSetEnabled, "VirtualMachineScaleSetEnabled", "csharp" ); @@ -1172,23 +1461,28 @@ model VMSizePropertiesWithAdditionalProperties { // ── IP→Ip property casing renames (C# backward compat) ── @@clientName(VirtualMachineIpTag.ipTagType, "IPTagType", "csharp"); @@clientName(VirtualMachineScaleSetIpTag.ipTagType, "IPTagType", "csharp"); -@@clientName(VirtualMachineNetworkInterfaceConfigurationProperties.ipConfigurations, +@@clientName( + VirtualMachineNetworkInterfaceConfigurationProperties.ipConfigurations, "IPConfigurations", "csharp" ); -@@clientName(VirtualMachinePublicIPAddressConfigurationProperties.ipTags, +@@clientName( + VirtualMachinePublicIPAddressConfigurationProperties.ipTags, "IPTags", "csharp" ); -@@clientName(VirtualMachineScaleSetNetworkConfigurationProperties.ipConfigurations, +@@clientName( + VirtualMachineScaleSetNetworkConfigurationProperties.ipConfigurations, "IPConfigurations", "csharp" ); -@@clientName(VirtualMachineScaleSetPublicIPAddressConfigurationProperties.ipTags, +@@clientName( + VirtualMachineScaleSetPublicIPAddressConfigurationProperties.ipTags, "IPTags", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.ipConfigurations, +@@clientName( + VirtualMachineScaleSetUpdateNetworkConfigurationProperties.ipConfigurations, "IPConfigurations", "csharp" ); @@ -1198,23 +1492,28 @@ model VMSizePropertiesWithAdditionalProperties { @@clientName(RollingUpgradePolicy.maxSurge, "IsMaxSurgeEnabled", "csharp"); @@clientName(UefiSettings.secureBootEnabled, "IsSecureBootEnabled", "csharp"); @@clientName(UefiSettings.vTpmEnabled, "IsVirtualTpmEnabled", "csharp"); -@@clientName(VirtualMachineScaleSetProperties.constrainedMaximumCapacity, +@@clientName( + VirtualMachineScaleSetProperties.constrainedMaximumCapacity, "IsMaximumCapacityConstrained", "csharp" ); -@@clientName(WindowsConfiguration.enableVMAgentPlatformUpdates, +@@clientName( + WindowsConfiguration.enableVMAgentPlatformUpdates, "IsVmAgentPlatformUpdatesEnabled", "csharp" ); -@@clientName(VirtualMachineNetworkInterfaceConfigurationProperties.disableTcpStateTracking, +@@clientName( + VirtualMachineNetworkInterfaceConfigurationProperties.disableTcpStateTracking, "IsTcpStateTrackingDisabled", "csharp" ); -@@clientName(VirtualMachineScaleSetNetworkConfigurationProperties.disableTcpStateTracking, +@@clientName( + VirtualMachineScaleSetNetworkConfigurationProperties.disableTcpStateTracking, "IsTcpStateTrackingDisabled", "csharp" ); -@@clientName(VirtualMachineScaleSetUpdateNetworkConfigurationProperties.disableTcpStateTracking, +@@clientName( + VirtualMachineScaleSetUpdateNetworkConfigurationProperties.disableTcpStateTracking, "IsTcpStateTrackingDisabled", "csharp" ); @@ -1222,37 +1521,45 @@ model VMSizePropertiesWithAdditionalProperties { // ── Qualified property name renames (C# backward compat) ── @@clientName(AlternativeOption.type, "AlternativeType", "csharp"); @@clientName(RestorePointEncryption.type, "EncryptionType", "csharp"); -@@clientName(RunCommandParameterDefinition.type, +@@clientName( + RunCommandParameterDefinition.type, "RunCommandParameterDefinitionType", "csharp" ); -@@clientName(UpgradeOperationHistoricalStatusInfo.type, +@@clientName( + UpgradeOperationHistoricalStatusInfo.type, "UpgradeOperationHistoricalStatusInfoType", "csharp" ); -@@clientName(VirtualMachineExtensionHandlerInstanceView.type, +@@clientName( + VirtualMachineExtensionHandlerInstanceView.type, "VirtualMachineExtensionHandlerInstanceViewType", "csharp" ); -@@clientName(VirtualMachineExtensionInstanceView.type, +@@clientName( + VirtualMachineExtensionInstanceView.type, "VirtualMachineExtensionInstanceViewType", "csharp" ); // ── Other property renames (C# backward compat) ── -@@clientName(ImageReference.sharedGalleryImageId, +@@clientName( + ImageReference.sharedGalleryImageId, "SharedGalleryImageUniqueId", "csharp" ); -@@clientName(OrchestrationServiceSummary.lastStatusChangeTime, +@@clientName( + OrchestrationServiceSummary.lastStatusChangeTime, "LastStatusChangedOn", "csharp" ); -@@clientName(RestorePointCollectionProperties.restorePointCollectionId, +@@clientName( + RestorePointCollectionProperties.restorePointCollectionId, "RestorePointGroupId", "csharp" ); -@@clientName(VMScaleSetScaleOutInputProperties.zone, +@@clientName( + VMScaleSetScaleOutInputProperties.zone, "VmScaleSetScaleOutInputZone", "csharp" ); @@ -1264,36 +1571,43 @@ model VMSizePropertiesWithAdditionalProperties { // ── alternateType: string → ResourceIdentifier (C# backward compat) ── // Wrapper model id properties → ResourceIdentifier. -@@alternateType(ServiceArtifactReference.id, +@@alternateType( + ServiceArtifactReference.id, Azure.Core.armResourceIdentifier, "csharp" ); -@@alternateType(SecurityPostureReference.id, +@@alternateType( + SecurityPostureReference.id, Azure.Core.armResourceIdentifier, "csharp" ); -@@alternateType(SshPublicKeyGenerateKeyPairResult.id, +@@alternateType( + SshPublicKeyGenerateKeyPairResult.id, Azure.Core.armResourceIdentifier, "csharp" ); -@@alternateType(RestorePointCollectionSourceProperties.id, +@@alternateType( + RestorePointCollectionSourceProperties.id, Azure.Core.armResourceIdentifier, "csharp" ); // Direct string properties → ResourceIdentifier. -@@alternateType(VirtualMachineScaleSetVMInstanceView.assignedHost, +@@alternateType( + VirtualMachineScaleSetVMInstanceView.assignedHost, Azure.Core.armResourceIdentifier, "csharp" ); // ── alternateType: string → Uri (C# backward compat) ── @@alternateType(BootDiagnostics.storageUri, url, "csharp"); -@@alternateType(BootDiagnosticsInstanceView.consoleScreenshotBlobUri, +@@alternateType( + BootDiagnosticsInstanceView.consoleScreenshotBlobUri, url, "csharp" ); -@@alternateType(BootDiagnosticsInstanceView.serialConsoleLogBlobUri, +@@alternateType( + BootDiagnosticsInstanceView.serialConsoleLogBlobUri, url, "csharp" ); @@ -1301,17 +1615,20 @@ model VMSizePropertiesWithAdditionalProperties { @@alternateType(KeyVaultKeyReference.keyUrl, url, "csharp"); @@alternateType(KeyVaultSecretReference.secretUrl, url, "csharp"); @@alternateType(LogAnalyticsInputBase.blobContainerSasUri, url, "csharp"); -@@alternateType(RetrieveBootDiagnosticsDataResult.consoleScreenshotBlobUri, +@@alternateType( + RetrieveBootDiagnosticsDataResult.consoleScreenshotBlobUri, url, "csharp" ); -@@alternateType(RetrieveBootDiagnosticsDataResult.serialConsoleLogBlobUri, +@@alternateType( + RetrieveBootDiagnosticsDataResult.serialConsoleLogBlobUri, url, "csharp" ); @@alternateType(VaultCertificate.certificateUrl, url, "csharp"); @@alternateType(VirtualHardDisk.uri, url, "csharp"); -@@alternateType(VirtualMachineRunCommandProperties.outputBlobUri, +@@alternateType( + VirtualMachineRunCommandProperties.outputBlobUri, url, "csharp" ); @@ -1320,23 +1637,28 @@ model VMSizePropertiesWithAdditionalProperties { @@alternateType(WinRMListener.certificateUrl, url, "csharp"); // ── alternateType: Identity types → ManagedServiceIdentity (C# backward compat) ── -@@alternateType(VirtualMachineScaleSet.identity, +@@alternateType( + VirtualMachineScaleSet.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); -@@alternateType(VirtualMachineScaleSetUpdate.identity, +@@alternateType( + VirtualMachineScaleSetUpdate.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); -@@alternateType(VirtualMachineScaleSetVM.identity, +@@alternateType( + VirtualMachineScaleSetVM.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); -@@alternateType(VirtualMachine.identity, +@@alternateType( + VirtualMachine.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); -@@alternateType(VirtualMachineUpdate.identity, +@@alternateType( + VirtualMachineUpdate.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); @@ -1372,42 +1694,142 @@ union PassName { // The generator lowercases size suffixes (s, m, r) differently from old SDK. // ════════════════════════════════════════════════════════════════════════════ -@@clientName(VirtualMachineSizeTypes.Standard_A2m_v2, "StandardA2MV2", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_A4m_v2, "StandardA4MV2", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_A8m_v2, "StandardA8MV2", "csharp"); +@@clientName( + VirtualMachineSizeTypes.Standard_A2m_v2, + "StandardA2MV2", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_A4m_v2, + "StandardA4MV2", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_A8m_v2, + "StandardA8MV2", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_B1ms, "StandardB1Ms", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_B1s, "StandardB1S", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_B2ms, "StandardB2Ms", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_B2s, "StandardB2S", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_B4ms, "StandardB4Ms", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_B8ms, "StandardB8Ms", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_D16s_v3, "StandardD16SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_D2s_v3, "StandardD2SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_D32s_v3, "StandardD32SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_D4s_v3, "StandardD4SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_D64s_v3, "StandardD64SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_D8s_v3, "StandardD8SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_E16s_v3, "StandardE16SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_E2s_v3, "StandardE2SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.`Standard_E32-8s_v3`, "StandardE328SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_E32s_v3, "StandardE32SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_E4s_v3, "StandardE4SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.`Standard_E64-16s_v3`, "StandardE6416SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.`Standard_E64-32s_v3`, "StandardE6432SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_E64s_v3, "StandardE64SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_E8s_v3, "StandardE8SV3", "csharp"); +@@clientName( + VirtualMachineSizeTypes.Standard_D16s_v3, + "StandardD16SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_D2s_v3, + "StandardD2SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_D32s_v3, + "StandardD32SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_D4s_v3, + "StandardD4SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_D64s_v3, + "StandardD64SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_D8s_v3, + "StandardD8SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_E16s_v3, + "StandardE16SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_E2s_v3, + "StandardE2SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.`Standard_E32-8s_v3`, + "StandardE328SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_E32s_v3, + "StandardE32SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_E4s_v3, + "StandardE4SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.`Standard_E64-16s_v3`, + "StandardE6416SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.`Standard_E64-32s_v3`, + "StandardE6432SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_E64s_v3, + "StandardE64SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_E8s_v3, + "StandardE8SV3", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_F16s, "StandardF16S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F16s_v2, "StandardF16SV2", "csharp"); +@@clientName( + VirtualMachineSizeTypes.Standard_F16s_v2, + "StandardF16SV2", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_F1s, "StandardF1S", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_F2s, "StandardF2S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F2s_v2, "StandardF2SV2", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F32s_v2, "StandardF32SV2", "csharp"); +@@clientName( + VirtualMachineSizeTypes.Standard_F2s_v2, + "StandardF2SV2", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_F32s_v2, + "StandardF32SV2", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_F4s, "StandardF4S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F4s_v2, "StandardF4SV2", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F64s_v2, "StandardF64SV2", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F72s_v2, "StandardF72SV2", "csharp"); +@@clientName( + VirtualMachineSizeTypes.Standard_F4s_v2, + "StandardF4SV2", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_F64s_v2, + "StandardF64SV2", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_F72s_v2, + "StandardF72SV2", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_F8s, "StandardF8S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_F8s_v2, "StandardF8SV2", "csharp"); +@@clientName( + VirtualMachineSizeTypes.Standard_F8s_v2, + "StandardF8SV2", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_H16m, "StandardH16M", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_H16mr, "StandardH16Mr", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_H16r, "StandardH16R", "csharp"); @@ -1416,25 +1838,81 @@ union PassName { @@clientName(VirtualMachineSizeTypes.Standard_L32s, "StandardL32S", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_L4s, "StandardL4S", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_L8s, "StandardL8S", "csharp"); -@@clientName(VirtualMachineSizeTypes.`Standard_M128-32ms`, "StandardM12832Ms", "csharp"); -@@clientName(VirtualMachineSizeTypes.`Standard_M128-64ms`, "StandardM12864Ms", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_M128ms, "StandardM128Ms", "csharp"); +@@clientName( + VirtualMachineSizeTypes.`Standard_M128-32ms`, + "StandardM12832Ms", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.`Standard_M128-64ms`, + "StandardM12864Ms", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_M128ms, + "StandardM128Ms", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_M128s, "StandardM128S", "csharp"); -@@clientName(VirtualMachineSizeTypes.`Standard_M64-16ms`, "StandardM6416Ms", "csharp"); -@@clientName(VirtualMachineSizeTypes.`Standard_M64-32ms`, "StandardM6432Ms", "csharp"); +@@clientName( + VirtualMachineSizeTypes.`Standard_M64-16ms`, + "StandardM6416Ms", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.`Standard_M64-32ms`, + "StandardM6432Ms", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_M64ms, "StandardM64Ms", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_M64s, "StandardM64S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC12s_v2, "StandardNC12SV2", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC12s_v3, "StandardNC12SV3", "csharp"); +@@clientName( + VirtualMachineSizeTypes.Standard_NC12s_v2, + "StandardNC12SV2", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_NC12s_v3, + "StandardNC12SV3", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_NC24r, "StandardNC24R", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC24rs_v2, "StandardNC24RsV2", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC24rs_v3, "StandardNC24RsV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC24s_v2, "StandardNC24SV2", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC24s_v3, "StandardNC24SV3", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC6s_v2, "StandardNC6SV2", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_NC6s_v3, "StandardNC6SV3", "csharp"); +@@clientName( + VirtualMachineSizeTypes.Standard_NC24rs_v2, + "StandardNC24RsV2", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_NC24rs_v3, + "StandardNC24RsV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_NC24s_v2, + "StandardNC24SV2", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_NC24s_v3, + "StandardNC24SV3", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_NC6s_v2, + "StandardNC6SV2", + "csharp" +); +@@clientName( + VirtualMachineSizeTypes.Standard_NC6s_v3, + "StandardNC6SV3", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_ND12s, "StandardND12S", "csharp"); -@@clientName(VirtualMachineSizeTypes.Standard_ND24rs, "StandardND24Rs", "csharp"); +@@clientName( + VirtualMachineSizeTypes.Standard_ND24rs, + "StandardND24Rs", + "csharp" +); @@clientName(VirtualMachineSizeTypes.Standard_ND24s, "StandardND24S", "csharp"); @@clientName(VirtualMachineSizeTypes.Standard_ND6s, "StandardND6S", "csharp"); @@ -1463,8 +1941,13 @@ union ComputeUsageUnit { @@clientName(SecurityTypes.ConfidentialVM, "ConfidentialVm", "csharp"); -@@clientName(SecurityEncryptionTypes.VMGuestStateOnly, "VmGuestStateOnly", "csharp"); -@@clientName(SecurityEncryptionTypes.DiskWithVMGuestState, +@@clientName( + SecurityEncryptionTypes.VMGuestStateOnly, + "VmGuestStateOnly", + "csharp" +); +@@clientName( + SecurityEncryptionTypes.DiskWithVMGuestState, "DiskWithVmGuestState", "csharp" ); @@ -1474,11 +1957,13 @@ union ComputeUsageUnit { @@clientName(VirtualMachineScaleSetScaleInRules.OldestVM, "OldestVm", "csharp"); @@clientName(VirtualMachineScaleSetScaleInRules.NewestVM, "NewestVm", "csharp"); -@@clientName(ExpandTypesForGetCapacityReservationGroups.`virtualMachineScaleSetVMs/$ref`, +@@clientName( + ExpandTypesForGetCapacityReservationGroups.`virtualMachineScaleSetVMs/$ref`, "VirtualMachineScaleSetVmsRef", "csharp" ); -@@clientName(ExpandTypesForGetCapacityReservationGroups.`virtualMachines/$ref`, +@@clientName( + ExpandTypesForGetCapacityReservationGroups.`virtualMachines/$ref`, "VirtualMachinesRef", "csharp" ); @@ -1488,14 +1973,38 @@ union ComputeUsageUnit { // parameterless ctor and writable properties. TypeSpec's default Output-only usage // removes both. Force Azure.ClientGenerator.Core.Usage.input for csharp to restore the legacy surface. @@usage(VirtualMachineImage, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(VirtualMachineImageResource, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(VirtualMachineExtensionImage, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(VirtualMachineImageFeature, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(ImageDeprecationStatus, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + VirtualMachineImageResource, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + VirtualMachineExtensionImage, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + VirtualMachineImageFeature, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + ImageDeprecationStatus, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); @@usage(AlternativeOption, Azure.ClientGenerator.Core.Usage.input, "csharp"); @@usage(PurchasePlan, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(SubResourceWithColocationStatus, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@usage(RollingUpgradeStatusInfo, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + SubResourceWithColocationStatus, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + RollingUpgradeStatusInfo, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); // ════════════════════════════════════════════════════════════════════════════ // region: ComputeDisk — type/property renames (csharp) @@ -1521,7 +2030,8 @@ union ComputeUsageUnit { @@clientName(Disk, "ManagedDisk", "csharp"); // PrivateEndpointConnection → ComputePrivateEndpointConnection (old RP-prefix convention). -@@clientName(PrivateEndpointConnection, +@@clientName( + PrivateEndpointConnection, "ComputePrivateEndpointConnection", "csharp" ); @@ -1532,57 +2042,124 @@ union ComputeUsageUnit { // ── Plural→singular enum renames (C# backward compat) ── @@clientName(DiskSecurityTypes, "DiskSecurityType", "csharp"); @@clientName(DiskStorageAccountTypes, "DiskStorageAccountType", "csharp"); -@@clientName(SnapshotStorageAccountTypes, "SnapshotStorageAccountType", "csharp"); +@@clientName( + SnapshotStorageAccountTypes, + "SnapshotStorageAccountType", + "csharp" +); // ── RP-prefix renames (C# backward compat) ── @@clientName(EncryptionType, "ComputeEncryptionType", "csharp"); // ── Property casing renames: acronym case normalization (C# backward compat) ── @@clientName(AccessUri.accessSAS, "AccessSas", "csharp"); -@@clientName(AccessUri.securityDataAccessSAS, "SecurityDataAccessSas", "csharp"); -@@clientName(AccessUri.securityMetadataAccessSAS, "SecurityMetadataAccessSas", "csharp"); -@@clientName(DiskSecurityProfile.secureVMDiskEncryptionSetId, "SecureVmDiskEncryptionSetId", "csharp"); -@@clientName(GrantAccessData.getSecureVMGuestStateSAS, "GetSecureVmGuestStateSas", "csharp"); +@@clientName( + AccessUri.securityDataAccessSAS, + "SecurityDataAccessSas", + "csharp" +); +@@clientName( + AccessUri.securityMetadataAccessSAS, + "SecurityMetadataAccessSas", + "csharp" +); +@@clientName( + DiskSecurityProfile.secureVMDiskEncryptionSetId, + "SecureVmDiskEncryptionSetId", + "csharp" +); +@@clientName( + GrantAccessData.getSecureVMGuestStateSAS, + "GetSecureVmGuestStateSas", + "csharp" +); @@clientName(DiskProperties.diskIOPSReadOnly, "DiskIopsReadOnly", "csharp"); @@clientName(DiskProperties.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); -@@clientName(DiskUpdateProperties.diskIOPSReadOnly, "DiskIopsReadOnly", "csharp"); -@@clientName(DiskUpdateProperties.diskIOPSReadWrite, "DiskIopsReadWrite", "csharp"); +@@clientName( + DiskUpdateProperties.diskIOPSReadOnly, + "DiskIopsReadOnly", + "csharp" +); +@@clientName( + DiskUpdateProperties.diskIOPSReadWrite, + "DiskIopsReadWrite", + "csharp" +); // ── Is* prefix property renames (C# backward compat) ── -@@clientName(CreationData.performancePlus, "IsPerformancePlusEnabled", "csharp"); -@@clientName(DiskProperties.optimizedForFrequentAttach, "IsOptimizedForFrequentAttach", "csharp"); -@@clientName(DiskUpdateProperties.optimizedForFrequentAttach, "IsOptimizedForFrequentAttach", "csharp"); +@@clientName( + CreationData.performancePlus, + "IsPerformancePlusEnabled", + "csharp" +); +@@clientName( + DiskProperties.optimizedForFrequentAttach, + "IsOptimizedForFrequentAttach", + "csharp" +); +@@clientName( + DiskUpdateProperties.optimizedForFrequentAttach, + "IsOptimizedForFrequentAttach", + "csharp" +); // ── Qualified property name renames (C# backward compat) ── @@clientName(Encryption.type, "EncryptionType", "csharp"); // ── Other property renames (C# backward compat) ── -@@clientName(DiskProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); -@@clientName(DiskUpdateProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); -@@clientName(SnapshotProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); -@@clientName(SnapshotUpdateProperties.encryptionSettingsCollection, "EncryptionSettingsGroup", "csharp"); -@@clientName(PrivateEndpointConnectionProperties.privateLinkServiceConnectionState, "ConnectionState", "csharp"); +@@clientName( + DiskProperties.encryptionSettingsCollection, + "EncryptionSettingsGroup", + "csharp" +); +@@clientName( + DiskUpdateProperties.encryptionSettingsCollection, + "EncryptionSettingsGroup", + "csharp" +); +@@clientName( + SnapshotProperties.encryptionSettingsCollection, + "EncryptionSettingsGroup", + "csharp" +); +@@clientName( + SnapshotUpdateProperties.encryptionSettingsCollection, + "EncryptionSettingsGroup", + "csharp" +); +@@clientName( + PrivateEndpointConnectionProperties.privateLinkServiceConnectionState, + "ConnectionState", + "csharp" +); // ── alternateType overrides: string → armResourceIdentifier (C# backward compat) ── // Wrapper model id properties → ResourceIdentifier. @@alternateType(SourceVault.id, Azure.Core.armResourceIdentifier, "csharp"); @@alternateType(PrivateEndpoint.id, Azure.Core.armResourceIdentifier, "csharp"); -@@alternateType(ImageDiskReference.id, Azure.Core.armResourceIdentifier, "csharp"); +@@alternateType( + ImageDiskReference.id, + Azure.Core.armResourceIdentifier, + "csharp" +); // Disk. @@alternateType(Disk.managedBy, Azure.Core.armResourceIdentifier, "csharp"); -@@alternateType(Disk.managedByExtended, +@@alternateType( + Disk.managedByExtended, Azure.Core.armResourceIdentifier[], "csharp" ); -@@alternateType(DiskProperties.diskAccessId, +@@alternateType( + DiskProperties.diskAccessId, Azure.Core.armResourceIdentifier, "csharp" ); // DiskUpdate. -@@alternateType(DiskUpdateProperties.diskAccessId, +@@alternateType( + DiskUpdateProperties.diskAccessId, Azure.Core.armResourceIdentifier, "csharp" ); @@ -1592,65 +2169,77 @@ union ComputeUsageUnit { // settable properties. TypeSpec's default usage flags this as output-only, which // removes both. Forcing Azure.ClientGenerator.Core.Usage.input restores the public ctor + property setters. @@usage(DiskRestorePoint, Azure.ClientGenerator.Core.Usage.input, "csharp"); -@@alternateType(DiskRestorePointProperties.diskAccessId, +@@alternateType( + DiskRestorePointProperties.diskAccessId, Azure.Core.armResourceIdentifier, "csharp" ); -@@alternateType(DiskRestorePointProperties.sourceResourceId, +@@alternateType( + DiskRestorePointProperties.sourceResourceId, Azure.Core.armResourceIdentifier, "csharp" ); // Snapshot. -@@alternateType(SnapshotProperties.diskAccessId, +@@alternateType( + SnapshotProperties.diskAccessId, Azure.Core.armResourceIdentifier, "csharp" ); // SnapshotUpdate. -@@alternateType(SnapshotUpdateProperties.diskAccessId, +@@alternateType( + SnapshotUpdateProperties.diskAccessId, Azure.Core.armResourceIdentifier, "csharp" ); // CreationData. -@@alternateType(CreationData.sourceResourceId, +@@alternateType( + CreationData.sourceResourceId, Azure.Core.armResourceIdentifier, "csharp" ); -@@alternateType(CreationData.storageAccountId, +@@alternateType( + CreationData.storageAccountId, Azure.Core.armResourceIdentifier, "csharp" ); -@@alternateType(CreationData.elasticSanResourceId, +@@alternateType( + CreationData.elasticSanResourceId, Azure.Core.armResourceIdentifier, "csharp" ); // Encryption. -@@alternateType(Encryption.diskEncryptionSetId, +@@alternateType( + Encryption.diskEncryptionSetId, Azure.Core.armResourceIdentifier, "csharp" ); // DiskSecurityProfile. -@@alternateType(DiskSecurityProfile.secureVMDiskEncryptionSetId, +@@alternateType( + DiskSecurityProfile.secureVMDiskEncryptionSetId, Azure.Core.armResourceIdentifier, "csharp" ); // PrivateLinkResource. -@@alternateType(PrivateLinkResourceProperties.groupId, +@@alternateType( + PrivateLinkResourceProperties.groupId, Azure.Core.armResourceIdentifier, "csharp" ); // ── alternateType: Identity → ManagedServiceIdentity (C# backward compat) ── -@@alternateType(DiskEncryptionSet.identity, +@@alternateType( + DiskEncryptionSet.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); -@@alternateType(DiskEncryptionSetUpdate.identity, +@@alternateType( + DiskEncryptionSetUpdate.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); @@ -1664,36 +2253,49 @@ union ComputeUsageUnit { @@alternateType(ShareInfoElement.vmUri, url, "csharp"); // Mark non-pageable list operations as pageable for backward compatibility. -@@Azure.ClientGenerator.Core.Legacy.markAsPageable(DiskAccesses.getPrivateLinkResources, +@@Azure.ClientGenerator.Core.Legacy.markAsPageable( + DiskAccesses.getPrivateLinkResources, "csharp" ); // .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. @@clientName(DiskStorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); @@clientName(DiskStorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); -@@clientName(DiskStorageAccountTypes.StandardSSD_LRS, "StandardSsdLrs", "csharp"); +@@clientName( + DiskStorageAccountTypes.StandardSSD_LRS, + "StandardSsdLrs", + "csharp" +); @@clientName(DiskStorageAccountTypes.UltraSSD_LRS, "UltraSsdLrs", "csharp"); @@clientName(DiskStorageAccountTypes.Premium_ZRS, "PremiumZrs", "csharp"); -@@clientName(DiskStorageAccountTypes.StandardSSD_ZRS, "StandardSsdZrs", "csharp"); +@@clientName( + DiskStorageAccountTypes.StandardSSD_ZRS, + "StandardSsdZrs", + "csharp" +); @@clientName(DiskStorageAccountTypes.PremiumV2_LRS, "PremiumV2Lrs", "csharp"); @@clientName(SnapshotStorageAccountTypes.Standard_LRS, "StandardLrs", "csharp"); @@clientName(SnapshotStorageAccountTypes.Premium_LRS, "PremiumLrs", "csharp"); @@clientName(SnapshotStorageAccountTypes.Standard_ZRS, "StandardZrs", "csharp"); -@@clientName(DiskSecurityTypes.ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey, +@@clientName( + DiskSecurityTypes.ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey, "ConfidentialVmGuestStateOnlyEncryptedWithPlatformKey", "csharp" ); -@@clientName(DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithPlatformKey, +@@clientName( + DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithPlatformKey, "ConfidentialVmDiskEncryptedWithPlatformKey", "csharp" ); -@@clientName(DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithCustomerKey, +@@clientName( + DiskSecurityTypes.ConfidentialVM_DiskEncryptedWithCustomerKey, "ConfidentialVmDiskEncryptedWithCustomerKey", "csharp" ); -@@clientName(DiskSecurityTypes.ConfidentialVM_NonPersistedTPM, +@@clientName( + DiskSecurityTypes.ConfidentialVM_NonPersistedTPM, "ConfidentialVmNonPersistedTPM", "csharp" ); @@ -1704,7 +2306,8 @@ union ComputeUsageUnit { @@clientName(FileFormat.VHD, "Vhd", "csharp"); @@clientName(FileFormat.VHDX, "Vhdx", "csharp"); -@@clientName(SupportedSecurityOption.TrustedLaunchAndConfidentialVMSupported, +@@clientName( + SupportedSecurityOption.TrustedLaunchAndConfidentialVMSupported, "TrustedLaunchAndConfidentialVmSupported", "csharp" ); @@ -1718,24 +2321,28 @@ union ComputeUsageUnit { @@clientName(GalleryImageProperties.osType, "OSType", "csharp"); @@clientName(GalleryImageProperties.osState, "OSState", "csharp"); @@clientName(EncryptionImages.osDiskImage, "OSDiskImage", "csharp"); -@@clientName(GalleryImageVersionStorageProfile.osDiskImage, +@@clientName( + GalleryImageVersionStorageProfile.osDiskImage, "OSDiskImage", "csharp" ); -@@clientName(GalleryInVMAccessControlProfileProperties.osType, +@@clientName( + GalleryInVMAccessControlProfileProperties.osType, "OSType", "csharp" ); @@clientName(SharedGalleryImageProperties.osType, "OSType", "csharp"); @@clientName(SharedGalleryImageProperties.osState, "OSState", "csharp"); -@@clientName(SharedGalleryImageVersionStorageProfile.osDiskImage, +@@clientName( + SharedGalleryImageVersionStorageProfile.osDiskImage, "OSDiskImage", "csharp" ); @@clientName(CommunityGalleryImageProperties.osType, "OSType", "csharp"); @@clientName(CommunityGalleryImageProperties.osState, "OSState", "csharp"); -@@clientName(GalleryTargetExtendedLocation.storageAccountType, +@@clientName( + GalleryTargetExtendedLocation.storageAccountType, "GalleryStorageAccountType", "csharp" ); @@ -1744,11 +2351,13 @@ union ComputeUsageUnit { // GallerySoftDeletedResource.properties.softDeletedTime: -|date-time // and the AutoRest naming convention then renamed `Time` -> `On`. // Spec keeps it as `string`; mirror the legacy C# shape for back-compat. -@@alternateType(GallerySoftDeletedResourceProperties.softDeletedTime, +@@alternateType( + GallerySoftDeletedResourceProperties.softDeletedTime, utcDateTime, "csharp" ); -@@clientName(GallerySoftDeletedResourceProperties.softDeletedTime, +@@clientName( + GallerySoftDeletedResourceProperties.softDeletedTime, "softDeletedOn", "csharp" ); @@ -1765,54 +2374,64 @@ union ComputeUsageUnit { @@clientName(PlatformAttribute, "ComputeGalleryPlatformAttribute", "csharp"); @@clientName(ExecutedValidation, "GalleryImageExecutedValidation", "csharp"); @@clientName(ValidationStatus, "ComputeGalleryValidationStatus", "csharp"); -@@clientName(GallerySharingPermissionTypes, +@@clientName( + GallerySharingPermissionTypes, "GallerySharingPermissionType", "csharp" ); // Gallery update models previously shipped as ResourceData-derived patch models. #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryUpdate, +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + GalleryUpdate, Azure.ResourceManager.Foundations.Resource, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryImageUpdate, +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + GalleryImageUpdate, Azure.ResourceManager.Foundations.Resource, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryImageVersionUpdate, +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + GalleryImageVersionUpdate, Azure.ResourceManager.Foundations.Resource, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryApplicationUpdate, +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + GalleryApplicationUpdate, Azure.ResourceManager.Foundations.Resource, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryApplicationVersionUpdate, +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + GalleryApplicationVersionUpdate, Azure.ResourceManager.Foundations.Resource, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryScriptUpdate, +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + GalleryScriptUpdate, Azure.ResourceManager.Foundations.Resource, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryScriptVersionUpdate, +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + GalleryScriptVersionUpdate, Azure.ResourceManager.Foundations.Resource, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryInVMAccessControlProfileUpdate, +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + GalleryInVMAccessControlProfileUpdate, Azure.ResourceManager.Foundations.Resource, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Restore ResourceData base type for gallery patch models" -@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryInVMAccessControlProfileVersionUpdate, +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + GalleryInVMAccessControlProfileVersionUpdate, Azure.ResourceManager.Foundations.Resource, "csharp" ); @@ -1823,97 +2442,113 @@ union ComputeUsageUnit { @@access(SharedGalleryIdentifier, Access.public, "csharp"); // Resource type InVM→InVm casing renames (backward compat with AutoRest output). -@@clientName(GalleryInVMAccessControlProfile, +@@clientName( + GalleryInVMAccessControlProfile, "GalleryInVmAccessControlProfile", "csharp" ); -@@clientName(GalleryInVMAccessControlProfileVersion, +@@clientName( + GalleryInVMAccessControlProfileVersion, "GalleryInVmAccessControlProfileVersion", "csharp" ); -@@clientName(GalleryInVMAccessControlProfileProperties, +@@clientName( + GalleryInVMAccessControlProfileProperties, "GalleryInVmAccessControlProfileProperties", "csharp" ); -@@clientName(GalleryInVMAccessControlProfileUpdate, +@@clientName( + GalleryInVMAccessControlProfileUpdate, "GalleryInVmAccessControlProfilePatch", "csharp" ); -@@clientName(GalleryInVMAccessControlProfileVersionProperties, +@@clientName( + GalleryInVMAccessControlProfileVersionProperties, "GalleryInVmAccessControlProfileVersionProperties", "csharp" ); -@@clientName(GalleryInVMAccessControlProfileVersionUpdate, +@@clientName( + GalleryInVMAccessControlProfileVersionUpdate, "GalleryInVmAccessControlProfileVersionPatch", "csharp" ); -@@clientName(GalleryInVMAccessControlProfileList, +@@clientName( + GalleryInVMAccessControlProfileList, "GalleryInVmAccessControlProfileList", "csharp" ); -@@clientName(GalleryInVMAccessControlProfileVersionList, +@@clientName( + GalleryInVMAccessControlProfileVersionList, "GalleryInVmAccessControlProfileVersionList", "csharp" ); // AccessControlRules and EndpointAccess renames (backward compat with AutoRest RP-prefix). @@clientName(AccessControlRules, "GalleryInVmAccessControlRules", "csharp"); -@@clientName(AccessControlRulesMode, +@@clientName( + AccessControlRulesMode, "GalleryInVmAccessControlRulesMode", "csharp" ); -@@clientName(AccessControlRulesPrivilege, +@@clientName( + AccessControlRulesPrivilege, "GalleryInVmAccessControlRulesPrivilege", "csharp" ); -@@clientName(AccessControlRulesRole, +@@clientName( + AccessControlRulesRole, "GalleryInVmAccessControlRulesRole", "csharp" ); -@@clientName(AccessControlRulesIdentity, +@@clientName( + AccessControlRulesIdentity, "GalleryInVmAccessControlRulesIdentity", "csharp" ); -@@clientName(AccessControlRulesRoleAssignment, +@@clientName( + AccessControlRulesRoleAssignment, "GalleryInVmAccessControlRulesRoleAssignment", "csharp" ); @@clientName(EndpointAccess, "ComputeGalleryEndpointAccess", "csharp"); // Rename community gallery child identifier property to avoid CS0108 hiding conflict with base class Identifier. -@@clientName(CommunityGalleryImageProperties.identifier, +@@clientName( + CommunityGalleryImageProperties.identifier, "ImageIdentifier", "csharp" ); -@@clientName(SharedGalleryImageProperties.identifier, - "Identifier", - "csharp" -); +@@clientName(SharedGalleryImageProperties.identifier, "Identifier", "csharp"); // Rename raw gallery operations to match old SDK method names. @@clientName(SharedGalleries.get, "GetSharedGalleryData", "csharp"); @@clientName(SharedGalleries.list, "GetSharedGalleries", "csharp"); @@clientName(SharedGalleryImages.get, "GetSharedGalleryImage", "csharp"); @@clientName(SharedGalleryImages.list, "GetSharedGalleryImages", "csharp"); -@@clientName(SharedGalleryImageVersions.get, +@@clientName( + SharedGalleryImageVersions.get, "GetSharedGalleryImageVersion", "csharp" ); -@@clientName(SharedGalleryImageVersions.list, +@@clientName( + SharedGalleryImageVersions.list, "GetSharedGalleryImageVersions", "csharp" ); @@clientName(CommunityGalleries.get, "GetCommunityGalleryData", "csharp"); @@clientName(CommunityGalleryImages.get, "GetCommunityGalleryImage", "csharp"); -@@clientName(CommunityGalleryImages.list, +@@clientName( + CommunityGalleryImages.list, "GetCommunityGalleryImages", "csharp" ); -@@clientName(CommunityGalleryImageVersions.get, +@@clientName( + CommunityGalleryImageVersions.get, "GetCommunityGalleryImageVersion", "csharp" ); -@@clientName(CommunityGalleryImageVersions.list, +@@clientName( + CommunityGalleryImageVersions.list, "GetCommunityGalleryImageVersions", "csharp" ); @@ -1921,24 +2556,29 @@ union ComputeUsageUnit { // Type renames for backward compatibility. @@clientName(EndpointTypes, "ComputeGalleryEndpointType", "csharp"); @@clientName(EndpointTypes.IMDS, "Imds", "csharp"); -@@clientName(GallerySoftDeletedResource, +@@clientName( + GallerySoftDeletedResource, "GallerySoftDeletedResourceDetails", "csharp" ); @@clientName(PirResource, "PirResourceData", "csharp"); -@@clientName(PirSharedGalleryResource, +@@clientName( + PirSharedGalleryResource, "PirSharedGalleryResourceData", "csharp" ); -@@clientName(PirSharedGalleryResource.identifier, +@@clientName( + PirSharedGalleryResource.identifier, "galleryIdentifier", "csharp" ); -@@clientName(PirCommunityGalleryResource, +@@clientName( + PirCommunityGalleryResource, "PirCommunityGalleryResourceData", "csharp" ); -@@clientName(PirCommunityGalleryResource.identifier, +@@clientName( + PirCommunityGalleryResource.identifier, "galleryIdentifier", "csharp" ); @@ -1946,13 +2586,15 @@ union ComputeUsageUnit { // Rename gallery models to *Data for backward compatibility (they were ARM resources before). @@clientName(SharedGallery, "SharedGalleryData", "csharp"); @@clientName(SharedGalleryImage, "SharedGalleryImageData", "csharp"); -@@clientName(SharedGalleryImageVersion, +@@clientName( + SharedGalleryImageVersion, "SharedGalleryImageVersionData", "csharp" ); @@clientName(CommunityGallery, "CommunityGalleryData", "csharp"); @@clientName(CommunityGalleryImage, "CommunityGalleryImageData", "csharp"); -@@clientName(CommunityGalleryImageVersion, +@@clientName( + CommunityGalleryImageVersion, "CommunityGalleryImageVersionData", "csharp" ); @@ -1961,71 +2603,88 @@ union ComputeUsageUnit { @@clientName(ReplicationStatusTypes, "ReplicationStatusType", "csharp"); @@clientName(SelectPermissions, "SelectPermission", "csharp"); @@clientName(SharingProfileGroupTypes, "SharingProfileGroupType", "csharp"); -@@clientName(SharingUpdateOperationTypes, +@@clientName( + SharingUpdateOperationTypes, "SharingUpdateOperationType", "csharp" ); -@@clientName(SoftDeletedArtifactTypes, +@@clientName( + SoftDeletedArtifactTypes, "GallerySoftDeletedArtifactType", "csharp" ); // ── VM→Vm casing renames (C# backward compat) ── -@@clientName(ConfidentialVMEncryptionType, +@@clientName( + ConfidentialVMEncryptionType, "ConfidentialVmEncryptionType", "csharp" ); // ── Other renames (C# backward compat) ── @@clientName(GalleryExpandParams, "GalleryExpand", "csharp"); -@@clientName(PolicyViolationCategory, +@@clientName( + PolicyViolationCategory, "GalleryImageVersionPolicyViolationCategory", "csharp" ); @@clientName(ReplicationState, "RegionalReplicationState", "csharp"); // ── Property casing renames: acronym case normalization (C# backward compat) ── -@@clientName(OSDiskImageSecurityProfile.confidentialVMEncryptionType, +@@clientName( + OSDiskImageSecurityProfile.confidentialVMEncryptionType, "ConfidentialVmEncryptionType", "csharp" ); -@@clientName(OSDiskImageSecurityProfile.secureVMDiskEncryptionSetId, +@@clientName( + OSDiskImageSecurityProfile.secureVMDiskEncryptionSetId, "SecureVmDiskEncryptionSetId", "csharp" ); @@clientName(RecommendedMachineConfiguration.vCPUs, "VCpus", "csharp"); // ── Is* prefix property renames (C# backward compat) ── -@@clientName(GalleryApplicationCustomActionParameter.required, +@@clientName( + GalleryApplicationCustomActionParameter.required, "IsRequired", "csharp" ); -@@clientName(GalleryImageVersionSafetyProfile.blockDeletionBeforeEndOfLife, +@@clientName( + GalleryImageVersionSafetyProfile.blockDeletionBeforeEndOfLife, "IsBlockedDeletionBeforeEndOfLife", "csharp" ); -@@clientName(GalleryImageVersionSafetyProfile.reportedForPolicyViolation, +@@clientName( + GalleryImageVersionSafetyProfile.reportedForPolicyViolation, "IsReportedForPolicyViolation", "csharp" ); @@clientName(TargetRegion.excludeFromLatest, "IsExcludedFromLatest", "csharp"); -@@clientName(GalleryArtifactPublishingProfileBase.excludeFromLatest, +@@clientName( + GalleryArtifactPublishingProfileBase.excludeFromLatest, "IsExcludedFromLatest", "csharp" ); -@@clientName(SharedGalleryImageVersionProperties.excludeFromLatest, +@@clientName( + SharedGalleryImageVersionProperties.excludeFromLatest, "IsExcludedFromLatest", "csharp" ); -@@clientName(CommunityGalleryImageVersionProperties.excludeFromLatest, +@@clientName( + CommunityGalleryImageVersionProperties.excludeFromLatest, "IsExcludedFromLatest", "csharp" ); // Match v1.14.0 baseline: property is `IsRestoreEnabled`. -@@clientName(GalleryImageVersionProperties.restore, "IsRestoreEnabled", "csharp"); +@@clientName( + GalleryImageVersionProperties.restore, + "IsRestoreEnabled", + "csharp" +); // ── Qualified property name renames (C# backward compat) ── -@@clientName(GalleryApplicationCustomActionParameter.type, +@@clientName( + GalleryApplicationCustomActionParameter.type, "ParameterType", "csharp" ); @@ -2042,20 +2701,23 @@ union ComputeUsageUnit { // ── alternateType: string → Uri (C# backward compat) ── @@alternateType(GalleryImageProperties.privacyStatementUri, url, "csharp"); @@alternateType(GalleryImageProperties.releaseNoteUri, url, "csharp"); -@@alternateType(GalleryApplicationProperties.privacyStatementUri, +@@alternateType( + GalleryApplicationProperties.privacyStatementUri, url, "csharp" ); @@alternateType(GalleryApplicationProperties.releaseNoteUri, url, "csharp"); @@alternateType(GalleryScriptProperties.privacyStatementUri, url, "csharp"); @@alternateType(GalleryScriptProperties.releaseNoteUri, url, "csharp"); -@@alternateType(SharedGalleryImageProperties.privacyStatementUri, +@@alternateType( + SharedGalleryImageProperties.privacyStatementUri, url, "csharp" ); @@clientName(CommunityGalleryInfo.publisherUri, "publisherUriString", "csharp"); @@alternateType(CommunityGalleryMetadata.privacyStatementUri, url, "csharp"); -@@alternateType(CommunityGalleryImageProperties.privacyStatementUri, +@@alternateType( + CommunityGalleryImageProperties.privacyStatementUri, url, "csharp" ); @@ -2063,21 +2725,25 @@ union ComputeUsageUnit { // ── alternateType: string → ResourceIdentifier (C# backward compat) ── // Wrapper model id properties → ResourceIdentifier. -@@alternateType(GalleryArtifactVersionSource.id, +@@alternateType( + GalleryArtifactVersionSource.id, Azure.Core.armResourceIdentifier, "csharp" ); // Direct string properties → ResourceIdentifier. -@@alternateType(GalleryArtifactVersionFullSource.virtualMachineId, +@@alternateType( + GalleryArtifactVersionFullSource.virtualMachineId, Azure.Core.armResourceIdentifier, "csharp" ); -@@alternateType(GalleryDiskImageSource.storageAccountId, +@@alternateType( + GalleryDiskImageSource.storageAccountId, Azure.Core.armResourceIdentifier, "csharp" ); -@@alternateType(DiskImageEncryption.diskEncryptionSetId, +@@alternateType( + DiskImageEncryption.diskEncryptionSetId, Azure.Core.armResourceIdentifier, "csharp" ); @@ -2086,17 +2752,20 @@ union ComputeUsageUnit { // Spec emits `type?: string`. The previously shipped C# SDK exposed it as // `ResourceType` of type `Azure.Core.ResourceType?`. Restore both. @@clientName(PirCommunityGalleryResource.type, "ResourceType", "csharp"); -@@alternateType(PirCommunityGalleryResource.type, +@@alternateType( + PirCommunityGalleryResource.type, Azure.Core.armResourceType, "csharp" ); // ── alternateType: Identity → ManagedServiceIdentity (C# backward compat) ── -@@alternateType(Gallery.identity, +@@alternateType( + Gallery.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); -@@alternateType(GalleryUpdate.identity, +@@alternateType( + GalleryUpdate.identity, Azure.ResourceManager.Foundations.ManagedServiceIdentity, "csharp" ); @@ -2109,20 +2778,37 @@ union ComputeUsageUnit { @@clientName(EdgeZoneStorageAccountType.Standard_LRS, "StandardLrs", "csharp"); @@clientName(EdgeZoneStorageAccountType.Standard_ZRS, "StandardZrs", "csharp"); -@@clientName(EdgeZoneStorageAccountType.StandardSSD_LRS, "StandardSsdLrs", "csharp"); +@@clientName( + EdgeZoneStorageAccountType.StandardSSD_LRS, + "StandardSsdLrs", + "csharp" +); @@clientName(EdgeZoneStorageAccountType.Premium_LRS, "PremiumLrs", "csharp"); -@@clientName(ConfidentialVMEncryptionType.EncryptedVMGuestStateOnlyWithPmk, +@@clientName( + ConfidentialVMEncryptionType.EncryptedVMGuestStateOnlyWithPmk, "EncryptedVmGuestStateOnlyWithPmk", "csharp" ); @@clientName(PolicyViolationCategory.IpTheft, "IPTheft", "csharp"); -@@clientName(StorageAccountStrategy.PreferStandard_ZRS, "PreferStandardZrs", "csharp"); -@@clientName(StorageAccountStrategy.DefaultStandard_LRS, "DefaultStandardLrs", "csharp"); +@@clientName( + StorageAccountStrategy.PreferStandard_ZRS, + "PreferStandardZrs", + "csharp" +); +@@clientName( + StorageAccountStrategy.DefaultStandard_LRS, + "DefaultStandardLrs", + "csharp" +); // ── Azure.ClientGenerator.Core.Usage.input forces public ctor + property setters on output-only models ── // .NET back-compat: GallerySoftDeletedResource previously shipped with a public // parameterless ctor and writable properties. Restore via Azure.ClientGenerator.Core.Usage.input for csharp. -@@usage(GallerySoftDeletedResource, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + GallerySoftDeletedResource, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json index 651c8a4d0930..c7eeb1bfd6a9 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json @@ -198,7 +198,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CommunityGalleryImageList" } @@ -307,7 +307,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CommunityGalleryImageVersionList" } @@ -429,7 +429,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SharedGalleryList" } @@ -544,7 +544,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SharedGalleryImageList" } @@ -673,7 +673,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SharedGalleryImageVersionList" } @@ -3892,8 +3892,15 @@ "$ref": "#/definitions/CommunityGalleryProperties", "description": "Describes the properties of a community gallery.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The public name of the community gallery." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -3918,8 +3925,15 @@ "$ref": "#/definitions/CommunityGalleryImageProperties", "description": "Describes the properties of a gallery image definition.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The name of the community gallery image definition." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -4051,8 +4065,15 @@ "$ref": "#/definitions/CommunityGalleryImageVersionProperties", "description": "Describes the properties of a gallery image version.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -6109,8 +6130,15 @@ "$ref": "#/definitions/SharedGalleryProperties", "description": "Specifies the properties of a shared gallery", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The unique name of the Shared Gallery." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" @@ -6197,8 +6225,15 @@ "$ref": "#/definitions/SharedGalleryImageProperties", "description": "Describes the properties of a gallery image definition.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The name of the Shared Gallery Image Definition from which the Image Versions are to be listed." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" @@ -6308,8 +6343,15 @@ "$ref": "#/definitions/SharedGalleryImageVersionProperties", "description": "Describes the properties of a gallery image version.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json index 5eae6e0b5ddc..25f2d35e6e8c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json @@ -204,7 +204,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CommunityGalleryImageList" } @@ -313,7 +313,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CommunityGalleryImageVersionList" } @@ -435,7 +435,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SharedGalleryList" } @@ -550,7 +550,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SharedGalleryImageList" } @@ -679,7 +679,7 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SharedGalleryImageVersionList" } @@ -4632,8 +4632,15 @@ "$ref": "#/definitions/CommunityGalleryProperties", "description": "Describes the properties of a community gallery.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The public name of the community gallery." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -4658,8 +4665,15 @@ "$ref": "#/definitions/CommunityGalleryImageProperties", "description": "Describes the properties of a gallery image definition.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The name of the community gallery image definition." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -4791,8 +4805,15 @@ "$ref": "#/definitions/CommunityGalleryImageVersionProperties", "description": "Describes the properties of a gallery image version.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -7167,8 +7188,15 @@ "$ref": "#/definitions/SharedGalleryProperties", "description": "Specifies the properties of a shared gallery", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The unique name of the Shared Gallery." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" @@ -7255,8 +7283,15 @@ "$ref": "#/definitions/SharedGalleryImageProperties", "description": "Describes the properties of a gallery image definition.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The name of the Shared Gallery Image Definition from which the Image Versions are to be listed." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" @@ -7366,8 +7401,15 @@ "$ref": "#/definitions/SharedGalleryImageVersionProperties", "description": "Describes the properties of a gallery image version.", "x-ms-client-flatten": true + }, + "name": { + "type": "string", + "description": "The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" From 5035d0c8f1abb27eb1446ef37fdb359acab13dc5 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 14:52:04 +0800 Subject: [PATCH 090/103] Revert Compute gallery proxy resource customization Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/ComputeGallery/models.tsp | 36 ++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp index d20af7098266..4e692bda20a5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp @@ -2742,11 +2742,25 @@ model LatestGalleryImageVersion { * @template Properties A model containing the provider-specific properties for this resource * @template PropertiesOptional A boolean flag indicating whether the resource `Properties` field is marked as optional or required. Default true is optional and recommended. */ +#suppress "@azure-tools/typespec-azure-core/no-private-usage" +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" @doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") -model ProxyResourceCommunity - extends PirCommunityGalleryResource { +@Http.Private.includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Legacy.customAzureResource +model ProxyResourceCommunity< + Properties extends {}, + PropertiesOptional extends valueof boolean = true +> extends PirCommunityGalleryResource { @doc("The resource-specific properties for this resource.") properties?: Properties; + + /** + * The name of the parent resource. + */ + @path + @visibility(Lifecycle.Read) + @segment("parents") + parentName: string; } /** @@ -2756,11 +2770,25 @@ model ProxyResourceCommunity * @template Properties A model containing the provider-specific properties for this resource * @template PropertiesOptional A boolean flag indicating whether the resource `Properties` field is marked as optional or required. Default true is optional and recommended. */ +#suppress "@azure-tools/typespec-azure-core/no-private-usage" +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" @doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") -model ProxyResourceShared - extends PirSharedGalleryResource { +@Http.Private.includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Legacy.customAzureResource +model ProxyResourceShared< + Properties extends {}, + PropertiesOptional extends valueof boolean = true +> extends PirSharedGalleryResource { @doc("The resource-specific properties for this resource.") properties?: Properties; + + /** + * The name of the parent resource. + */ + @path + @visibility(Lifecycle.Read) + @segment("parents") + parentName: string; } @@doc(CommunityGalleryImageList.value, "A list of community gallery images."); @@doc( From f3ae2884ecc7c4c9eb03919c01ebab4319e38c42 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 15:09:00 +0800 Subject: [PATCH 091/103] Refine Compute gallery proxy TypeSpec customization Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/ComputeGallery/models.tsp | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp index 4e692bda20a5..e588ac19a1cf 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp @@ -2740,17 +2740,11 @@ model LatestGalleryImageVersion { * * See more details on [different Azure Resource Manager resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type) * @template Properties A model containing the provider-specific properties for this resource - * @template PropertiesOptional A boolean flag indicating whether the resource `Properties` field is marked as optional or required. Default true is optional and recommended. */ -#suppress "@azure-tools/typespec-azure-core/no-private-usage" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" @doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") @Http.Private.includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Legacy.customAzureResource -model ProxyResourceCommunity< - Properties extends {}, - PropertiesOptional extends valueof boolean = true -> extends PirCommunityGalleryResource { +model ProxyResourceCommunity + extends PirCommunityGalleryResource { @doc("The resource-specific properties for this resource.") properties?: Properties; @@ -2768,17 +2762,11 @@ model ProxyResourceCommunity< * * See more details on [different Azure Resource Manager resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type) * @template Properties A model containing the provider-specific properties for this resource - * @template PropertiesOptional A boolean flag indicating whether the resource `Properties` field is marked as optional or required. Default true is optional and recommended. */ -#suppress "@azure-tools/typespec-azure-core/no-private-usage" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" @doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") @Http.Private.includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Legacy.customAzureResource -model ProxyResourceShared< - Properties extends {}, - PropertiesOptional extends valueof boolean = true -> extends PirSharedGalleryResource { +model ProxyResourceShared + extends PirSharedGalleryResource { @doc("The resource-specific properties for this resource.") properties?: Properties; From 1427451069850ef0570369270d07d2eeafe71703 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 16:00:23 +0800 Subject: [PATCH 092/103] Remove Compute gallery Swagger changes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Compute/stable/2024-03-03/GalleryRP.json | 42 ------------------- .../Compute/stable/2025-03-03/GalleryRP.json | 42 ------------------- 2 files changed, 84 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json index c7eeb1bfd6a9..d3c38a9d5771 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-03/GalleryRP.json @@ -3892,15 +3892,8 @@ "$ref": "#/definitions/CommunityGalleryProperties", "description": "Describes the properties of a community gallery.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The public name of the community gallery." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -3925,15 +3918,8 @@ "$ref": "#/definitions/CommunityGalleryImageProperties", "description": "Describes the properties of a gallery image definition.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The name of the community gallery image definition." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -4065,15 +4051,8 @@ "$ref": "#/definitions/CommunityGalleryImageVersionProperties", "description": "Describes the properties of a gallery image version.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -6130,15 +6109,8 @@ "$ref": "#/definitions/SharedGalleryProperties", "description": "Specifies the properties of a shared gallery", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The unique name of the Shared Gallery." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" @@ -6225,15 +6197,8 @@ "$ref": "#/definitions/SharedGalleryImageProperties", "description": "Describes the properties of a gallery image definition.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The name of the Shared Gallery Image Definition from which the Image Versions are to be listed." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" @@ -6343,15 +6308,8 @@ "$ref": "#/definitions/SharedGalleryImageVersionProperties", "description": "Describes the properties of a gallery image version.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json index 25f2d35e6e8c..5d78564858ec 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json @@ -4632,15 +4632,8 @@ "$ref": "#/definitions/CommunityGalleryProperties", "description": "Describes the properties of a community gallery.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The public name of the community gallery." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -4665,15 +4658,8 @@ "$ref": "#/definitions/CommunityGalleryImageProperties", "description": "Describes the properties of a gallery image definition.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The name of the community gallery image definition." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -4805,15 +4791,8 @@ "$ref": "#/definitions/CommunityGalleryImageVersionProperties", "description": "Describes the properties of a gallery image version.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirCommunityGalleryResource" @@ -7188,15 +7167,8 @@ "$ref": "#/definitions/SharedGalleryProperties", "description": "Specifies the properties of a shared gallery", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The unique name of the Shared Gallery." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" @@ -7283,15 +7255,8 @@ "$ref": "#/definitions/SharedGalleryImageProperties", "description": "Describes the properties of a gallery image definition.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The name of the Shared Gallery Image Definition from which the Image Versions are to be listed." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" @@ -7401,15 +7366,8 @@ "$ref": "#/definitions/SharedGalleryImageVersionProperties", "description": "Describes the properties of a gallery image version.", "x-ms-client-flatten": true - }, - "name": { - "type": "string", - "description": "The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "#/definitions/PirSharedGalleryResource" From 495bea2fa3333784572b686f02bf97dc8e7d2377 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 16:18:43 +0800 Subject: [PATCH 093/103] Fix Compute spec validation checks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/ComputeGallery/models.tsp | 2 ++ .../resource-manager/Microsoft.Compute/Compute/readme.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp index e588ac19a1cf..3c1e2a4dbc1d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp @@ -2742,6 +2742,7 @@ model LatestGalleryImageVersion { * @template Properties A model containing the provider-specific properties for this resource */ @doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") +#suppress "@azure-tools/typespec-azure-core/no-private-usage" "Required to keep parentName out of the payload while preserving C# resource-key shape." @Http.Private.includeInapplicableMetadataInPayload(false) model ProxyResourceCommunity extends PirCommunityGalleryResource { @@ -2764,6 +2765,7 @@ model ProxyResourceCommunity * @template Properties A model containing the provider-specific properties for this resource */ @doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") +#suppress "@azure-tools/typespec-azure-core/no-private-usage" "Required to keep parentName out of the payload while preserving C# resource-key shape." @Http.Private.includeInapplicableMetadataInPayload(false) model ProxyResourceShared extends PirSharedGalleryResource { diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md index 1c3ec88acaa8..5dc63ab714a5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md @@ -34,7 +34,7 @@ These are the global settings for the Compute API. title: ComputeManagementClient description: Compute Client openapi-type: arm -tag: package-2025-11-01 +tag: package-2025-11-01-only directive: - where: From 45976057921ff1035b1d2b70cd8b34afc484c8d6 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 16:26:16 +0800 Subject: [PATCH 094/103] Fix Compute TypeSpec validation warnings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/ComputeGallery/models.tsp | 4 ++-- .../resource-manager/Microsoft.Compute/Compute/client.tsp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp index 3c1e2a4dbc1d..6b17ead3fa10 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeGallery/models.tsp @@ -2741,8 +2741,8 @@ model LatestGalleryImageVersion { * See more details on [different Azure Resource Manager resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type) * @template Properties A model containing the provider-specific properties for this resource */ -@doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") #suppress "@azure-tools/typespec-azure-core/no-private-usage" "Required to keep parentName out of the payload while preserving C# resource-key shape." +@doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") @Http.Private.includeInapplicableMetadataInPayload(false) model ProxyResourceCommunity extends PirCommunityGalleryResource { @@ -2764,8 +2764,8 @@ model ProxyResourceCommunity * See more details on [different Azure Resource Manager resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type) * @template Properties A model containing the provider-specific properties for this resource */ -@doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") #suppress "@azure-tools/typespec-azure-core/no-private-usage" "Required to keep parentName out of the payload while preserving C# resource-key shape." +@doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.") @Http.Private.includeInapplicableMetadataInPayload(false) model ProxyResourceShared extends PirSharedGalleryResource { diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index ca3d7bbb0dc8..969b55783e0f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -983,14 +983,17 @@ model VMSizePropertiesWithAdditionalProperties { ); // Mark non-pageable list operations as pageable for backward compatibility. +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." @@Azure.ClientGenerator.Core.Legacy.markAsPageable( VirtualMachineExtensions.list, "csharp" ); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." @@Azure.ClientGenerator.Core.Legacy.markAsPageable( VirtualMachineScaleSetVMExtensions.list, "csharp" ); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." @@Azure.ClientGenerator.Core.Legacy.markAsPageable( VirtualMachineImagesOperationGroup.listByEdgeZone, "csharp" @@ -1922,6 +1925,7 @@ union PassName { // the C# emitter generates the extensible-enum struct used in v1.13.1 baseline. // ════════════════════════════════════════════════════════════════════════════ +/** The unit for Compute usage values. */ union ComputeUsageUnit { string, @@ -2253,6 +2257,7 @@ union ComputeUsageUnit { @@alternateType(ShareInfoElement.vmUri, url, "csharp"); // Mark non-pageable list operations as pageable for backward compatibility. +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." @@Azure.ClientGenerator.Core.Legacy.markAsPageable( DiskAccesses.getPrivateLinkResources, "csharp" From edec09658588c2111e63a7b89fc371c0082a8d12 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 16:34:04 +0800 Subject: [PATCH 095/103] Suppress Compute multi-version default tag warning Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/Compute/readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md index 5dc63ab714a5..b45463da3c48 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md @@ -34,9 +34,11 @@ These are the global settings for the Compute API. title: ComputeManagementClient description: Compute Client openapi-type: arm -tag: package-2025-11-01-only +tag: package-2025-11-01 directive: + - suppress: MULTIPLE_API_VERSION + reason: Compute packages multiple sub-services that intentionally use different latest API versions. - where: - $.definitions.VirtualMachine.properties suppress: From 68094e6a838554d0ad055923e151cc99b4fb3198 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 16:40:01 +0800 Subject: [PATCH 096/103] Move Compute Avocado suppression block Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/readme.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md index b45463da3c48..cd176bcbec5e 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md @@ -26,6 +26,14 @@ To see additional help and options, run: ## Configuration +### Suppression + +```yaml +directive: + - suppress: MULTIPLE_API_VERSION + reason: Compute packages multiple sub-services that intentionally use different latest API versions. +``` + ### Basic Information These are the global settings for the Compute API. @@ -37,8 +45,6 @@ openapi-type: arm tag: package-2025-11-01 directive: - - suppress: MULTIPLE_API_VERSION - reason: Compute packages multiple sub-services that intentionally use different latest API versions. - where: - $.definitions.VirtualMachine.properties suppress: From f15d189e3533d54324322454ed6c1fd1a5227d3b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 18:19:05 +0800 Subject: [PATCH 097/103] Move Compute Avocado suppression block --- .../Microsoft.Compute/Compute/readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md index cd176bcbec5e..7f0fcdd49ecf 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md @@ -26,18 +26,18 @@ To see additional help and options, run: ## Configuration +### Basic Information + +These are the global settings for the Compute API. + ### Suppression -```yaml +``` yaml directive: - suppress: MULTIPLE_API_VERSION reason: Compute packages multiple sub-services that intentionally use different latest API versions. ``` -### Basic Information - -These are the global settings for the Compute API. - ```yaml title: ComputeManagementClient description: Compute Client From e16d99213f235aeb4581c10bbcc689d3fd02f27b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 18:52:10 +0800 Subject: [PATCH 098/103] Match Compute Avocado suppression formatting --- .../compute/resource-manager/Microsoft.Compute/Compute/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md index 7f0fcdd49ecf..ccc7ad7d8add 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md @@ -31,7 +31,6 @@ To see additional help and options, run: These are the global settings for the Compute API. ### Suppression - ``` yaml directive: - suppress: MULTIPLE_API_VERSION From 5f86e8b8afb3bb45164073bf1eb776a0e890f2de Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 17 Jun 2026 09:57:26 +0800 Subject: [PATCH 099/103] Rename Compute recovery policy booleans --- .../Microsoft.Compute/Compute/client.tsp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 969b55783e0f..6f03d93117f2 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -172,6 +172,21 @@ namespace ComputeCombine; "csharp" ); @@clientName(RestorePointProperties.excludeDisks, "ExcludedDisks", "csharp"); +@@clientName( + RestartRecoveryPolicy.enabled, + "IsRestartRecoveryPolicyEnabled", + "csharp" +); +@@clientName( + StartRecoveryPolicy.enabled, + "IsStartRecoveryPolicyEnabled", + "csharp" +); +@@clientName( + ReimageRecoveryPolicy.enabled, + "IsReimageRecoveryPolicyEnabled", + "csharp" +); // Replace Compute's local ExtendedLocation / ExtendedLocationType with ARM common types @@alternateType( From 2d48a7f6299add05fb71a34a429733dc6c957a08 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 17 Jun 2026 15:47:58 +0800 Subject: [PATCH 100/103] Remove Compute README suppressions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Bulkactions/readme.md | 14 -------------- .../Microsoft.Compute/Compute/readme.md | 7 ------- 2 files changed, 21 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Bulkactions/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Bulkactions/readme.md index 0875298ccfcb..9c2d031fe612 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Bulkactions/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Bulkactions/readme.md @@ -125,18 +125,4 @@ These settings apply only when `--tag=package-2026-06-06` is specified on the co ```yaml $(tag) == 'package-2026-06-06' input-file: - stable/2026-06-06/Bulkactions.json -suppressions: - - code: ParameterNotUsingCommonTypes - reason: > - The location parameter is used as a segment-bound parameter in the - VirtualMachineBulkOperations action paths and cannot be a $ref to common-types - LocationParameter without losing the resource key binding. - from: Bulkactions.json - where: - - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkCancel"].post.parameters[?(@.name=='location')] - - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkDeallocate"].post.parameters[?(@.name=='location')] - - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkDelete"].post.parameters[?(@.name=='location')] - - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkGetOperationStatus"].post.parameters[?(@.name=='location')] - - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkHibernate"].post.parameters[?(@.name=='location')] - - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkStart"].post.parameters[?(@.name=='location')] ``` diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md index ccc7ad7d8add..1c3ec88acaa8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md @@ -30,13 +30,6 @@ To see additional help and options, run: These are the global settings for the Compute API. -### Suppression -``` yaml -directive: - - suppress: MULTIPLE_API_VERSION - reason: Compute packages multiple sub-services that intentionally use different latest API versions. -``` - ```yaml title: ComputeManagementClient description: Compute Client From 548101c3b5ae37f4f5e73be7befcef3baf648e99 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 17 Jun 2026 15:51:53 +0800 Subject: [PATCH 101/103] Restore Compute README from main Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Bulkactions/readme.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Bulkactions/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Bulkactions/readme.md index 9c2d031fe612..0875298ccfcb 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Bulkactions/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Bulkactions/readme.md @@ -125,4 +125,18 @@ These settings apply only when `--tag=package-2026-06-06` is specified on the co ```yaml $(tag) == 'package-2026-06-06' input-file: - stable/2026-06-06/Bulkactions.json +suppressions: + - code: ParameterNotUsingCommonTypes + reason: > + The location parameter is used as a segment-bound parameter in the + VirtualMachineBulkOperations action paths and cannot be a $ref to common-types + LocationParameter without losing the resource key binding. + from: Bulkactions.json + where: + - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkCancel"].post.parameters[?(@.name=='location')] + - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkDeallocate"].post.parameters[?(@.name=='location')] + - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkDelete"].post.parameters[?(@.name=='location')] + - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkGetOperationStatus"].post.parameters[?(@.name=='location')] + - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkHibernate"].post.parameters[?(@.name=='location')] + - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkStart"].post.parameters[?(@.name=='location')] ``` From 6c74b744578e2c876cb3645e6a7bf719ef683f9b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 17 Jun 2026 17:22:27 +0800 Subject: [PATCH 102/103] Address Compute client customizations review Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/client.tsp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index 6f03d93117f2..cb290037fa81 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -999,17 +999,17 @@ model VMSizePropertiesWithAdditionalProperties { // Mark non-pageable list operations as pageable for backward compatibility. #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." -@@Azure.ClientGenerator.Core.Legacy.markAsPageable( +@@Legacy.markAsPageable( VirtualMachineExtensions.list, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." -@@Azure.ClientGenerator.Core.Legacy.markAsPageable( +@@Legacy.markAsPageable( VirtualMachineScaleSetVMExtensions.list, "csharp" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." -@@Azure.ClientGenerator.Core.Legacy.markAsPageable( +@@Legacy.markAsPageable( VirtualMachineImagesOperationGroup.listByEdgeZone, "csharp" ); @@ -1632,6 +1632,7 @@ model VMSizePropertiesWithAdditionalProperties { @@alternateType(ImageDisk.blobUri, url, "csharp"); @@alternateType(KeyVaultKeyReference.keyUrl, url, "csharp"); @@alternateType(KeyVaultSecretReference.secretUrl, url, "csharp"); +@@useSystemTextJsonConverter(KeyVaultSecretReference, "csharp"); @@alternateType(LogAnalyticsInputBase.blobContainerSasUri, url, "csharp"); @@alternateType( RetrieveBootDiagnosticsDataResult.consoleScreenshotBlobUri, @@ -2273,7 +2274,7 @@ union ComputeUsageUnit { // Mark non-pageable list operations as pageable for backward compatibility. #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." -@@Azure.ClientGenerator.Core.Legacy.markAsPageable( +@@Legacy.markAsPageable( DiskAccesses.getPrivateLinkResources, "csharp" ); From e990bfc4a631980e55ff6f47cd44527ce9eed1ab Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 18 Jun 2026 12:28:57 +0800 Subject: [PATCH 103/103] Format Compute TypeSpec customizations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Compute/Compute/client.tsp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp index cb290037fa81..998ef36d0092 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/client.tsp @@ -999,15 +999,9 @@ model VMSizePropertiesWithAdditionalProperties { // Mark non-pageable list operations as pageable for backward compatibility. #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." -@@Legacy.markAsPageable( - VirtualMachineExtensions.list, - "csharp" -); +@@Legacy.markAsPageable(VirtualMachineExtensions.list, "csharp"); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." -@@Legacy.markAsPageable( - VirtualMachineScaleSetVMExtensions.list, - "csharp" -); +@@Legacy.markAsPageable(VirtualMachineScaleSetVMExtensions.list, "csharp"); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." @@Legacy.markAsPageable( VirtualMachineImagesOperationGroup.listByEdgeZone, @@ -2274,10 +2268,7 @@ union ComputeUsageUnit { // Mark non-pageable list operations as pageable for backward compatibility. #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Preserve C# pageable surface from the previous SDK." -@@Legacy.markAsPageable( - DiskAccesses.getPrivateLinkResources, - "csharp" -); +@@Legacy.markAsPageable(DiskAccesses.getPrivateLinkResources, "csharp"); // .NET back-compat: restore previously shipped acronym/casing for extensible-enum members. @@clientName(DiskStorageAccountTypes.Standard_LRS, "StandardLrs", "csharp");