Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - LoadTesting")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.1.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.1.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
41 changes: 14 additions & 27 deletions src/LoadTesting/LoadTesting.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,21 @@ input-file:
title: LoadTesting
module-version: 0.1.0
subject-prefix: ""

resourcegroup-append: true
nested-object-to-string: true
inlining-threshold: 200

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"
# Disable transform IdentityType as GET+PUT can not replace patch
flatten-userassignedidentity: false
disable-transform-identity-type: true

directive:
- where:
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true

- where:
variant: ^CreateViaIdentityExpanded$|^UpdateViaIdentityExpanded$|^GetViaIdentity$|^DeleteViaIdentity$
remove: true

# https://stackoverflow.microsoft.com/questions/333196
- where:
subject: .*Quota.*
Expand All @@ -61,10 +66,6 @@ directive:
set:
subject: Load

- where:
variant: ^Create$|^Update$|.*ViaIdentity$|.*ViaIdentityExpanded$
remove: true

# Removing Set command
- where:
verb: Set
Expand All @@ -75,12 +76,6 @@ directive:
parameter-name: ManagedServiceIdentityType
set:
parameter-name: IdentityType

# Renaming user assigned identity parameter
- where:
parameter-name: IdentityUserAssignedIdentity
set:
parameter-name: IdentityUserAssigned

# Renaming encryption key parameter
- where:
Expand Down Expand Up @@ -142,7 +137,7 @@ directive:
# Hiding redundant SystemData property
- from: source-file-csharp
where: $
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData SystemData', 'private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData SystemData');
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.ISystemData SystemData', 'private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.ISystemData SystemData');

- from: source-file-csharp
where: $
Expand Down Expand Up @@ -252,20 +247,12 @@ directive:
- where:
verb: New
subject: Load
variant: ^CreateExpanded$
hide: true

- where:
verb: Update
subject: Load
hide: true

- where:
verb: Get
subject: Load
hide: true

- where:
verb: Remove
subject: Load
variant: ^UpdateExpanded$
hide: true
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"resourceType": "loadTests",
"apiVersion": "2022-12-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.loadtesting"
},
"commands": [
{
"name": "Get-AzLoad",
"description": "Get a LoadTest resource.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.loadtesting/get-azload"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get a LoadTest resource.",
"parameters": [
{
"name": "-Name",
"value": "[Path.loadTestName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzLoad",
"description": "Delete a LoadTest resource.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.loadtesting/remove-azload"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Delete a LoadTest resource.",
"parameters": [
{
"name": "-Name",
"value": "[Path.loadTestName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
119 changes: 0 additions & 119 deletions src/LoadTesting/LoadTesting.Autorest/custom/Get-AzLoad.ps1

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201
namespace Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;

public partial class EncryptionPropertiesIdentity
{
partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container){
if(string.Empty.Equals(this.ResourceId))
if (string.Empty.Equals(this.ResourceId))
{
container.Remove("resourceId");
container.Add("resourceId", Runtime.Json.XNull.Instance);
Expand Down
Loading