Skip to content

Commit 1ad8c44

Browse files
authored
New Version 0.2.0 for Azure Workloads Module (#23786)
* New Version 1.0.0 for Azure Workloads Module New Version 1.0.0 for Azure Workloads Module * Update New-AzWorkloadsSapVirtualInstance.Tests.ps1 Added to run the checks again * Update README.md * Updating Docs and Test cases * Update New-AzWorkloadsSapVirtualInstance.Tests.ps1 * Fixing Stop Database test * correcting error for Remove SVI * Fixing the issue with New SVI
1 parent 35853bd commit 1ad8c44

File tree

91 files changed

+14655
-3442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+14655
-3442
lines changed

src/Workloads/Workloads.Autorest/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ For information on how to develop for `Az.Workloads`, see [how-to.md](how-to.md)
3030
> see https://aka.ms/autorest
3131
3232
```yaml
33-
commit: c7c06e7e311df89b6851aa7e12142c8f0d129cd8
33+
commit: 202321f386ea5b0c103b46902d43b3d3c50e029c
34+
tag: package-preview-2023-10
35+
# tag: package-2023-04
3436
require:
3537
- $(this-folder)/../../readme.azure.noprofile.md
3638
- $(repo)/specification/workloads/resource-manager/readme.md
@@ -356,6 +358,11 @@ directive:
356358
# - PrometheusHaClusterProviderInstanceProperties
357359
# - MsSqlServerProviderInstanceProperties
358360

361+
- from: swagger-document
362+
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}"].delete.responses
363+
transform: >-
364+
return { "200": { "description": "OK" }, "202": { "description": "Accepted", "headers": { "Location": { "description": "The URL of the resource used to check the status of the asynchronous operation.", "type": "string" }, "Retry-After": { "description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.", "type": "integer", "format": "int32" }, "Azure-AsyncOperation": { "description": "The URI to poll for completion status.", "type": "string" } } }, "204": { "description": "No Content" }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/202321f386ea5b0c103b46902d43b3d3c50e029c/specification/common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }
365+
359366
# Result shoule be in SingleServerRecommendationResult and ThreeTierRecommendationResult
360367
- from: source-file-csharp
361368
where: $

src/Workloads/Workloads.Autorest/UX/Microsoft.Workloads/sapVirtualInstances-applicationInstances.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "sapVirtualInstances/applicationInstances",
3-
"apiVersion": "2023-04-01",
3+
"apiVersion": "2023-10-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.workloads"
66
},

src/Workloads/Workloads.Autorest/UX/Microsoft.Workloads/sapVirtualInstances-centralInstances.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "sapVirtualInstances/centralInstances",
3-
"apiVersion": "2023-04-01",
3+
"apiVersion": "2023-10-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.workloads"
66
},

src/Workloads/Workloads.Autorest/UX/Microsoft.Workloads/sapVirtualInstances-databaseInstances.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "sapVirtualInstances/databaseInstances",
3-
"apiVersion": "2023-04-01",
3+
"apiVersion": "2023-10-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.workloads"
66
},

src/Workloads/Workloads.Autorest/UX/Microsoft.Workloads/sapVirtualInstances.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "sapVirtualInstances",
3-
"apiVersion": "2023-04-01",
3+
"apiVersion": "2023-10-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.workloads"
66
},

src/Workloads/Workloads.Autorest/custom/InvokeAzWorkloadsSapSizingRecommendation_SapExpanded.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ public partial class InvokeAzWorkloadsSapSizingRecommendation_SapExpanded : glob
1919
{
2020
/// <summary>a delegate that is called when the remote service returns 200 (OK).</summary>
2121
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
22-
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult">Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult</see>
22+
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult">Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult</see>
2323
/// from the remote call</param>
2424
/// <returns>
2525
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
2626
/// </returns>
27-
partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult> response, ref global::System.Threading.Tasks.Task<bool> returnNow)
27+
partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult> response, ref global::System.Threading.Tasks.Task<bool> returnNow)
2828
{
2929
// onOk - response for 200 / application/json
30-
// should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult
30+
// should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult
3131
WriteObject(response.Result);
3232
returnNow = global::System.Threading.Tasks.Task.FromResult(true);
3333
}

src/Workloads/Workloads.Autorest/custom/InvokeAzWorkloadsSapSizingRecommendation_SapViaIdentityExpanded.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ public partial class InvokeAzWorkloadsSapSizingRecommendation_SapViaIdentityExpa
1919
{
2020
/// <summary>a delegate that is called when the remote service returns 200 (OK).</summary>
2121
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
22-
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult">Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult</see>
22+
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult">Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult</see>
2323
/// from the remote call</param>
2424
/// <returns>
2525
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
2626
/// </returns>
27-
partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult> response, ref global::System.Threading.Tasks.Task<bool> returnNow)
27+
partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult> response, ref global::System.Threading.Tasks.Task<bool> returnNow)
2828
{
2929
// onOk - response for 200 / application/json
30-
// (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult
30+
// (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult
3131
WriteObject(response.Result);
3232
returnNow = global::System.Threading.Tasks.Task.FromResult(true);
3333
}

src/Workloads/Workloads.Autorest/custom/New-AzWorkloadsSapVirtualInstance/New-AzWorkloadsSapVirtualInstance_CreateWithDiscovery.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Creates a Virtual Instance for SAP solutions (VIS) resource
2525
{{ Add code here }}
2626
2727
.Outputs
28-
Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance
28+
Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance
2929
.Notes
3030
COMPLEX PARAMETER PROPERTIES
3131
@@ -37,7 +37,7 @@ CONFIGURATION <ISapConfiguration>: Defines if the SAP system is being created us
3737
https://learn.microsoft.com/powershell/module/az.workloads/new-azworkloadssapvirtualinstance
3838
#>
3939
function New-AzWorkloadsSapVirtualInstance {
40-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance])]
40+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance])]
4141
[CmdletBinding(DefaultParameterSetName='CreateWithDiscovery', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
4242
param(
4343
[Parameter(Mandatory)]
@@ -182,7 +182,7 @@ function New-AzWorkloadsSapVirtualInstance {
182182
process {
183183
try {
184184
$configuration = [Microsoft.Azure.PowerShell.Cmdlets.Workloads.Support.SapConfigurationType]::Discovery
185-
$discoveryConfiguration = [Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.DiscoveryConfiguration]::new();
185+
$discoveryConfiguration = [Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.DiscoveryConfiguration]::new();
186186
$discoveryConfiguration.ConfigurationType = $configuration
187187
$discoveryConfiguration.CentralServerVMId = $CentralServerVmId
188188
$null = $PSBoundParameters.Remove('CentralServerVmId')

src/Workloads/Workloads.Autorest/custom/New-AzWorkloadsSapVirtualInstance/New-AzWorkloadsSapVirtualInstance_CreateWithJsonString.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Workloads.Cmdlets
1414
/// </remarks>
1515
[global::Microsoft.Azure.PowerShell.Cmdlets.Workloads.InternalExport]
1616
[global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzWorkloadsSapVirtualInstance_CreateWithJsonString", SupportsShouldProcess = true)]
17-
[global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance))]
17+
[global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance))]
1818
[global::Microsoft.Azure.PowerShell.Cmdlets.Workloads.Description(@"Creates a Virtual Instance for SAP solutions (VIS) resource")]
1919
[global::Microsoft.Azure.PowerShell.Cmdlets.Workloads.Generated]
2020
public partial class NewAzWorkloadsSapVirtualInstance_CreateWithJsonString : global::System.Management.Automation.PSCmdlet,
@@ -187,12 +187,12 @@ public partial class NewAzWorkloadsSapVirtualInstance_CreateWithJsonString : glo
187187
/// on that response. Implement this method in a partial class to enable this behavior
188188
/// </summary>
189189
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
190-
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance">Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance</see>
190+
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance">Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance</see>
191191
/// from the remote call</param>
192192
/// <param name="returnNow">/// Determines if the rest of the onOk method should be processed, or if the method should return
193193
/// immediately (set to true to skip further processing )</param>
194194

195-
partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance> response, ref global::System.Threading.Tasks.Task<bool> returnNow);
195+
partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance> response, ref global::System.Threading.Tasks.Task<bool> returnNow);
196196

197197
/// <summary>
198198
/// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet)
@@ -462,12 +462,12 @@ protected override void StopProcessing()
462462

463463
/// <summary>a delegate that is called when the remote service returns 200 (OK).</summary>
464464
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
465-
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance">Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance</see>
465+
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance">Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance</see>
466466
/// from the remote call</param>
467467
/// <returns>
468468
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
469469
/// </returns>
470-
private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance> response)
470+
private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance> response)
471471
{
472472
using( NoSynchronizationContext )
473473
{
@@ -479,7 +479,7 @@ protected override void StopProcessing()
479479
return ;
480480
}
481481
// onOk - response for 200 / application/json
482-
// (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance
482+
// (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance
483483
WriteObject((await response));
484484
}
485485
}

src/Workloads/Workloads.Autorest/custom/New-AzWorkloadsSapVirtualInstance/New-AzWorkloadsSapVirtualInstance_CreateWithJsonTemplatePath.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Creates a Virtual Instance for SAP solutions (VIS) resource
2525
{{ Add code here }}
2626
2727
.Outputs
28-
Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance
28+
Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance
2929
.Notes
3030
COMPLEX PARAMETER PROPERTIES
3131
@@ -37,7 +37,7 @@ CONFIGURATION <ISapConfiguration>: Defines if the SAP system is being created us
3737
https://learn.microsoft.com/powershell/module/az.workloads/new-azworkloadssapvirtualinstance
3838
#>
3939
function New-AzWorkloadsSapVirtualInstance_CreateWithJsonTemplatePath {
40-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance])]
40+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance])]
4141
[CmdletBinding(DefaultParameterSetName='CreateWithDiscovery', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
4242
param(
4343
[Parameter(Mandatory)]

src/Workloads/Workloads.Autorest/custom/New-AzWorkloadsSapVirtualInstance/WorkloadsClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ public partial class WorkloadsClient
2929
/// <returns>
3030
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the response is completed.
3131
/// </returns>
32-
public async global::System.Threading.Tasks.Task SapVirtualInstancesCreateViaJsonString(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string jsonString, global::System.Func<global::System.Net.Http.HttpResponseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance>, global::System.Threading.Tasks.Task> onOk, global::System.Func<global::System.Net.Http.HttpResponseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api30.IErrorResponse>, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Workloads.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Workloads.Runtime.ISendAsync sender)
32+
public async global::System.Threading.Tasks.Task SapVirtualInstancesCreateViaJsonString(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string jsonString, global::System.Func<global::System.Net.Http.HttpResponseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance>, global::System.Threading.Tasks.Task> onOk, global::System.Func<global::System.Net.Http.HttpResponseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api30.IErrorResponse>, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Workloads.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Workloads.Runtime.ISendAsync sender)
3333
{
34-
var apiVersion = @"2023-04-01";
34+
var apiVersion = @"2023-10-01-preview";
3535
// Constant Parameters
3636
using( NoSynchronizationContext )
3737
{

0 commit comments

Comments
 (0)