diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ArmTemplate.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ArmTemplate.tsp index 4a336fec632b..09e03945afd9 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ArmTemplate.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ArmTemplate.tsp @@ -12,51 +12,31 @@ namespace Microsoft.DevTestLab; /** * An Azure Resource Manager template. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model ArmTemplate extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("armtemplates") - name: string; +@parentResource(ArtifactSource) +model ArmTemplate + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = ArmTemplate, + KeyName = "armTemplateName", + SegmentName = "armtemplates", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: ArmTemplateProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface ArmTemplatesOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - - /** The name of the artifact source. */ - @path @segment("artifactsources") artifactSourceName: string, - }, - KeysOf> - > {} - @armResourceOperations interface ArmTemplates { /** * Get azure resource manager template. */ - get is ArmTemplatesOps.Read< + get is ArmResourceRead< ArmTemplate, Parameters = { /** @@ -70,7 +50,8 @@ interface ArmTemplates { /** * List azure resource manager templates in a given artifact source. */ - list is ArmTemplatesOps.List< + @list + list is ArmResourceListByParent< ArmTemplate, Parameters = { /** diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Artifact.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Artifact.tsp index cea050c13487..828eb761f71e 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Artifact.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Artifact.tsp @@ -7,57 +7,36 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; namespace Microsoft.DevTestLab; /** * An artifact. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model Artifact extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("artifacts") - name: string; +@parentResource(ArtifactSource) +model Artifact + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Artifact, + KeyName = "artifactName", + SegmentName = "artifacts", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: ArtifactProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface ArtifactOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - - /** The name of the artifact source. */ - @path @segment("artifactsources") artifactSourceName: string, - }, - KeysOf> - > {} - @armResourceOperations interface Artifacts { /** * Get artifact. */ - get is ArtifactOps.Read< + get is ArmResourceRead< Artifact, Parameters = { /** @@ -71,7 +50,7 @@ interface Artifacts { /** * List artifacts in a given artifact source. */ - list is ArtifactOps.List< + list is ArmResourceListByParent< Artifact, Parameters = { /** @@ -104,7 +83,7 @@ interface Artifacts { /** * Generates an ARM template for the given artifact, uploads the required files to a storage account, and validates the generated artifact. */ - generateArmTemplate is ArtifactOps.ActionSync< + generateArmTemplate is ArmResourceActionSync< Artifact, GenerateArmTemplateRequest, ArmResponse diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ArtifactSource.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ArtifactSource.tsp index df3bd3d3308c..6dab0b6e75e3 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ArtifactSource.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ArtifactSource.tsp @@ -12,48 +12,31 @@ namespace Microsoft.DevTestLab; /** * Properties of an artifact source. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model ArtifactSource extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("artifactsources") - name: string; +@parentResource(Lab) +model ArtifactSource + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = ArtifactSource, + KeyName = "artifactSourceName", + SegmentName = "artifactsources", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: ArtifactSourceProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface ArtifactSourceOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - }, - KeysOf> - > {} - @armResourceOperations interface ArtifactSources { /** * Get artifact source. */ - get is ArtifactSourceOps.Read< + get is ArmResourceRead< ArtifactSource, Parameters = { /** @@ -67,14 +50,14 @@ interface ArtifactSources { /** * Create or replace an existing artifact source. */ - createOrUpdate is ArtifactSourceOps.CreateOrUpdateSync; + createOrUpdate is ArmResourceCreateOrReplaceSync; /** * Allows modifying tags of artifact sources. All other properties will be ignored. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "ArtifactSourceFragment contains tags as expected by the patch operation." @patch(#{ implicitOptionality: false }) - update is ArtifactSourceOps.CustomPatchSync< + update is ArmCustomPatchSync< ArtifactSource, PatchModel = ArtifactSourceFragment >; @@ -82,12 +65,12 @@ interface ArtifactSources { /** * Delete artifact source. */ - delete is ArtifactSourceOps.DeleteSync; + delete is ArmResourceDeleteSync; /** * List artifact sources in a given lab. */ - list is ArtifactSourceOps.List< + list is ArmResourceListByParent< ArtifactSource, Parameters = { /** diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/CustomImage.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/CustomImage.tsp index d77def80b80a..20b1ad80e00e 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/CustomImage.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/CustomImage.tsp @@ -12,20 +12,23 @@ namespace Microsoft.DevTestLab; /** * A custom image. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model CustomImage extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("customimages") - name: string; +@parentResource(Lab) +model CustomImage + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = CustomImage, + KeyName = "customImageName", + SegmentName = "customimages", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: CustomImageProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } @armResourceOperations diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Disk.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Disk.tsp index b7db34b36daf..e3c1bcf5830f 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Disk.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Disk.tsp @@ -7,57 +7,35 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; namespace Microsoft.DevTestLab; /** * A Disk. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model Disk extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("disks") - name: string; +@parentResource(User) +model Disk is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Disk, + KeyName = "diskName", + SegmentName = "disks", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: DiskProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface DiskOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - - /** The name of the user profile. */ - @path @segment("users") userName: string, - }, - KeysOf> - > {} - @armResourceOperations interface Disks { /** * Get disk. */ - get is DiskOps.Read< + get is ArmResourceRead< Disk, Parameters = { /** @@ -71,7 +49,7 @@ interface Disks { /** * Create or replace an existing disk. This operation can take a while to complete. */ - createOrUpdate is DiskOps.CreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< Disk, LroHeaders = ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader @@ -82,13 +60,13 @@ interface Disks { */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is DiskOps.CustomPatchSync; + update is ArmCustomPatchSync; /** * Delete disk. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" - delete is DiskOps.DeleteWithoutOkAsync< + delete is ArmResourceDeleteWithoutOkAsync< Disk, Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse >; @@ -96,7 +74,7 @@ interface Disks { /** * List disks in a given user profile. */ - list is DiskOps.List< + list is ArmResourceListByParent< Disk, Parameters = { /** @@ -129,12 +107,29 @@ interface Disks { /** * Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. */ - attach is DiskOps.ActionAsync; - + #suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "Legacy non-standard usage of operation response codes. Consider revising in a future API version." + attach is ArmResourceActionAsync< + Disk, + AttachDiskProperties, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; /** * Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. */ - detach is DiskOps.ActionAsync; + #suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "Legacy non-standard usage of operation response codes. Consider revising in a future API version." + detach is ArmResourceActionAsync< + Disk, + DetachDiskProperties, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; } @@doc(Disk.name, "The name of the disk."); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/DtlEnvironment.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/DtlEnvironment.tsp index af0d3fcb8f33..7b30817a7fa6 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/DtlEnvironment.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/DtlEnvironment.tsp @@ -13,52 +13,32 @@ namespace Microsoft.DevTestLab; /** * An environment, which is essentially an ARM template deployment. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model DtlEnvironment extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("environments") - name: string; +@parentResource(User) +model DtlEnvironment + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = DtlEnvironment, + KeyName = "environmentName", + SegmentName = "environments", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: EnvironmentProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface EnvironmentOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - - /** The name of the user profile. */ - @path @segment("users") userName: string, - }, - KeysOf> - > {} - @armResourceOperations interface Environments { /** * Get environment. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - get is EnvironmentOps.Read< + get is ArmResourceRead< DtlEnvironment, Parameters = { /** @@ -73,7 +53,7 @@ interface Environments { * Create or replace an existing environment. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - createOrUpdate is EnvironmentOps.CreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< DtlEnvironment, LroHeaders = ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader @@ -85,7 +65,7 @@ interface Environments { #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is EnvironmentOps.CustomPatchSync< + update is ArmCustomPatchSync< DtlEnvironment, PatchModel = DtlEnvironmentFragment >; @@ -95,7 +75,7 @@ interface Environments { */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" - delete is EnvironmentOps.DeleteWithoutOkAsync< + delete is ArmResourceDeleteWithoutOkAsync< DtlEnvironment, Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse >; @@ -104,7 +84,7 @@ interface Environments { * List environments in a given user profile. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - list is EnvironmentOps.List< + list is ArmResourceListByParent< DtlEnvironment, Parameters = { /** diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Formula.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Formula.tsp index 67c3f345bf3b..c3c05d6b1cdf 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Formula.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Formula.tsp @@ -13,48 +13,30 @@ namespace Microsoft.DevTestLab; /** * A formula for creating a VM, specifying an image base and other parameters */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model Formula extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("formulas") - name: string; +@parentResource(Lab) +model Formula is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Formula, + KeyName = "formulaName", + SegmentName = "formulas", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: FormulaProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface FormulaOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - }, - KeysOf> - > {} - @armResourceOperations interface Formulas { /** * Get formula. */ - get is FormulaOps.Read< + get is ArmResourceRead< Formula, Parameters = { /** @@ -68,7 +50,7 @@ interface Formulas { /** * Create or replace an existing formula. This operation can take a while to complete. */ - createOrUpdate is FormulaOps.CreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< Formula, LroHeaders = ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader @@ -79,17 +61,17 @@ interface Formulas { */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "FormulaFragment contains tags as expected by the patch operation." @patch(#{ implicitOptionality: false }) - update is FormulaOps.CustomPatchSync; + update is ArmCustomPatchSync; /** * Delete formula. */ - delete is FormulaOps.DeleteSync; + delete is ArmResourceDeleteSync; /** * List formulas in a given lab. */ - list is FormulaOps.List< + list is ArmResourceListByParent< Formula, Parameters = { /** diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/GalleryImage.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/GalleryImage.tsp index be7516108d39..a962b793042c 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/GalleryImage.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/GalleryImage.tsp @@ -12,53 +12,31 @@ namespace Microsoft.DevTestLab; /** * A gallery image. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model GalleryImage extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("galleryimages") - name: string; +@parentResource(Lab) +model GalleryImage + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = GalleryImage, + KeyName = "galleryImageName", + SegmentName = "galleryimages", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; /** - * The properties of the resource. + * The geo-location where the resource lives */ - #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Backward compatibility" - @Azure.ClientGenerator.Core.Legacy.flattenProperty - properties: GalleryImageProperties; + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface GalleryImageOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - }, - KeysOf> - > {} - @armResourceOperations interface GalleryImages { /** * List gallery images in a given lab. */ - list is GalleryImageOps.List< + list is ArmResourceListByParent< GalleryImage, Parameters = { /** diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Lab.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Lab.tsp index 918360ac2017..74650090af81 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Lab.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Lab.tsp @@ -13,20 +13,21 @@ namespace Microsoft.DevTestLab; /** * A lab. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model Lab extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("labs") - name: string; - - properties: LabProperties; +model Lab is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Lab, + KeyName = "labName", + SegmentName = "labs", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; + + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } @armResourceOperations @@ -57,6 +58,7 @@ interface Labs { /** * Allows modifying tags of labs. All other properties will be ignored. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) update is ArmCustomPatchSync; @@ -138,7 +140,15 @@ interface Labs { /** * Claim a random claimable virtual machine in the lab. This operation can take a while to complete. */ - claimAnyVm is ArmResourceActionAsync; + claimAnyVm is ArmResourceActionAsync< + Lab, + void, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; /** * Create virtual machines in a lab. This operation can take a while to complete. @@ -146,7 +156,11 @@ interface Labs { createEnvironment is ArmResourceActionAsync< Lab, LabVirtualMachineCreationParameter, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** @@ -155,7 +169,11 @@ interface Labs { exportResourceUsage is ArmResourceActionAsync< Lab, ExportResourceUsageParameters, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** @@ -173,7 +191,11 @@ interface Labs { importVirtualMachine is ArmResourceActionAsync< Lab, ImportLabVirtualMachineRequest, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/LabCost.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/LabCost.tsp index c4cd4d69b568..2aafbf07b495 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/LabCost.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/LabCost.tsp @@ -13,42 +13,24 @@ namespace Microsoft.DevTestLab; /** * A cost item. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model LabCost extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("costs") - name: string; +@parentResource(Lab) +model LabCost is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = LabCost, + KeyName = "costName", + SegmentName = "costs", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: LabCostProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface LabCostOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - }, - KeysOf> - > {} - #suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" "For backward compatibility" @armResourceOperations interface Costs { @@ -57,7 +39,7 @@ interface Costs { */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" @operationId("Costs_Get") - get is LabCostOps.Read< + get is ArmResourceRead< LabCost, Parameters = { /** @@ -73,7 +55,7 @@ interface Costs { */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" @operationId("Costs_CreateOrUpdate") - createOrUpdate is LabCostOps.CreateOrUpdateSync; + createOrUpdate is ArmResourceCreateOrReplaceSync; } @@doc(LabCost.name, "The name of the cost."); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/LabVirtualMachine.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/LabVirtualMachine.tsp index bf34ba16d1f3..4b881bba8932 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/LabVirtualMachine.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/LabVirtualMachine.tsp @@ -13,49 +13,32 @@ namespace Microsoft.DevTestLab; /** * A virtual machine. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model LabVirtualMachine extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("virtualmachines") - name: string; +@parentResource(Lab) +model LabVirtualMachine + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = LabVirtualMachine, + KeyName = "virtualMachineName", + SegmentName = "virtualmachines", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: LabVirtualMachineProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface LabVirtualMachineOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - }, - KeysOf> - > {} - @armResourceOperations interface VirtualMachines { /** * Get virtual machine. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - get is LabVirtualMachineOps.Read< + get is ArmResourceRead< LabVirtualMachine, Parameters = { /** @@ -70,7 +53,7 @@ interface VirtualMachines { * Create or replace an existing virtual machine. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - createOrUpdate is LabVirtualMachineOps.CreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< LabVirtualMachine, LroHeaders = ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader @@ -82,7 +65,7 @@ interface VirtualMachines { #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is LabVirtualMachineOps.CustomPatchSync< + update is ArmCustomPatchSync< LabVirtualMachine, PatchModel = LabVirtualMachineFragment >; @@ -92,7 +75,7 @@ interface VirtualMachines { */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" - delete is LabVirtualMachineOps.DeleteWithoutOkAsync< + delete is ArmResourceDeleteWithoutOkAsync< LabVirtualMachine, Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse >; @@ -101,7 +84,7 @@ interface VirtualMachines { * List virtual machines in a given lab. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - list is LabVirtualMachineOps.List< + list is ArmResourceListByParent< LabVirtualMachine, Parameters = { /** @@ -135,47 +118,63 @@ interface VirtualMachines { * Attach a new or existing data disk to virtual machine. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - addDataDisk is LabVirtualMachineOps.ActionAsync< + addDataDisk is ArmResourceActionAsync< LabVirtualMachine, DataDiskProperties, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** * Apply artifacts to virtual machine. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - applyArtifacts is LabVirtualMachineOps.ActionAsync< + applyArtifacts is ArmResourceActionAsync< LabVirtualMachine, ApplyArtifactsRequest, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** * Take ownership of an existing virtual machine This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - claim is LabVirtualMachineOps.ActionAsync< + claim is ArmResourceActionAsync< LabVirtualMachine, void, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** * Detach the specified disk from the virtual machine. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - detachDataDisk is LabVirtualMachineOps.ActionAsync< + detachDataDisk is ArmResourceActionAsync< LabVirtualMachine, DetachDataDiskProperties, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** * Gets a string that represents the contents of the RDP file for the virtual machine */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - getRdpFileContents is LabVirtualMachineOps.ActionSync< + getRdpFileContents is ArmResourceActionSync< LabVirtualMachine, void, ArmResponse @@ -185,7 +184,7 @@ interface VirtualMachines { * Lists the applicable start/stop schedules, if any. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - listApplicableSchedules is LabVirtualMachineOps.ActionSync< + listApplicableSchedules is ArmResourceActionSync< LabVirtualMachine, void, ArmResponse @@ -195,66 +194,98 @@ interface VirtualMachines { * Redeploy a virtual machine This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - redeploy is LabVirtualMachineOps.ActionAsync< + redeploy is ArmResourceActionAsync< LabVirtualMachine, void, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** * Resize Virtual Machine. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - resize is LabVirtualMachineOps.ActionAsync< + resize is ArmResourceActionAsync< LabVirtualMachine, ResizeLabVirtualMachineProperties, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** * Restart a virtual machine. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - restart is LabVirtualMachineOps.ActionAsync< + restart is ArmResourceActionAsync< LabVirtualMachine, void, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** * Start a virtual machine. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - start is LabVirtualMachineOps.ActionAsync< + start is ArmResourceActionAsync< LabVirtualMachine, void, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** * Stop a virtual machine This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - stop is LabVirtualMachineOps.ActionAsync; + stop is ArmResourceActionAsync< + LabVirtualMachine, + void, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; /** * Transfers all data disks attached to the virtual machine to be owned by the current user. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - transferDisks is LabVirtualMachineOps.ActionAsync< + transferDisks is ArmResourceActionAsync< LabVirtualMachine, void, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; /** * Release ownership of an existing virtual machine This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - unClaim is LabVirtualMachineOps.ActionAsync< + unClaim is ArmResourceActionAsync< LabVirtualMachine, void, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; } diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/NotificationChannel.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/NotificationChannel.tsp index 0bc468ae255c..d15c59e89847 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/NotificationChannel.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/NotificationChannel.tsp @@ -12,48 +12,31 @@ namespace Microsoft.DevTestLab; /** * A notification. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model NotificationChannel extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("notificationchannels") - name: string; +@parentResource(Lab) +model NotificationChannel + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = NotificationChannel, + KeyName = "notificationChannelName", + SegmentName = "notificationchannels", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: NotificationChannelProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface NotificationChannelOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - }, - KeysOf> - > {} - @armResourceOperations interface NotificationChannels { /** * Get notification channel. */ - get is NotificationChannelOps.Read< + get is ArmResourceRead< NotificationChannel, Parameters = { /** @@ -67,14 +50,14 @@ interface NotificationChannels { /** * Create or replace an existing notification channel. */ - createOrUpdate is NotificationChannelOps.CreateOrUpdateSync; + createOrUpdate is ArmResourceCreateOrReplaceSync; /** * Allows modifying tags of notification channels. All other properties will be ignored. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is NotificationChannelOps.CustomPatchSync< + update is ArmCustomPatchSync< NotificationChannel, PatchModel = NotificationChannelFragment >; @@ -82,12 +65,12 @@ interface NotificationChannels { /** * Delete notification channel. */ - delete is NotificationChannelOps.DeleteSync; + delete is ArmResourceDeleteSync; /** * List notification channels in a given lab. */ - list is NotificationChannelOps.List< + list is ArmResourceListByParent< NotificationChannel, Parameters = { /** @@ -120,7 +103,7 @@ interface NotificationChannels { /** * Send notification to provided channel. */ - notify is NotificationChannelOps.ActionSync< + notify is ArmResourceActionSync< NotificationChannel, NotifyParameters, OkResponse diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Policy.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Policy.tsp index eda43cfcfd83..84cbf445563d 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Policy.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Policy.tsp @@ -13,20 +13,21 @@ namespace Microsoft.DevTestLab; /** * A Policy. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model Policy extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("policies") - name: string; +model Policy is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Policy, + KeyName = "policyName", + SegmentName = "policies", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: PolicyProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } @armResourceOperations @@ -45,7 +46,7 @@ interface PolicyOps @path @segment("policysets") policySetName: string, }, KeysOf >; diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Schedule.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Schedule.tsp index 83ac0a4817f5..a8661ff27a2f 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Schedule.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Schedule.tsp @@ -10,27 +10,30 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.DevTestLab; + /** * A schedule. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model Schedule extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("schedules") - name: string; - - properties: ScheduleProperties; +model Schedule + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Schedule, + KeyName = "scheduleName", + SegmentName = "schedules", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; + + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } @armResourceOperations -interface ScheduleOps +interface GlobalScheduleOps extends Azure.ResourceManager.Legacy.LegacyOperations< { ...ApiVersionParameter, @@ -52,7 +55,7 @@ interface GlobalSchedules { * Get schedule. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - get is ScheduleOps.Read< + get is GlobalScheduleOps.Read< Schedule, Parameters = { /** @@ -67,7 +70,7 @@ interface GlobalSchedules { * Create or replace an existing schedule. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - createOrUpdate is ScheduleOps.CreateOrUpdateSync; + createOrUpdate is GlobalScheduleOps.CreateOrUpdateSync; /** * Allows modifying tags of schedules. All other properties will be ignored. @@ -75,7 +78,7 @@ interface GlobalSchedules { #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is ScheduleOps.CustomPatchSync< + update is GlobalScheduleOps.CustomPatchSync< Schedule, PatchModel = ScheduleFragment >; @@ -84,13 +87,13 @@ interface GlobalSchedules { * Delete schedule. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - delete is ScheduleOps.DeleteSync; + delete is GlobalScheduleOps.DeleteSync; /** * List schedules in a resource group. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - listByResourceGroup is ScheduleOps.List< + listByResourceGroup is GlobalScheduleOps.List< Schedule, Parameters = { /** @@ -158,20 +161,32 @@ interface GlobalSchedules { * Execute a schedule. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - execute is ScheduleOps.ActionAsync; + execute is GlobalScheduleOps.ActionAsync< + Schedule, + void, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; /** * Updates a schedule's target resource Id. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - retarget is ScheduleOps.ActionAsync< + retarget is GlobalScheduleOps.ActionAsync< Schedule, RetargetScheduleProperties, - OkResponse + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader >; } @armResourceOperations -interface ScheduleOperationGroupOps +interface ScheduleOps extends Azure.ResourceManager.Legacy.LegacyOperations< { ...ApiVersionParameter, @@ -196,7 +211,7 @@ interface Schedules { * Get schedule. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - get is ScheduleOperationGroupOps.Read< + get is ScheduleOps.Read< Schedule, Parameters = { /** @@ -211,7 +226,7 @@ interface Schedules { * Create or replace an existing schedule. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - createOrUpdate is ScheduleOperationGroupOps.CreateOrUpdateSync; + createOrUpdate is ScheduleOps.CreateOrUpdateSync; /** * Allows modifying tags of schedules. All other properties will be ignored. @@ -219,7 +234,7 @@ interface Schedules { #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is ScheduleOperationGroupOps.CustomPatchSync< + update is ScheduleOps.CustomPatchSync< Schedule, PatchModel = ScheduleFragment >; @@ -228,13 +243,13 @@ interface Schedules { * Delete schedule. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - delete is ScheduleOperationGroupOps.DeleteSync; + delete is ScheduleOps.DeleteSync; /** * List schedules in a given lab. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" - list is ScheduleOperationGroupOps.List< + list is ScheduleOps.List< Schedule, Parameters = { /** @@ -267,13 +282,21 @@ interface Schedules { /** * Execute a schedule. This operation can take a while to complete. */ - execute is ScheduleOperationGroupOps.ActionAsync; + execute is ScheduleOps.ActionAsync< + Schedule, + void, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; /** * Lists all applicable schedules */ @list - listApplicable is ScheduleOperationGroupOps.ActionSync< + listApplicable is ScheduleOps.ActionSync< Schedule, void, ArmResponse @@ -377,7 +400,15 @@ interface ServiceFabricSchedules { /** * Execute a schedule. This operation can take a while to complete. */ - execute is ServiceFabricScheduleOps.ActionAsync; + execute is ServiceFabricScheduleOps.ActionAsync< + Schedule, + void, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; } @armResourceOperations interface VirtualMachineScheduleOps @@ -474,13 +505,21 @@ interface VirtualMachineSchedules { /** * Execute a schedule. This operation can take a while to complete. */ - execute is VirtualMachineScheduleOps.ActionAsync; + execute is VirtualMachineScheduleOps.ActionAsync< + Schedule, + void, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; } @@doc(Schedule.name, "The name of the schedule."); @@doc(Schedule.properties, "The properties of the resource."); -@@doc(Schedule.location, "The location of the resource."); -@@doc(Schedule.tags, "The tags of the resource."); +//@@doc(Schedule.location, "The location of the resource."); +//@@doc(Schedule.tags, "The tags of the resource."); @@doc(GlobalSchedules.createOrUpdate::parameters.resource, "A schedule."); @@doc(GlobalSchedules.update::parameters.properties, "A schedule."); @@doc(GlobalSchedules.retarget::parameters.body, diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Secret.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Secret.tsp index 6274968ab71c..e97e29b17b06 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Secret.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/Secret.tsp @@ -13,51 +13,30 @@ namespace Microsoft.DevTestLab; /** * A secret. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model Secret extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("secrets") - name: string; +@parentResource(User) +model Secret is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Secret, + KeyName = "secretName", + SegmentName = "secrets", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: SecretProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface SecretOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - - /** The name of the user profile. */ - @path @segment("users") userName: string, - }, - KeysOf> - > {} - @armResourceOperations interface Secrets { /** * Get secret. */ - get is SecretOps.Read< + get is ArmResourceRead< Secret, Parameters = { /** @@ -71,7 +50,7 @@ interface Secrets { /** * Create or replace an existing secret. This operation can take a while to complete. */ - createOrUpdate is SecretOps.CreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< Secret, LroHeaders = ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader @@ -82,17 +61,17 @@ interface Secrets { */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is SecretOps.CustomPatchSync; + update is ArmCustomPatchSync; /** * Delete secret. */ - delete is SecretOps.DeleteSync; + delete is ArmResourceDeleteSync; /** * List secrets in a given user profile. */ - list is SecretOps.List< + list is ArmResourceListByParent< Secret, Parameters = { /** diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ServiceFabric.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ServiceFabric.tsp index 61bb64f54ef0..bb884b7ad4aa 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ServiceFabric.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ServiceFabric.tsp @@ -12,51 +12,31 @@ namespace Microsoft.DevTestLab; /** * A Service Fabric. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model ServiceFabric extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("servicefabrics") - name: string; +@parentResource(User) +model ServiceFabric + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = ServiceFabric, + KeyName = "serviceFabricName", + SegmentName = "servicefabrics", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: ServiceFabricProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface ServiceFabricOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - - /** The name of the user profile. */ - @path @segment("users") userName: string, - }, - KeysOf> - > {} - @armResourceOperations interface ServiceFabrics { /** * Get service fabric. */ - get is ServiceFabricOps.Read< + get is ArmResourceRead< ServiceFabric, Parameters = { /** @@ -70,7 +50,7 @@ interface ServiceFabrics { /** * Create or replace an existing service fabric. This operation can take a while to complete. */ - createOrUpdate is ServiceFabricOps.CreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< ServiceFabric, LroHeaders = ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader @@ -81,7 +61,7 @@ interface ServiceFabrics { */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is ServiceFabricOps.CustomPatchSync< + update is ArmCustomPatchSync< ServiceFabric, PatchModel = ServiceFabricFragment >; @@ -90,7 +70,7 @@ interface ServiceFabrics { * Delete service fabric. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" - delete is ServiceFabricOps.DeleteWithoutOkAsync< + delete is ArmResourceDeleteWithoutOkAsync< ServiceFabric, Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse >; @@ -98,7 +78,7 @@ interface ServiceFabrics { /** * List service fabrics in a given user profile. */ - list is ServiceFabricOps.List< + list is ArmResourceListByParent< ServiceFabric, Parameters = { /** @@ -131,7 +111,7 @@ interface ServiceFabrics { /** * Lists the applicable start/stop schedules, if any. */ - listApplicableSchedules is ServiceFabricOps.ActionSync< + listApplicableSchedules is ArmResourceActionSync< ServiceFabric, void, ArmResponse @@ -140,12 +120,28 @@ interface ServiceFabrics { /** * Start a service fabric. This operation can take a while to complete. */ - start is ServiceFabricOps.ActionAsync; + start is ArmResourceActionAsync< + ServiceFabric, + void, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; /** * Stop a service fabric This operation can take a while to complete. */ - stop is ServiceFabricOps.ActionAsync; + stop is ArmResourceActionAsync< + ServiceFabric, + void, + { + @body body: void; + }, + LroHeaders = Azure.Core.Foundations.RetryAfterHeader & + ArmLroLocationHeader + >; } @@doc(ServiceFabric.name, "The name of the service fabric."); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ServiceRunner.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ServiceRunner.tsp index 5d3d54bcc51a..1332e5fc5e08 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ServiceRunner.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/ServiceRunner.tsp @@ -13,20 +13,22 @@ namespace Microsoft.DevTestLab; /** * A container for a managed identity to execute DevTest lab services. */ -#suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model ServiceRunner extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("servicerunners") - name: string; +@parentResource(Lab) +model ServiceRunner is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = ServiceRunner, + KeyName = "serviceRunnerName", + SegmentName = "servicerunners", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; + + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; /** * The identity of the resource. @@ -35,42 +37,22 @@ model ServiceRunner extends Resource { identity?: IdentityProperties; } -@armResourceOperations -interface ServiceRunnerOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - }, - KeysOf> - > {} - @armResourceOperations interface ServiceRunners { /** * Get service runner. */ - get is ServiceRunnerOps.Read; + get is ArmResourceRead; /** * Create or replace an existing service runner. */ - createOrUpdate is ServiceRunnerOps.CreateOrUpdateSync; + createOrUpdate is ArmResourceCreateOrReplaceSync; /** * Delete service runner. */ - delete is ServiceRunnerOps.DeleteSync; + delete is ArmResourceDeleteSync; } @@doc(ServiceRunner.name, "The name of the service runner."); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/User.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/User.tsp index 15bac15e7739..1f85186801c1 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/User.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/User.tsp @@ -11,50 +11,32 @@ using TypeSpec.OpenAPI; namespace Microsoft.DevTestLab; /** - * Profile of a lab user. + * A user profile. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model User extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("users") - name: string; +@parentResource(Lab) +model User is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = User, + KeyName = "userName", + SegmentName = "users", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: UserProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface UserOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - }, - KeysOf> - > {} - @armResourceOperations interface Users { /** * Get user profile. */ - get is UserOps.Read< + get is ArmResourceRead< User, Parameters = { /** @@ -68,7 +50,7 @@ interface Users { /** * Create or replace an existing user profile. This operation can take a while to complete. */ - createOrUpdate is UserOps.CreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< User, LroHeaders = ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader @@ -79,13 +61,13 @@ interface Users { */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is UserOps.CustomPatchSync; + update is ArmCustomPatchSync; /** * Delete user profile. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" - delete is UserOps.DeleteWithoutOkAsync< + delete is ArmResourceDeleteWithoutOkAsync< User, Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse >; @@ -93,7 +75,7 @@ interface Users { /** * List user profiles in a given lab. */ - list is UserOps.List< + list is ArmResourceListByParent< User, Parameters = { /** diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/VirtualNetwork.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/VirtualNetwork.tsp index eecd7befdc96..bb48d5d118bd 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/VirtualNetwork.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/VirtualNetwork.tsp @@ -13,48 +13,31 @@ namespace Microsoft.DevTestLab; /** * A virtual network. */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -@Azure.ResourceManager.Legacy.customAzureResource -@Http.Private.includeInapplicableMetadataInPayload(false) -model VirtualNetwork extends Resource { - @visibility(Lifecycle.Read) - @path - @key - @segment("virtualnetworks") - name: string; +@parentResource(Lab) +model VirtualNetwork + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = VirtualNetwork, + KeyName = "virtualnetworkName", + SegmentName = "virtualnetworks", + NamePattern = "" + >; + ...Azure.ResourceManager.Foundations.ArmTagsProperty; - properties: VirtualNetworkProperties; + /** + * The geo-location where the resource lives + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Day 0 Property" + @visibility(Lifecycle.Create, Lifecycle.Read) + location?: string; } -@armResourceOperations -interface VirtualNetworkOps - extends Azure.ResourceManager.Legacy.LegacyOperations< - { - ...ApiVersionParameter, - ...SubscriptionIdParameter, - ...ResourceGroupParameter, - ...Azure.ResourceManager.Legacy.Provider, - - /** The name of the lab. */ - @path @segment("labs") labName: string, - }, - KeysOf> - > {} - @armResourceOperations interface VirtualNetworks { /** * Get virtual network. */ - get is VirtualNetworkOps.Read< + get is ArmResourceRead< VirtualNetwork, Parameters = { /** @@ -68,7 +51,7 @@ interface VirtualNetworks { /** * Create or replace an existing virtual network. This operation can take a while to complete. */ - createOrUpdate is VirtualNetworkOps.CreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< VirtualNetwork, LroHeaders = ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader @@ -79,7 +62,7 @@ interface VirtualNetworks { */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "Already contains tags" @patch(#{ implicitOptionality: false }) - update is VirtualNetworkOps.CustomPatchSync< + update is ArmCustomPatchSync< VirtualNetwork, PatchModel = VirtualNetworkFragment >; @@ -88,7 +71,7 @@ interface VirtualNetworks { * Delete virtual network. This operation can take a while to complete. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" - delete is VirtualNetworkOps.DeleteWithoutOkAsync< + delete is ArmResourceDeleteWithoutOkAsync< VirtualNetwork, Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse >; @@ -96,7 +79,7 @@ interface VirtualNetworks { /** * List virtual networks in a given lab. */ - list is VirtualNetworkOps.List< + list is ArmResourceListByParent< VirtualNetwork, Parameters = { /** diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/back-compatible.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/back-compatible.tsp index 270a20b3ad2a..94a029490ffc 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/back-compatible.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/back-compatible.tsp @@ -186,3 +186,386 @@ using Microsoft.DevTestLab; #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(VirtualNetwork.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualNetworks.get, + "virtualnetworkName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualNetworks.createOrUpdate, + "virtualnetworkName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualNetworks.update, + "virtualnetworkName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualNetworks.delete, + "virtualnetworkName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Users.get, + "userName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Users.createOrUpdate, + "userName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Users.update, + "userName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Users.delete, + "userName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceRunners.get, + "serviceRunnerName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceRunners.createOrUpdate, + "serviceRunnerName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceRunners.delete, + "serviceRunnerName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceFabrics.get, + "serviceFabricName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceFabrics.createOrUpdate, + "serviceFabricName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceFabrics.update, + "serviceFabricName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceFabrics.delete, + "serviceFabricName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceFabrics.listApplicableSchedules, + "serviceFabricName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceFabrics.start, + "serviceFabricName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ServiceFabrics.stop, + "serviceFabricName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Secrets.get, + "secretName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Secrets.createOrUpdate, + "secretName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Secrets.update, + "secretName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Secrets.delete, + "secretName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(NotificationChannels.get, + "notificationChannelName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(NotificationChannels.createOrUpdate, + "notificationChannelName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(NotificationChannels.update, + "notificationChannelName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(NotificationChannels.delete, + "notificationChannelName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(NotificationChannels.notify, + "notificationChannelName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.get, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.createOrUpdate, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.update, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.delete, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.addDataDisk, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.applyArtifacts, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.claim, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.detachDataDisk, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.getRdpFileContents, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.listApplicableSchedules, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.redeploy, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.resize, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.restart, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.start, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.stop, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.transferDisks, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(VirtualMachines.unClaim, + "virtualMachineName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Costs.get, + "costName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Costs.createOrUpdate, + "costName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Formulas.get, + "formulaName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Formulas.createOrUpdate, + "formulaName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Formulas.update, + "formulaName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Formulas.delete, + "formulaName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Environments.get, + "environmentName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Environments.createOrUpdate, + "environmentName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Environments.update, + "environmentName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Environments.delete, + "environmentName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Disks.get, + "diskName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Disks.createOrUpdate, + "diskName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Disks.update, + "diskName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Disks.delete, + "diskName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Disks.attach, + "diskName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Disks.detach, + "diskName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ArtifactSources.get, + "artifactSourceName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ArtifactSources.createOrUpdate, + "artifactSourceName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ArtifactSources.update, + "artifactSourceName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ArtifactSources.delete, + "artifactSourceName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Artifacts.get, + "artifactName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Artifacts.generateArmTemplate, + "artifactName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(ArmTemplates.get, + "armTemplateName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.get, "labName", "name"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.createOrUpdate, + "labName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.update, + "labName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.delete, + "labName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.claimAnyVm, + "labName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.createEnvironment, + "labName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.exportResourceUsage, + "labName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.generateUploadUri, + "labName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.importVirtualMachine, + "labName", + "name" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ResourceManager.Legacy.renamePathParameter(Labs.listVhds, + "labName", + "name" +); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/client.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/client.tsp new file mode 100644 index 000000000000..29eb420d3055 --- /dev/null +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/client.tsp @@ -0,0 +1,503 @@ +import "@azure-tools/typespec-client-generator-core"; +import "./main.tsp"; + +using Azure.Core; +using Azure.ClientGenerator.Core; +using Microsoft.DevTestLab; + +@@scope(Operations.get, "!csharp"); +@@scope(ProviderOperations.list, "!csharp"); + +@@alternateType(Azure.ResourceManager.CommonTypes.Resource.id, + armResourceIdentifier, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ArmTemplate, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(ArmTemplate, "DevTestLabArmTemplate", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Artifact, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(Artifact, "DevTestLabArtifact", "csharp"); +@@clientName(ArtifactProperties.targetOsType, "TargetOSType", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ArtifactSource, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(ArtifactSource, "DevTestLabArtifactSource", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(CustomImage, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(CustomImage, "DevTestLabCustomImage", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Disk, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(Disk, "DevTestLabDisk", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(DtlEnvironment, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(DtlEnvironment, "DevTestLabEnvironment", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Formula, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(Formula, "DevTestLabFormula", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Lab, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(Lab, "DevTestLab", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(LabCost, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(LabCost, "DevTestLabCost", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Schedule, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(Schedule, "DevTestLabSchedule", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(LabVirtualMachine, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(LabVirtualMachine, "DevTestLabVm", "csharp"); +@@clientName(LabVirtualMachineProperties.virtualMachineCreationSource, + "VmCreationSource", + "csharp" +); +@@alternateType(LabVirtualMachineProperties.computeId, + armResourceIdentifier, + "csharp" +); +@@alternateType(LabVirtualMachineProperties.labVirtualNetworkId, + armResourceIdentifier, + "csharp" +); +@@alternateType(LabVirtualMachineProperties.environmentId, + armResourceIdentifier, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(NotificationChannel, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(NotificationChannel, "DevTestLabNotificationChannel", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Policy, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(Policy, "DevTestLabPolicy", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(Secret, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(Secret, "DevTestLabSecret", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ServiceFabric, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(ServiceFabric, "DevTestLabServiceFabric", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ServiceRunner, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(ServiceRunner, "DevTestLabServiceRunner", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(User, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(User, "DevTestLabUser", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(VirtualNetwork, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(VirtualNetwork, "DevTestLabVirtualNetwork", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(ApplicableSchedule, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@usage(ApplicableSchedule, Usage.input, "csharp"); +@@clientName(ApplicableSchedule, "DevTestLabApplicableSchedule", "csharp"); +@@alternateType(ApplicableSchedule.location, azureLocation, "csharp"); +@@clientName(ApplyArtifactsRequest, + "DevTestLabVmApplyArtifactsContent", + "csharp" +); +@@clientName(ArmTemplateInfo, "DevTestLabArmTemplateInfo", "csharp"); +@@clientName(ArmTemplateParameterProperties, + "DevTestLabArmTemplateParameter", + "csharp" +); +@@clientName(ArtifactDeploymentStatusProperties, + "DevTestLabArtifactDeploymentStatus", + "csharp" +); +@@clientName(ArtifactInstallProperties, + "DevTestLabArtifactInstallInfo", + "csharp" +); +@@clientName(ArtifactParameterProperties, + "DevTestLabArtifactParameter", + "csharp" +); +@@clientName(AttachDiskProperties, "DevTestLabDiskAttachContent", "csharp"); +@@alternateType(AttachDiskProperties.leasedByLabVmId, + armResourceIdentifier, + "csharp" +); +@@clientName(AttachNewDataDiskOptions, "AttachNewDataDiskDetails", "csharp"); +@@clientName(TargetCostProperties, "DevTestLabTargetCost", "csharp"); +@@clientName(CostThresholdProperties, "DevTestLabCostThreshold", "csharp"); +@@clientName(CostThresholdStatus, "DevTestLabCostThresholdStatus", "csharp"); +@@clientName(CostType, "DevTestLabCostType", "csharp"); +@@clientName(LabCostDetailsProperties, "DevTestLabCostDetails", "csharp"); +@@clientName(LabCostDetailsProperties.date, "On", "csharp"); +@@clientName(CustomImageOsType, "DevTestLabCustomImageOSType", "csharp"); +@@clientName(CustomImagePropertiesCustom, "DevTestLabCustomImageVhd", "csharp"); +@@clientName(CustomImagePropertiesFromVm, "DevTestLabCustomImageVm", "csharp"); +@@clientName(CustomImagePropertiesFromPlan, + "DevTestLabCustomImagePlan", + "csharp" +); +@@clientName(DataDiskStorageTypeInfo, + "DevTestLabDataDiskStorageTypeInfo", + "csharp" +); +@@clientName(StorageType, "DevTestLabStorageType", "csharp"); +@@clientName(StorageType.StandardSSD, "StandardSsd", "csharp"); +@@clientName(DataDiskProperties, "DevTestLabDataDiskProperties", "csharp"); +@@alternateType(DataDiskProperties.existingLabDiskId, + armResourceIdentifier, + "csharp" +); +@@clientName(DetachDataDiskProperties, + "DevTestLabVmDetachDataDiskContent", + "csharp" +); +@@clientName(DetachDiskProperties, "DevTestLabDiskDetachContent", "csharp"); +@@alternateType(DetachDiskProperties.leasedByLabVmId, + armResourceIdentifier, + "csharp" +); +@@clientName(UpdateResource, "DevTestLabResourcePatch", "csharp"); +@@clientName(EnableStatus, "DevTestLabEnableStatus", "csharp"); +@@clientName(EnvironmentDeploymentProperties, + "DevTestLabEnvironmentDeployment", + "csharp" +); +@@alternateType(EnvironmentDeploymentProperties.armTemplateId, + armResourceIdentifier, + "csharp" +); +@@clientName(EnvironmentPermission, + "DevTestLabEnvironmentPermission", + "csharp" +); +@@clientName(EvaluatePoliciesRequest, + "DevTestLabEvaluatePoliciesContent", + "csharp" +); +@@clientName(EvaluatePoliciesProperties, "DevTestLabEvaluatePolicy", "csharp"); +@@clientName(EvaluatePoliciesResponse, + "DevTestLabEvaluatePoliciesResult", + "csharp" +); +@@clientName(PolicySetResult, "DevTestLabPolicySetResult", "csharp"); +@@clientName(Event, "DevTestLabNotificationChannelEvent", "csharp"); +@@clientName(NotificationChannelEventType, + "DevTestLabNotificationChannelEventType", + "csharp" +); +@@clientName(ExportResourceUsageParameters, + "DevTestLabExportResourceUsageContent", + "csharp" +); +@@alternateType(ExportResourceUsageParameters.blobStorageAbsoluteSasUri, + url, + "csharp" +); +@@clientName(ExternalSubnet, "DevTestLabExternalSubnet", "csharp"); +@@alternateType(ExternalSubnet.id, armResourceIdentifier, "csharp"); +@@clientName(SubnetOverride, "DevTestLabSubnetOverride", "csharp"); +@@clientName(SubnetOverride.usePublicIpAddressPermission, + "UsePublicIPAddressPermission", + "csharp" +); +@@clientName(SubnetOverride.sharedPublicIpAddressConfiguration, + "SharedPublicIPAddressConfiguration", + "csharp" +); +@@alternateType(SubnetOverride.resourceId, armResourceIdentifier, "csharp"); +@@clientName(SubnetSharedPublicIpAddressConfiguration, + "SubnetSharedPublicIPAddressConfiguration", + "csharp" +); +@@clientName(FileUploadOptions, "DevTestLabFileUploadOption", "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(GalleryImage, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); +@@clientName(GalleryImage, "DevTestLabGalleryImage", "csharp"); +@@usage(GalleryImage, Usage.input, "csharp"); +@@clientName(GalleryImageProperties.enabled, "IsEnabled", "csharp"); +@@clientName(GalleryImageReference, + "DevTestLabGalleryImageReference", + "csharp" +); +@@clientName(GenerateArmTemplateRequest.virtualMachineName, "VmName", "csharp"); +@@clientName(GenerateArmTemplateRequest, + "DevTestLabArtifactGenerateArmTemplateContent", + "csharp" +); +@@clientName(ParameterInfo, "DevTestLabParameter", "csharp"); +@@clientName(GenerateUploadUriParameter, + "DevTestLabGenerateUploadUriContent", + "csharp" +); +@@clientName(GenerateUploadUriResponse, + "DevTestLabGenerateUploadUriResult", + "csharp" +); +@@alternateType(GenerateUploadUriResponse.uploadUri, url, "csharp"); +@@clientName(HostCachingOptions, "DevTestLabHostCachingOption", "csharp"); +@@clientName(IdentityProperties, "DevTestLabManagedIdentity", "csharp"); +@@clientName(IdentityProperties.type, "ManagedIdentityType", "csharp"); +@@alternateType(IdentityProperties.clientSecretUrl, url, "csharp"); +@@alternateType(IdentityProperties.tenantId, uuid, "csharp"); +@@alternateType(IdentityProperties.type, + Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType, + "csharp" +); +@@alternateType(IdentityProperties.principalId, uuid, "csharp"); +@@clientName(ImportLabVirtualMachineRequest, + "DevTestLabImportVmContent", + "csharp" +); +@@clientName(ImportLabVirtualMachineRequest.sourceVirtualMachineResourceId, + "SourceVmResourceId", + "csharp" +); +@@clientName(ImportLabVirtualMachineRequest.destinationVirtualMachineName, + "DestinationVmName", + "csharp" +); +@@alternateType(ImportLabVirtualMachineRequest.sourceVirtualMachineResourceId, + armResourceIdentifier, + "csharp" +); +@@clientName(InboundNatRule, "DevTestLabInboundNatRule", "csharp"); +@@clientName(LabAnnouncementProperties, "DevTestLabAnnouncement", "csharp"); +@@clientName(LabResourceCostProperties, "DevTestLabResourceCost", "csharp"); +@@clientName(LabResourceCostProperties.resourcename, "ResourceName", "csharp"); +@@clientName(LabResourceCostProperties.resourceUId, + "ResourceUniqueId", + "csharp" +); +@@clientName(LabSupportProperties, "DevTestLabSupport", "csharp"); +@@clientName(LabVirtualMachineCreationParameter, + "DevTestLabVmCreationContent", + "csharp" +); +@@alternateType(LabVirtualMachineCreationParameter.location, + azureLocation, + "csharp" +); +@@clientName(LabVirtualMachineCreationParameterProperties.disallowPublicIpAddress, + "DisallowPublicIPAddress", + "csharp" +); +@@clientName(LinuxOsState, "DevTestLabLinuxOSState", "csharp"); +@@clientName(WindowsOsState, "WindowsOSState", "csharp"); +@@clientName(LinuxOsInfo, "DevTestLabLinuxOSInfo", "csharp"); +@@clientName(LinuxOsInfo.linuxOsState, "LinuxOSState", "csharp"); +@@clientName(WindowsOsInfo, "DevTestLabWindowsOSInfo", "csharp"); +@@clientName(WindowsOsInfo.windowsOsState, "WindowsOSState", "csharp"); +@@clientName(NetworkInterfaceProperties, + "DevTestLabNetworkInterface", + "csharp" +); +@@clientName(NetworkInterfaceProperties.publicIpAddressId, + "PublicIPAddressId", + "csharp" +); +@@clientName(NetworkInterfaceProperties.publicIpAddress, + "PublicIPAddress", + "csharp" +); +@@clientName(NetworkInterfaceProperties.privateIpAddress, + "PrivateIPAddress", + "csharp" +); +@@clientName(NetworkInterfaceProperties.sharedPublicIpAddressConfiguration, + "SharedPublicIPAddressConfiguration", + "csharp" +); +@@alternateType(NetworkInterfaceProperties.virtualNetworkId, + armResourceIdentifier, + "csharp" +); +@@alternateType(NetworkInterfaceProperties.subnetId, + armResourceIdentifier, + "csharp" +); +@@alternateType(NetworkInterfaceProperties.publicIpAddressId, + armResourceIdentifier, + "csharp" +); +@@clientName(NotificationSettings, "DevTestLabNotificationSettings", "csharp"); +@@alternateType(NotificationSettings.webhookUrl, url, "csharp"); +@@clientName(NotifyParameters, + "DevTestLabNotificationChannelNotifyContent", + "csharp" +); +@@clientName(ParametersValueFileInfo, + "DevTestLabParametersValueFileInfo", + "csharp" +); +@@clientName(PolicyEvaluatorType, "DevTestLabPolicyEvaluatorType", "csharp"); +@@clientName(PolicyFactName, "DevTestLabPolicyFactName", "csharp"); +@@clientName(PolicyStatus, "DevTestLabPolicyStatus", "csharp"); +@@clientName(PolicyViolation, "DevTestLabPolicyViolation", "csharp"); +@@clientName(Port, "DevTestLabPort", "csharp"); +@@clientName(TransportProtocol, "DevTestLabTransportProtocol", "csharp"); +@@clientName(PremiumDataDisk, "DevTestLabPremiumDataDisk", "csharp"); +@@clientName(RdpConnection, "DevTestLabRdpConnection", "csharp"); +@@clientName(ReportingCycleType, "DevTestLabReportingCycleType", "csharp"); +@@clientName(ResizeLabVirtualMachineProperties, + "DevTestLabVmResizeContent", + "csharp" +); +@@clientName(RetargetScheduleProperties, + "DevTestLabGlobalScheduleRetargetContent", + "csharp" +); +@@alternateType(RetargetScheduleProperties.currentResourceId, + armResourceIdentifier, + "csharp" +); +@@alternateType(RetargetScheduleProperties.targetResourceId, + armResourceIdentifier, + "csharp" +); +@@clientName(ScheduleCreationParameter, + "DevTestLabScheduleCreationParameter", + "csharp" +); +@@alternateType(ScheduleCreationParameter.location, azureLocation, "csharp"); +@@alternateType(ScheduleCreationParameterProperties.targetResourceId, + armResourceIdentifier, + "csharp" +); +@@clientName(ScheduleFragment, "DevTestLabSchedulePatch", "csharp"); +@@clientName(SourceControlType, "DevTestLabSourceControlType", "csharp"); +@@clientName(Subnet, "DevTestLabSubnet", "csharp"); +@@clientName(Subnet.allowPublicIp, "AllowPublicIP", "csharp"); +@@alternateType(Subnet.resourceId, armResourceIdentifier, "csharp"); +@@clientName(TargetCostStatus, "DevTestLabTargetCostStatus", "csharp"); +@@clientName(UsagePermissionType, "DevTestLabUsagePermissionType", "csharp"); +@@clientName(UserIdentity, "DevTestLabUserIdentity", "csharp"); +@@alternateType(UserIdentity.tenantId, uuid, "csharp"); +@@clientName(UserSecretStore, "DevTestLabUserSecretStore", "csharp"); +@@alternateType(UserSecretStore.keyVaultUri, url, "csharp"); +@@alternateType(UserSecretStore.keyVaultId, armResourceIdentifier, "csharp"); +@@clientName(VirtualMachineCreationSource, + "DevTestLabVmCreationSource", + "csharp" +); +@@clientName(WeekDetails, "DevTestLabWeekDetails", "csharp"); +@@clientName(ArmTemplateProperties.enabled, "IsEnabled", "csharp"); +@@alternateType(ArmTemplateProperties.contents, unknown, "csharp"); +@@clientName(LabAnnouncementProperties.expired, "IsExpired", "csharp"); +@@clientName(CustomImagePropertiesCustom.sysPrep, "IsSysPrepEnabled", "csharp"); +@@alternateType(DiskProperties.managedDiskId, armResourceIdentifier, "csharp"); +@@alternateType(DiskProperties.leasedByLabVmId, + armResourceIdentifier, + "csharp" +); +@@alternateType(LabVirtualMachineCreationParameterProperties.labVirtualNetworkId, + armResourceIdentifier, + "csharp" +); +@@alternateType(DetachDataDiskProperties.existingLabDiskId, + armResourceIdentifier, + "csharp" +); +@@alternateType(LabProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(LabAnnouncementProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(ScheduleProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(ArtifactSourceProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(LabCostProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(CustomImageProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(FormulaProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(NotificationChannelProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(PolicyProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(UserProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(DiskProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(EnvironmentProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(SecretProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(ServiceFabricProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(LabVirtualMachineProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(VirtualNetworkProperties.uniqueIdentifier, uuid, "csharp"); +@@alternateType(ArtifactSourceProperties.uri, url, "csharp"); +@@alternateType(DiskProperties.diskUri, url, "csharp"); +@@alternateType(ComputeDataDisk.diskUri, url, "csharp"); +@@alternateType(NotificationChannelProperties.webHookUrl, url, "csharp"); +@@clientName(Labs.importVirtualMachine, "ImportVm", "csharp"); +@@clientName(PolicySets.evaluatePolicies, "EvaluatePolicies", "csharp"); +@@clientName(GlobalSchedules, "DevTestLabGlobalSchedules", "csharp"); +@@clientName(Schedules, "DevTestLabSchedules", "csharp"); +@@clientName(ServiceFabricSchedules, + "DevTestLabServiceFabricSchedules", + "csharp" +); +@@clientName(VirtualMachineSchedules, "DevTestLabVmSchedules", "csharp"); +@@clientName(LabProperties.publicIpId, "PublicIPId", "csharp"); +@@clientName(CustomImagePropertiesCustom.osType, "OSType", "csharp"); +@@clientName(FormulaProperties.osType, "OSType", "csharp"); +@@clientName(GalleryImageReference.osType, "OSType", "csharp"); +@@clientName(LabVirtualMachineProperties.osType, "OSType", "csharp"); +@@clientName(ComputeVmProperties.osType, "OSType", "csharp"); +@@clientName(LabVirtualMachineCreationParameterProperties.disallowPublicIpAddress, + "DisallowPublicIPAddress", + "csharp" +); +@@clientName(LabVirtualMachineProperties.disallowPublicIpAddress, + "DisallowPublicIPAddress", + "csharp" +); +@@clientName(ComputeVmProperties.osDiskId, "OSDiskId", "csharp"); +@@alternateType(GenerateArmTemplateRequest.location, azureLocation, "csharp"); +@@clientName(LabVhd, "DevTestLabVhd", "csharp"); +@@alternateType(LabVhd.id, url, "csharp"); +@@clientName(GalleryImages.list, "GetGalleryImages", "csharp"); +@@clientName(Labs.listVhds, "GetDevTestLabVhds", "csharp"); +@@alternateType(ArtifactProperties.parameters, unknown, "csharp"); +@@alternateType(ArmTemplateInfo.template, unknown, "csharp"); +@@alternateType(ArmTemplateInfo.parameters, unknown, "csharp"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/models.tsp b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/models.tsp index 64bf9fed348b..41a22c88e8bc 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/models.tsp +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/models.tsp @@ -653,42 +653,6 @@ model LabSupportProperties { markdown?: string; } -/** - * An Azure resource. - */ -#suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard resource" -@extension("x-ms-azure-resource", true) -model Resource { - /** - * The identifier of the resource. - */ - @visibility(Lifecycle.Read) - id?: string; - - /** - * The name of the resource. - */ - @visibility(Lifecycle.Read) - name?: string; - - /** - * The type of the resource. - */ - @visibility(Lifecycle.Read) - type?: string; - - /** - * The location of the resource. - */ - location?: string; - - /** - * The tags of the resource. - */ - #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" - tags?: Record; -} - /** * An Operation Result */ @@ -1017,6 +981,7 @@ model ArtifactList is Azure.Core.Page; * Properties of an artifact. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-core/no-unknown" "JSON schema takes an arbitrary json" model ArtifactProperties { /** * The artifact's title. @@ -1112,6 +1077,7 @@ model ParameterInfo { /** * Information about a generated ARM template. */ +#suppress "@azure-tools/typespec-azure-core/no-unknown" "JSON schema takes an arbitrary json" model ArmTemplateInfo { /** * The template's contents. @@ -2077,6 +2043,7 @@ model GalleryImageList is Azure.Core.Page; /** * Properties of a gallery image. */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "For backward compatibility" model GalleryImageProperties { /** * The author of the gallery image. @@ -2735,7 +2702,18 @@ model ServiceFabricProperties { * Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -model ApplicableSchedule extends Resource { +model ApplicableSchedule extends CommonTypes.Resource { + /** + * The location of the resource. + */ + location?: string; + + /** + * The tags of the resource. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" + tags?: Record; + /** * The properties of the resource. */ diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/stable/2018-09-15/DTL.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/stable/2018-09-15/DTL.json index 21391fee107b..e3f8f3b57c67 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/stable/2018-09-15/DTL.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/stable/2018-09-15/DTL.json @@ -756,7 +756,7 @@ { "name": "name", "in": "path", - "description": "The name of the ArtifactSource", + "description": "The name of the artifact source.", "required": true, "type": "string" }, @@ -814,7 +814,7 @@ { "name": "name", "in": "path", - "description": "The name of the ArtifactSource", + "description": "The name of the artifact source.", "required": true, "type": "string" }, @@ -880,7 +880,7 @@ { "name": "name", "in": "path", - "description": "The name of the ArtifactSource", + "description": "The name of the artifact source.", "required": true, "type": "string" }, @@ -940,7 +940,7 @@ { "name": "name", "in": "path", - "description": "The name of the ArtifactSource", + "description": "The name of the artifact source.", "required": true, "type": "string" } @@ -1085,7 +1085,7 @@ { "name": "name", "in": "path", - "description": "The name of the ArmTemplate", + "description": "The name of the azure resource manager template.", "required": true, "type": "string" }, @@ -1237,7 +1237,7 @@ { "name": "name", "in": "path", - "description": "The name of the Artifact", + "description": "The name of the artifact.", "required": true, "type": "string" }, @@ -1304,7 +1304,7 @@ { "name": "name", "in": "path", - "description": "The name of the Artifact", + "description": "The name of the artifact.", "required": true, "type": "string" }, @@ -1366,7 +1366,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -1427,7 +1427,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabCost", + "description": "The name of the cost.", "required": true, "type": "string" }, @@ -1485,7 +1485,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabCost", + "description": "The name of the cost.", "required": true, "type": "string" }, @@ -1562,7 +1562,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -1980,7 +1980,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -2119,7 +2119,7 @@ { "name": "name", "in": "path", - "description": "The name of the Formula", + "description": "The name of the formula.", "required": true, "type": "string" }, @@ -2177,7 +2177,7 @@ { "name": "name", "in": "path", - "description": "The name of the Formula", + "description": "The name of the formula.", "required": true, "type": "string" }, @@ -2258,7 +2258,7 @@ { "name": "name", "in": "path", - "description": "The name of the Formula", + "description": "The name of the formula.", "required": true, "type": "string" }, @@ -2318,7 +2318,7 @@ { "name": "name", "in": "path", - "description": "The name of the Formula", + "description": "The name of the formula.", "required": true, "type": "string" } @@ -2513,7 +2513,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -2701,7 +2701,7 @@ { "name": "name", "in": "path", - "description": "The name of the NotificationChannel", + "description": "The name of the notification channel.", "required": true, "type": "string" }, @@ -2759,7 +2759,7 @@ { "name": "name", "in": "path", - "description": "The name of the NotificationChannel", + "description": "The name of the notification channel.", "required": true, "type": "string" }, @@ -2825,7 +2825,7 @@ { "name": "name", "in": "path", - "description": "The name of the NotificationChannel", + "description": "The name of the notification channel.", "required": true, "type": "string" }, @@ -2885,7 +2885,7 @@ { "name": "name", "in": "path", - "description": "The name of the NotificationChannel", + "description": "The name of the notification channel.", "required": true, "type": "string" } @@ -2938,7 +2938,7 @@ { "name": "name", "in": "path", - "description": "The name of the NotificationChannel", + "description": "The name of the notification channel.", "required": true, "type": "string" }, @@ -3151,7 +3151,7 @@ { "name": "name", "in": "path", - "description": "The name of the Schedule", + "description": "The name of the Policy", "required": true, "type": "string" }, @@ -3216,7 +3216,7 @@ { "name": "name", "in": "path", - "description": "The name of the Schedule", + "description": "The name of the Policy", "required": true, "type": "string" }, @@ -3289,7 +3289,7 @@ { "name": "name", "in": "path", - "description": "The name of the Schedule", + "description": "The name of the Policy", "required": true, "type": "string" }, @@ -3356,7 +3356,7 @@ { "name": "name", "in": "path", - "description": "The name of the Schedule", + "description": "The name of the Policy", "required": true, "type": "string" } @@ -3731,7 +3731,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -3848,7 +3848,7 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceRunner", + "description": "The name of the service runner.", "required": true, "type": "string" } @@ -3899,7 +3899,7 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceRunner", + "description": "The name of the service runner.", "required": true, "type": "string" }, @@ -3965,7 +3965,7 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceRunner", + "description": "The name of the service runner.", "required": true, "type": "string" } @@ -4096,7 +4096,7 @@ { "name": "name", "in": "path", - "description": "The name of the User", + "description": "The name of the user profile.", "required": true, "type": "string" }, @@ -4154,7 +4154,7 @@ { "name": "name", "in": "path", - "description": "The name of the User", + "description": "The name of the user profile.", "required": true, "type": "string" }, @@ -4235,7 +4235,7 @@ { "name": "name", "in": "path", - "description": "The name of the User", + "description": "The name of the user profile.", "required": true, "type": "string" }, @@ -4295,7 +4295,7 @@ { "name": "name", "in": "path", - "description": "The name of the User", + "description": "The name of the user profile.", "required": true, "type": "string" } @@ -4458,7 +4458,7 @@ { "name": "name", "in": "path", - "description": "The name of the Disk", + "description": "The name of the disk.", "required": true, "type": "string" }, @@ -4523,7 +4523,7 @@ { "name": "name", "in": "path", - "description": "The name of the Disk", + "description": "The name of the disk.", "required": true, "type": "string" }, @@ -4611,7 +4611,7 @@ { "name": "name", "in": "path", - "description": "The name of the Disk", + "description": "The name of the disk.", "required": true, "type": "string" }, @@ -4678,7 +4678,7 @@ { "name": "name", "in": "path", - "description": "The name of the Disk", + "description": "The name of the disk.", "required": true, "type": "string" } @@ -4756,7 +4756,7 @@ { "name": "name", "in": "path", - "description": "The name of the Disk", + "description": "The name of the disk.", "required": true, "type": "string" }, @@ -4772,7 +4772,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -4840,7 +4840,7 @@ { "name": "name", "in": "path", - "description": "The name of the Disk", + "description": "The name of the disk.", "required": true, "type": "string" }, @@ -4856,7 +4856,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -5009,7 +5009,7 @@ { "name": "name", "in": "path", - "description": "The name of the DtlEnvironment", + "description": "The name of the environment.", "required": true, "type": "string" }, @@ -5074,7 +5074,7 @@ { "name": "name", "in": "path", - "description": "The name of the DtlEnvironment", + "description": "The name of the environment.", "required": true, "type": "string" }, @@ -5162,7 +5162,7 @@ { "name": "name", "in": "path", - "description": "The name of the DtlEnvironment", + "description": "The name of the environment.", "required": true, "type": "string" }, @@ -5229,7 +5229,7 @@ { "name": "name", "in": "path", - "description": "The name of the DtlEnvironment", + "description": "The name of the environment.", "required": true, "type": "string" } @@ -5392,7 +5392,7 @@ { "name": "name", "in": "path", - "description": "The name of the Secret", + "description": "The name of the secret.", "required": true, "type": "string" }, @@ -5457,7 +5457,7 @@ { "name": "name", "in": "path", - "description": "The name of the Secret", + "description": "The name of the secret.", "required": true, "type": "string" }, @@ -5545,7 +5545,7 @@ { "name": "name", "in": "path", - "description": "The name of the Secret", + "description": "The name of the secret.", "required": true, "type": "string" }, @@ -5612,7 +5612,7 @@ { "name": "name", "in": "path", - "description": "The name of the Secret", + "description": "The name of the secret.", "required": true, "type": "string" } @@ -5757,7 +5757,7 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceFabric", + "description": "The name of the service fabric.", "required": true, "type": "string" }, @@ -5822,7 +5822,7 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceFabric", + "description": "The name of the service fabric.", "required": true, "type": "string" }, @@ -5910,7 +5910,7 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceFabric", + "description": "The name of the service fabric.", "required": true, "type": "string" }, @@ -5977,7 +5977,7 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceFabric", + "description": "The name of the service fabric.", "required": true, "type": "string" } @@ -6055,7 +6055,7 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceFabric", + "description": "The name of the service fabric.", "required": true, "type": "string" } @@ -6514,7 +6514,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -6582,14 +6582,14 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceFabric", + "description": "The name of the service fabric.", "required": true, "type": "string" } ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -6657,14 +6657,14 @@ { "name": "name", "in": "path", - "description": "The name of the ServiceFabric", + "description": "The name of the service fabric.", "required": true, "type": "string" } ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -6803,7 +6803,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" }, @@ -6861,7 +6861,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" }, @@ -6942,7 +6942,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" }, @@ -7002,7 +7002,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } @@ -7073,7 +7073,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" }, @@ -7089,7 +7089,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -7150,7 +7150,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" }, @@ -7166,7 +7166,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -7227,14 +7227,14 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -7295,7 +7295,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" }, @@ -7311,7 +7311,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -7372,7 +7372,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } @@ -7425,7 +7425,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } @@ -7478,14 +7478,14 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -7546,7 +7546,7 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" }, @@ -7562,7 +7562,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -7623,14 +7623,14 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -8055,7 +8055,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -8116,14 +8116,14 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -8184,14 +8184,14 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -8252,14 +8252,14 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -8320,14 +8320,14 @@ { "name": "name", "in": "path", - "description": "The name of the LabVirtualMachine", + "description": "The name of the virtual machine.", "required": true, "type": "string" } ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -8466,7 +8466,7 @@ { "name": "name", "in": "path", - "description": "The name of the VirtualNetwork", + "description": "The name of the virtual network.", "required": true, "type": "string" }, @@ -8524,7 +8524,7 @@ { "name": "name", "in": "path", - "description": "The name of the VirtualNetwork", + "description": "The name of the virtual network.", "required": true, "type": "string" }, @@ -8605,7 +8605,7 @@ { "name": "name", "in": "path", - "description": "The name of the VirtualNetwork", + "description": "The name of the virtual network.", "required": true, "type": "string" }, @@ -8665,7 +8665,7 @@ { "name": "name", "in": "path", - "description": "The name of the VirtualNetwork", + "description": "The name of the virtual network.", "required": true, "type": "string" } @@ -9016,7 +9016,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -9086,7 +9086,7 @@ ], "responses": { "200": { - "description": "The request has succeeded." + "description": "Azure operation completed successfully." }, "202": { "description": "Resource operation accepted.", @@ -9126,6 +9126,17 @@ "type": "object", "description": "Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level.", "properties": { + "location": { + "type": "string", + "description": "The location of the resource." + }, + "tags": { + "type": "object", + "description": "The tags of the resource.", + "additionalProperties": { + "type": "string" + } + }, "properties": { "$ref": "#/definitions/ApplicableScheduleProperties", "description": "The properties of the resource.", @@ -9137,7 +9148,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/Resource" } ] }, @@ -9186,6 +9197,21 @@ "$ref": "#/definitions/ArmTemplateProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -9193,7 +9219,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -9308,6 +9334,21 @@ "$ref": "#/definitions/ArtifactProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -9315,7 +9356,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -9468,6 +9509,21 @@ "$ref": "#/definitions/ArtifactSourceProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -9475,7 +9531,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -9771,6 +9827,21 @@ "$ref": "#/definitions/CustomImageProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -9778,7 +9849,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -10028,6 +10099,21 @@ "$ref": "#/definitions/DiskProperties", "description": "The properties of the disk.", "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" + ] } }, "required": [ @@ -10035,7 +10121,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -10132,6 +10218,21 @@ "$ref": "#/definitions/EnvironmentProperties", "description": "The properties of the environment.", "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" + ] } }, "required": [ @@ -10139,7 +10240,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -10387,6 +10488,21 @@ "$ref": "#/definitions/FormulaProperties", "description": "The properties of the formula.", "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" + ] } }, "required": [ @@ -10394,7 +10510,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -10489,6 +10605,21 @@ "$ref": "#/definitions/GalleryImageProperties", "description": "The properties of the gallery image.", "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" + ] } }, "required": [ @@ -10496,7 +10627,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -10981,6 +11112,21 @@ "$ref": "#/definitions/LabProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -10988,7 +11134,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -11037,6 +11183,21 @@ "$ref": "#/definitions/LabCostProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -11044,7 +11205,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -11399,6 +11560,21 @@ "$ref": "#/definitions/LabVirtualMachineProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -11406,7 +11582,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -11879,6 +12055,21 @@ "$ref": "#/definitions/NotificationChannelProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -11886,7 +12077,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -12128,6 +12319,21 @@ "$ref": "#/definitions/PolicyProperties", "description": "The properties of the resource.", "x-ms-client-flatten": true + }, + "tags": { + "type": "object", + "description": "The tags of the resource.", + "additionalProperties": { + "type": "string" + } + }, + "location": { + "type": "string", + "description": "The location of the resource.", + "x-ms-mutability": [ + "read", + "create" + ] } }, "required": [ @@ -12135,7 +12341,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -12432,39 +12638,6 @@ } } }, - "Resource": { - "type": "object", - "description": "An Azure resource.", - "properties": { - "id": { - "type": "string", - "description": "The identifier of the resource.", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the resource.", - "readOnly": true - }, - "type": { - "type": "string", - "description": "The type of the resource.", - "readOnly": true - }, - "location": { - "type": "string", - "description": "The location of the resource." - }, - "tags": { - "type": "object", - "description": "The tags of the resource.", - "additionalProperties": { - "type": "string" - } - } - }, - "x-ms-azure-resource": true - }, "RetargetScheduleProperties": { "type": "object", "description": "Properties for retargeting a virtual machine schedule.", @@ -12487,6 +12660,21 @@ "$ref": "#/definitions/ScheduleProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -12494,7 +12682,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -12693,6 +12881,21 @@ "$ref": "#/definitions/SecretProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -12700,7 +12903,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -12762,6 +12965,21 @@ "$ref": "#/definitions/ServiceFabricProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -12769,7 +12987,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -12836,6 +13054,21 @@ "type": "object", "description": "A container for a managed identity to execute DevTest lab services.", "properties": { + "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" + ] + }, "identity": { "$ref": "#/definitions/IdentityProperties", "description": "The identity of the resource." @@ -12843,7 +13076,7 @@ }, "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -13058,10 +13291,6 @@ ] } }, - "TypeSpec.Http.OkResponse": { - "type": "object", - "description": "The request has succeeded." - }, "UpdateResource": { "type": "object", "description": "Represents an update resource", @@ -13104,12 +13333,27 @@ }, "User": { "type": "object", - "description": "Profile of a lab user.", + "description": "A user profile.", "properties": { "properties": { "$ref": "#/definitions/UserProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -13117,7 +13361,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, @@ -13256,6 +13500,21 @@ "$ref": "#/definitions/VirtualNetworkProperties", "description": "The properties of the 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" + ] } }, "required": [ @@ -13263,7 +13522,7 @@ ], "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/tspconfig.yaml b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/tspconfig.yaml index bf1f407e52ab..3a50027b0863 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/tspconfig.yaml +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/tspconfig.yaml @@ -10,12 +10,8 @@ options: output-file: "{version-status}/{version}/DTL.json" azure-resource-provider-folder: "resource-manager" examples-dir: "{project-root}/examples" - arm-types-dir: "{project-root}/../../../../common-types/resource-management" - "@azure-tools/typespec-csharp": - flavor: azure - clear-output-folder: true - model-namespace: true + "@azure-typespec/http-client-csharp-mgmt": namespace: "Azure.ResourceManager.DevTestLabs" emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" "@azure-tools/typespec-python":