diff --git a/specification/vmware/Microsoft.AVS.Management/authorizations.tsp b/specification/vmware/Microsoft.AVS.Management/authorizations.tsp index 53a6e0095498..2525adccfb2f 100644 --- a/specification/vmware/Microsoft.AVS.Management/authorizations.tsp +++ b/specification/vmware/Microsoft.AVS.Management/authorizations.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface Authorizations { diff --git a/specification/vmware/Microsoft.AVS.Management/client.tsp b/specification/vmware/Microsoft.AVS.Management/client.tsp index 50f820c087ac..7271b07252f7 100644 --- a/specification/vmware/Microsoft.AVS.Management/client.tsp +++ b/specification/vmware/Microsoft.AVS.Management/client.tsp @@ -2,8 +2,6 @@ import "./main.tsp"; import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; -using Azure.ResourceManager.CommonTypes; -using Microsoft.AVS; @@clientName(Microsoft.AVS, "AzureVMwareSolutionAPI", "javascript"); @@clientName(Microsoft.AVS, "AVS", "python"); diff --git a/specification/vmware/Microsoft.AVS.Management/cloudLinks.tsp b/specification/vmware/Microsoft.AVS.Management/cloudLinks.tsp index 9b6d02c890ae..4632df645077 100644 --- a/specification/vmware/Microsoft.AVS.Management/cloudLinks.tsp +++ b/specification/vmware/Microsoft.AVS.Management/cloudLinks.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface CloudLinks { diff --git a/specification/vmware/Microsoft.AVS.Management/clusters.tsp b/specification/vmware/Microsoft.AVS.Management/clusters.tsp index 7310f1d1c9ea..935e40d37060 100644 --- a/specification/vmware/Microsoft.AVS.Management/clusters.tsp +++ b/specification/vmware/Microsoft.AVS.Management/clusters.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface Clusters { @@ -25,34 +24,16 @@ interface Clusters { LroHeaders = Azure.Core.Foundations.RetryAfterHeader >; - // This could be modeled with ArmCustomPatchAsync if a 202 response with no body is used instead of a 201. - // update is ArmCustomPatchAsync; - #suppress "@azure-tools/typespec-azure-core/no-openapi" "DO NOT COPY - TODO migrate to LRO apis" - @doc("Update a Cluster") - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - #{ `final-state-via`: "location" } - ) - @armResourceUpdate(Cluster) - @patch - update( - ...ResourceInstanceParameters, - - @bodyRoot - @doc("The cluster properties to be updated.") - clusterUpdate: ClusterUpdate, - ): ArmResponse | { - // @doc("Resource update request created.") - ...CreatedResponse; - - ...Azure.Core.Foundations.RetryAfterHeader; - ...LocationHeader; - - @bodyRoot - @doc("The updated cluster.") - cluster: Cluster; - } | ErrorResponse; + @Azure.Core.useFinalStateVia("location") + update is ArmCustomPatchAsync< + Cluster, + ClusterUpdate, + Response = Cluster | ArmResourceCreatedResponse< + Cluster, + LroHeaders = ArmLroLocationHeader & + Azure.Core.Foundations.RetryAfterHeader + > + >; #suppress "deprecated" #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" @@ -63,6 +44,7 @@ interface Clusters { } @@clientName(Clusters.createOrUpdate::parameters.resource, "cluster"); +@@clientName(Clusters.update::parameters.properties, "clusterUpdate"); @doc("Cluster provisioning state") union ClusterProvisioningState { diff --git a/specification/vmware/Microsoft.AVS.Management/common.tsp b/specification/vmware/Microsoft.AVS.Management/common.tsp index 69a8189de12f..d55f92ab290f 100644 --- a/specification/vmware/Microsoft.AVS.Management/common.tsp +++ b/specification/vmware/Microsoft.AVS.Management/common.tsp @@ -1,9 +1,7 @@ namespace Microsoft.AVS; -using Azure.ClientGenerator.Core; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; using TypeSpec.Rest; using TypeSpec.Versioning; @@ -37,12 +35,10 @@ model ResourceList< FriendlyNameFormat extends valueof string = "{name}List" > is Azure.Core.Page; -// use { @bodyRoot _: void } with the next version of typespec-azure -// https://github.com/Azure/typespec-azure/issues/3759 - -// Just like ArmResourceActionSync, but with no request body. +/** + * Just like ArmResourceActionSync, but with no request body. + */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" -#suppress "@azure-tools/typespec-azure-core/documentation-required" "MUST fix in next update" @autoRoute @armResourceAction(TResource) @post @@ -54,34 +50,32 @@ op ArmResourceActionSyncNoRequestBody< ...ResourceInstanceParameters, ): ArmResponse | ErrorResponse; -// Just like ArmResourceActionAsync, but with no request body. +/** + * Like ArmResourceActionAsync, but with no request body and ArmNoContentResponse. + */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" -#suppress "@azure-tools/typespec-azure-core/documentation-required" "MUST fix in next update" op ArmResourceActionNoContentAsyncNoRequestBody< TResource extends Azure.ResourceManager.Foundations.Resource, TBaseParameters extends TypeSpec.Reflection.Model = Foundations.BaseParameters -> is ArmResourceActionAsyncBaseNoRequestBody< +> is ArmResourceActionAsyncBase< TResource, + void, ArmAcceptedLroResponse | ArmNoContentResponse<"Action completed successfully.">, TBaseParameters >; -// Just like ArmResourceActionAsyncBase, but with no request body. +/** + * Just like ArmAcceptedLroResponse, but with a ResponseBody. + */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" -#suppress "@azure-tools/typespec-azure-core/documentation-required" "MUST fix in next update" -#suppress "@azure-tools/typespec-azure-core/no-openapi" "DO NOT COPY - TODO migrate to LRO apis" -@autoRoute -@extension("x-ms-long-running-operation", true) -@extension( - "x-ms-long-running-operation-options", - #{ `final-state-via`: "location" } -) -@armResourceAction(TResource) -@post -op ArmResourceActionAsyncBaseNoRequestBody< - TResource extends Azure.ResourceManager.Foundations.Resource, - TResponse, - TBaseParameters extends TypeSpec.Reflection.Model ->( - ...ResourceInstanceParameters, -): TResponse | ErrorResponse; +@doc(Description) +model ArmAcceptedLroResponseWithResponseBody< + ResponseBody, + Description extends valueof string = "Resource operation accepted.", + LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader & + Azure.Core.Foundations.RetryAfterHeader +> { + ...AcceptedResponse; + ...LroHeaders; + ...Body; +} diff --git a/specification/vmware/Microsoft.AVS.Management/globalReachConnections.tsp b/specification/vmware/Microsoft.AVS.Management/globalReachConnections.tsp index 0c0af43e620c..9f893d917600 100644 --- a/specification/vmware/Microsoft.AVS.Management/globalReachConnections.tsp +++ b/specification/vmware/Microsoft.AVS.Management/globalReachConnections.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface GlobalReachConnections { diff --git a/specification/vmware/Microsoft.AVS.Management/hcxEnterpriseSites.tsp b/specification/vmware/Microsoft.AVS.Management/hcxEnterpriseSites.tsp index 9f21105e563b..357021f90780 100644 --- a/specification/vmware/Microsoft.AVS.Management/hcxEnterpriseSites.tsp +++ b/specification/vmware/Microsoft.AVS.Management/hcxEnterpriseSites.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface HcxEnterpriseSites { diff --git a/specification/vmware/Microsoft.AVS.Management/hosts.tsp b/specification/vmware/Microsoft.AVS.Management/hosts.tsp index f07df956655c..648b1e4c62c4 100644 --- a/specification/vmware/Microsoft.AVS.Management/hosts.tsp +++ b/specification/vmware/Microsoft.AVS.Management/hosts.tsp @@ -1,9 +1,7 @@ namespace Microsoft.AVS; -using Azure.ClientGenerator.Core; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; using TypeSpec.Rest; using TypeSpec.Versioning; diff --git a/specification/vmware/Microsoft.AVS.Management/iscsiPaths.tsp b/specification/vmware/Microsoft.AVS.Management/iscsiPaths.tsp index 1273e3c0aa47..5c731de64374 100644 --- a/specification/vmware/Microsoft.AVS.Management/iscsiPaths.tsp +++ b/specification/vmware/Microsoft.AVS.Management/iscsiPaths.tsp @@ -1,11 +1,8 @@ namespace Microsoft.AVS; -using Azure.ClientGenerator.Core; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface IscsiPaths { diff --git a/specification/vmware/Microsoft.AVS.Management/locations.tsp b/specification/vmware/Microsoft.AVS.Management/locations.tsp index 219b12185538..8caaa4eb1893 100644 --- a/specification/vmware/Microsoft.AVS.Management/locations.tsp +++ b/specification/vmware/Microsoft.AVS.Management/locations.tsp @@ -1,11 +1,8 @@ namespace Microsoft.AVS; -using Azure.ClientGenerator.Core; using Azure.ResourceManager; using TypeSpec.Http; -using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface Locations { diff --git a/specification/vmware/Microsoft.AVS.Management/placementPolicies.tsp b/specification/vmware/Microsoft.AVS.Management/placementPolicies.tsp index 6f2447a0d8fe..64fda31f466e 100644 --- a/specification/vmware/Microsoft.AVS.Management/placementPolicies.tsp +++ b/specification/vmware/Microsoft.AVS.Management/placementPolicies.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface PlacementPolicies { @@ -28,33 +27,12 @@ interface PlacementPolicies { LroHeaders = Azure.Core.Foundations.RetryAfterHeader >; - // 202 response has a body, but it should not to match ArmCustomPatchAsync. - // update is ArmCustomPatchAsync; #suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" - #suppress "@azure-tools/typespec-azure-core/no-openapi" "DO NOT COPY - TODO migrate to LRO apis" - @doc("Update a PlacementPolicy") - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - #{ `final-state-via`: "location" } - ) - @armResourceUpdate(PlacementPolicy) - @patch - update( - ...ResourceInstanceParameters, - - @bodyRoot - @doc("The placement policy properties to be updated.") - placementPolicyUpdate: PlacementPolicyUpdate, - ): ArmResponse | { - ...AcceptedResponse; - ...Azure.Core.Foundations.RetryAfterHeader; - ...LocationHeader; - - @bodyRoot - @doc("The updatd placement policy.") - placementPolicy: PlacementPolicy; - } | ErrorResponse; + update is ArmCustomPatchAsync< + PlacementPolicy, + PlacementPolicyUpdate, + Response = ArmResponse | ArmAcceptedLroResponseWithResponseBody + >; #suppress "deprecated" #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" @@ -65,6 +43,10 @@ interface PlacementPolicies { "placementPolicy" ); +@@clientName(PlacementPolicies.update::parameters.properties, + "placementPolicyUpdate" +); + @doc("Placement Policy state") union PlacementPolicyState { string, diff --git a/specification/vmware/Microsoft.AVS.Management/privateClouds.tsp b/specification/vmware/Microsoft.AVS.Management/privateClouds.tsp index d449bcf86268..db7c14413c71 100644 --- a/specification/vmware/Microsoft.AVS.Management/privateClouds.tsp +++ b/specification/vmware/Microsoft.AVS.Management/privateClouds.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; alias PrivateCloudList = ResourceList; @armResourceOperations @@ -31,34 +30,16 @@ interface PrivateClouds { LroHeaders = Azure.Core.Foundations.RetryAfterHeader >; - // This could be modeled with ArmCustomPatchAsync if a 202 response with no body is used instead of a 201. - // update is ArmCustomPatchAsync; - #suppress "@azure-tools/typespec-azure-core/no-openapi" "DO NOT COPY - TODO migrate to LRO apis" - @doc("Update a PrivateCloud") - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - #{ `final-state-via`: "location" } - ) - @armResourceUpdate(PrivateCloud) - @patch - update( - ...ResourceInstanceParameters, - - @bodyRoot - @doc("The private cloud properties to be updated.") - privateCloudUpdate: PrivateCloudUpdate, - ): ArmResponse | { - // @doc("Resource update request created.") - ...CreatedResponse; - - ...Azure.Core.Foundations.RetryAfterHeader; - ...LocationHeader; - - @bodyRoot - @doc("The updated private cloud.") - placementPolicy: PrivateCloud; - } | ErrorResponse; + @Azure.Core.useFinalStateVia("location") + update is ArmCustomPatchAsync< + PrivateCloud, + PrivateCloudUpdate, + Response = PrivateCloud | ArmResourceCreatedResponse< + PrivateCloud, + LroHeaders = ArmLroLocationHeader & + Azure.Core.Foundations.RetryAfterHeader + > + >; #suppress "deprecated" #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" @@ -80,6 +61,7 @@ interface PrivateClouds { } @@clientName(PrivateClouds.createOrUpdate::parameters.resource, "privateCloud"); +@@clientName(PrivateClouds.update::parameters.properties, "privateCloudUpdate"); @doc("private cloud provisioning state") union PrivateCloudProvisioningState { diff --git a/specification/vmware/Microsoft.AVS.Management/scriptCmdlets.tsp b/specification/vmware/Microsoft.AVS.Management/scriptCmdlets.tsp index 4fcef34436df..3b4c7e171053 100644 --- a/specification/vmware/Microsoft.AVS.Management/scriptCmdlets.tsp +++ b/specification/vmware/Microsoft.AVS.Management/scriptCmdlets.tsp @@ -1,11 +1,9 @@ namespace Microsoft.AVS; -using Azure.ClientGenerator.Core; using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface ScriptCmdlets { diff --git a/specification/vmware/Microsoft.AVS.Management/scriptExecutions.tsp b/specification/vmware/Microsoft.AVS.Management/scriptExecutions.tsp index 63408f5e83be..6e729c30f78d 100644 --- a/specification/vmware/Microsoft.AVS.Management/scriptExecutions.tsp +++ b/specification/vmware/Microsoft.AVS.Management/scriptExecutions.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface ScriptExecutions { diff --git a/specification/vmware/Microsoft.AVS.Management/scriptPackages.tsp b/specification/vmware/Microsoft.AVS.Management/scriptPackages.tsp index 48c087d63a16..764ab6f9179b 100644 --- a/specification/vmware/Microsoft.AVS.Management/scriptPackages.tsp +++ b/specification/vmware/Microsoft.AVS.Management/scriptPackages.tsp @@ -1,11 +1,9 @@ namespace Microsoft.AVS; -using Azure.ClientGenerator.Core; using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface ScriptPackages { diff --git a/specification/vmware/Microsoft.AVS.Management/skus.tsp b/specification/vmware/Microsoft.AVS.Management/skus.tsp index 6465486e8d85..7695724c292c 100644 --- a/specification/vmware/Microsoft.AVS.Management/skus.tsp +++ b/specification/vmware/Microsoft.AVS.Management/skus.tsp @@ -4,7 +4,6 @@ using Azure.Core; using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; -using TypeSpec.Rest; using TypeSpec.Versioning; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" diff --git a/specification/vmware/Microsoft.AVS.Management/virtualMachines.tsp b/specification/vmware/Microsoft.AVS.Management/virtualMachines.tsp index 84d1a1338806..749bca46bfb6 100644 --- a/specification/vmware/Microsoft.AVS.Management/virtualMachines.tsp +++ b/specification/vmware/Microsoft.AVS.Management/virtualMachines.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface VirtualMachines { @@ -18,21 +17,19 @@ interface VirtualMachines { get is ArmResourceRead; - // restrictMovement should be a ArmResourceActionNoContentAsync, but does not respond with a 204. - #suppress "@azure-tools/typespec-azure-core/no-openapi" "DO NOT COPY - TODO migrate to LRO apis" @doc("Enable or disable DRS-driven VM movement restriction") - @armResourceAction(Location) - @post - @extension("x-ms-long-running-operation", true) - restrictMovement( - ...ResourceInstanceParameters, - - @bodyRoot - @doc("The body type of the operation request.") - restrictMovement: VirtualMachineRestrictMovement, - ): ArmAcceptedLroResponse | ErrorResponse; + restrictMovement is ArmResourceActionAsyncBase< + VirtualMachine, + VirtualMachineRestrictMovement, + ArmAcceptedLroResponse, + Foundations.BaseParameters + >; } +@@clientName(VirtualMachines.restrictMovement::parameters.body, + "restrictMovement" +); + @doc("Virtual Machine Restrict Movement state") union VirtualMachineRestrictMovementState { string, diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dhcpConfigurations.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dhcpConfigurations.tsp index bc126f424e22..8483d59dd48e 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dhcpConfigurations.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dhcpConfigurations.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" // @armResourceOperations diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dnsServices.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dnsServices.tsp index ddc9d340e7aa..3bf91234cfc3 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dnsServices.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dnsServices.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" #suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" @@ -43,18 +42,13 @@ interface WorkloadNetworkDnsServices { WorkloadNetworkDnsService >; + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "Can not change existing response codes." #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "DnsServiceIdParameter should be last, but it is breaking to correct it." #suppress "@azure-tools/typespec-azure-core/no-openapi" "Can not change existing operationId." @operationId("WorkloadNetworks_DeleteDnsService") - // delete is ArmResourceDeleteAsync; @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") @doc("Delete a {name}", WorkloadNetworkDnsService) - @delete - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - #{ `final-state-via`: "location" } - ) + @armResourceDelete(WorkloadNetworkDnsService) delete( ...Foundations.BaseParameters, ...DnsServiceIdParameter, diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dnsZones.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dnsZones.tsp index 88795240eb0f..c81b7cfe180e 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dnsZones.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-dnsZones.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" #suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" @@ -37,18 +36,13 @@ interface WorkloadNetworkDnsZones { @patch(#{ implicitOptionality: false }) update is ArmCustomPatchAsync; + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "Can not change existing response codes." #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "DnsZoneIdParameter should be last, but it is breaking to correct it." #suppress "@azure-tools/typespec-azure-core/no-openapi" "Can not change existing operationId." @operationId("WorkloadNetworks_DeleteDnsZone") - // delete is ArmResourceDeleteAsync; @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") @doc("Delete a {name}", WorkloadNetworkDnsZone) - @delete - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - #{ `final-state-via`: "location" } - ) + @armResourceDelete(WorkloadNetworkDnsZone) delete( ...Foundations.BaseParameters, ...DnsZoneIdParameter, diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-gateways.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-gateways.tsp index 7cfa3f1748aa..ab8e2debd2a6 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-gateways.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-gateways.tsp @@ -1,11 +1,9 @@ namespace Microsoft.AVS; -using Azure.ClientGenerator.Core; using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface WorkloadNetworkGateways { diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-portMirroringProfiles.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-portMirroringProfiles.tsp index 95008abdf683..5188c52fd593 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-portMirroringProfiles.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-portMirroringProfiles.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" #suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" @@ -40,18 +39,13 @@ interface WorkloadNetworkPortMirroringProfiles { WorkloadNetworkPortMirroring >; + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "Can not change existing response codes." #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "PortMirroringProfileParameter should be last, but it is breaking to correct it." #suppress "@azure-tools/typespec-azure-core/no-openapi" "Can not change existing operationId." @operationId("WorkloadNetworks_DeletePortMirroring") - // delete is ArmResourceDeleteAsync; @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") @doc("Delete a {name}", WorkloadNetworkPortMirroring) - @delete - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - #{ `final-state-via`: "location" } - ) + @armResourceDelete(WorkloadNetworkPortMirroring) delete( ...Foundations.BaseParameters, ...PortMirroringProfileParameter, diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-publicIPs.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-publicIPs.tsp index bdada676b8cb..5e65e8dc2a79 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-publicIPs.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-publicIPs.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" #suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" @@ -31,18 +30,13 @@ interface WorkloadNetworkPublicIps { LroHeaders = Azure.Core.Foundations.RetryAfterHeader >; + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "Can not change existing response codes." #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "PublicIPIdParameter should be last, but it is breaking to correct it." #suppress "@azure-tools/typespec-azure-core/no-openapi" "Can not change existing operationId." @operationId("WorkloadNetworks_DeletePublicIP") - // delete is ArmResourceDeleteAsync; @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") @doc("Delete a {name}", WorkloadNetworkPublicIP) - @delete - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - #{ `final-state-via`: "location" } - ) + @armResourceDelete(WorkloadNetworkPublicIP) delete( ...Foundations.BaseParameters, ...PublicIPIdParameter, diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-segments.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-segments.tsp index fd6e34d57a4f..b00704d1a660 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-segments.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-segments.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface WorkloadNetworkSegments { diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-virtualMachines.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-virtualMachines.tsp index 263f23987871..92c704c40944 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-virtualMachines.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-virtualMachines.tsp @@ -1,11 +1,9 @@ namespace Microsoft.AVS; -using Azure.ClientGenerator.Core; using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface WorkloadNetworkVirtualMachines { diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-vmGroups.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-vmGroups.tsp index 6feeb3629d2e..6195d7dd1770 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks-vmGroups.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks-vmGroups.tsp @@ -5,7 +5,6 @@ using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" #suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" @@ -37,18 +36,13 @@ interface WorkloadNetworkVmGroups { @patch(#{ implicitOptionality: false }) update is ArmCustomPatchAsync; + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "Can not change existing response codes." #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "VmGroupIdParameter should be last, but it is breaking to correct it." #suppress "@azure-tools/typespec-azure-core/no-openapi" "Can not change existing operationId." @operationId("WorkloadNetworks_DeleteVMGroup") - // delete is ArmResourceDeleteAsync; @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") @doc("Delete a {name}", WorkloadNetworkVMGroup) - @delete - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - #{ `final-state-via`: "location" } - ) + @armResourceDelete(WorkloadNetworkVMGroup) delete( ...Foundations.BaseParameters, ...VmGroupIdParameter, diff --git a/specification/vmware/Microsoft.AVS.Management/workloadNetworks.tsp b/specification/vmware/Microsoft.AVS.Management/workloadNetworks.tsp index 9beaf3a20437..a5f958e03208 100644 --- a/specification/vmware/Microsoft.AVS.Management/workloadNetworks.tsp +++ b/specification/vmware/Microsoft.AVS.Management/workloadNetworks.tsp @@ -1,11 +1,9 @@ namespace Microsoft.AVS; -using Azure.ClientGenerator.Core; using Azure.ResourceManager; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; -using TypeSpec.Versioning; @armResourceOperations interface WorkloadNetworks { diff --git a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json index 676ce3eebbdc..7bed1e1cabf0 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json @@ -464,7 +464,7 @@ { "name": "privateCloudUpdate", "in": "body", - "description": "The private cloud properties to be updated.", + "description": "The resource properties to be updated.", "required": true, "schema": { "$ref": "#/definitions/PrivateCloudUpdate" @@ -473,13 +473,13 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PrivateCloud" } }, "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + "description": "Resource 'PrivateCloud' create operation succeeded", "schema": { "$ref": "#/definitions/PrivateCloud" }, @@ -1580,7 +1580,7 @@ { "name": "clusterUpdate", "in": "body", - "description": "The cluster properties to be updated.", + "description": "The resource properties to be updated.", "required": true, "schema": { "$ref": "#/definitions/ClusterUpdate" @@ -1589,13 +1589,13 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Cluster" } }, "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + "description": "Resource 'Cluster' create operation succeeded", "schema": { "$ref": "#/definitions/Cluster" }, @@ -2295,7 +2295,7 @@ { "name": "placementPolicyUpdate", "in": "body", - "description": "The placement policy properties to be updated.", + "description": "The resource properties to be updated.", "required": true, "schema": { "$ref": "#/definitions/PlacementPolicyUpdate" @@ -2310,7 +2310,7 @@ } }, "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", + "description": "Resource operation accepted.", "schema": { "$ref": "#/definitions/PlacementPolicy" }, @@ -2588,7 +2588,7 @@ { "name": "restrictMovement", "in": "body", - "description": "The body type of the operation request.", + "description": "The content of the action request", "required": true, "schema": { "$ref": "#/definitions/VirtualMachineRestrictMovement" diff --git a/specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/vmware.json index 7b2da5b4f946..6a45bfbcd6f6 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/vmware.json @@ -515,7 +515,7 @@ { "name": "privateCloudUpdate", "in": "body", - "description": "The private cloud properties to be updated.", + "description": "The resource properties to be updated.", "required": true, "schema": { "$ref": "#/definitions/PrivateCloudUpdate" @@ -524,13 +524,13 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PrivateCloud" } }, "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + "description": "Resource 'PrivateCloud' create operation succeeded", "schema": { "$ref": "#/definitions/PrivateCloud" }, @@ -1637,7 +1637,7 @@ { "name": "clusterUpdate", "in": "body", - "description": "The cluster properties to be updated.", + "description": "The resource properties to be updated.", "required": true, "schema": { "$ref": "#/definitions/ClusterUpdate" @@ -1646,13 +1646,13 @@ ], "responses": { "200": { - "description": "Azure operation completed successfully.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Cluster" } }, "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + "description": "Resource 'Cluster' create operation succeeded", "schema": { "$ref": "#/definitions/Cluster" }, @@ -2473,7 +2473,7 @@ { "name": "placementPolicyUpdate", "in": "body", - "description": "The placement policy properties to be updated.", + "description": "The resource properties to be updated.", "required": true, "schema": { "$ref": "#/definitions/PlacementPolicyUpdate" @@ -2488,7 +2488,7 @@ } }, "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", + "description": "Resource operation accepted.", "schema": { "$ref": "#/definitions/PlacementPolicy" }, @@ -2766,7 +2766,7 @@ { "name": "restrictMovement", "in": "body", - "description": "The body type of the operation request.", + "description": "The content of the action request", "required": true, "schema": { "$ref": "#/definitions/VirtualMachineRestrictMovement"