Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Version 0.2.0 for Azure Workloads Module #23786

Merged
merged 12 commits into from
Dec 22, 2023
9 changes: 8 additions & 1 deletion src/Workloads/Workloads.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ For information on how to develop for `Az.Workloads`, see [how-to.md](how-to.md)
> see https://aka.ms/autorest

```yaml
commit: c7c06e7e311df89b6851aa7e12142c8f0d129cd8
commit: 202321f386ea5b0c103b46902d43b3d3c50e029c
tag: package-preview-2023-10
# tag: package-2023-04
require:
- $(this-folder)/../../readme.azure.noprofile.md
- $(repo)/specification/workloads/resource-manager/readme.md
Expand Down Expand Up @@ -356,6 +358,11 @@ directive:
# - PrometheusHaClusterProviderInstanceProperties
# - MsSqlServerProviderInstanceProperties

- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}"].delete.responses
transform: >-
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" } } }

# Result shoule be in SingleServerRecommendationResult and ThreeTierRecommendationResult
- from: source-file-csharp
where: $
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "sapVirtualInstances/applicationInstances",
"apiVersion": "2023-04-01",
"apiVersion": "2023-10-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.workloads"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "sapVirtualInstances/centralInstances",
"apiVersion": "2023-04-01",
"apiVersion": "2023-10-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.workloads"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "sapVirtualInstances/databaseInstances",
"apiVersion": "2023-04-01",
"apiVersion": "2023-10-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.workloads"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "sapVirtualInstances",
"apiVersion": "2023-04-01",
"apiVersion": "2023-10-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.workloads"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ public partial class InvokeAzWorkloadsSapSizingRecommendation_SapExpanded : glob
{
/// <summary>a delegate that is called when the remote service returns 200 (OK).</summary>
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
/// <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>
/// <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>
/// from the remote call</param>
/// <returns>
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
/// </returns>
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)
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)
{
// onOk - response for 200 / application/json
// should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult
// should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult
WriteObject(response.Result);
returnNow = global::System.Threading.Tasks.Task.FromResult(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ public partial class InvokeAzWorkloadsSapSizingRecommendation_SapViaIdentityExpa
{
/// <summary>a delegate that is called when the remote service returns 200 (OK).</summary>
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
/// <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>
/// <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>
/// from the remote call</param>
/// <returns>
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
/// </returns>
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)
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)
{
// onOk - response for 200 / application/json
// (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapSizingRecommendationResult
// (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult
WriteObject(response.Result);
returnNow = global::System.Threading.Tasks.Task.FromResult(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Creates a Virtual Instance for SAP solutions (VIS) resource
{{ Add code here }}

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance
Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -37,7 +37,7 @@ CONFIGURATION <ISapConfiguration>: Defines if the SAP system is being created us
https://learn.microsoft.com/powershell/module/az.workloads/new-azworkloadssapvirtualinstance
#>
function New-AzWorkloadsSapVirtualInstance {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance])]
[CmdletBinding(DefaultParameterSetName='CreateWithDiscovery', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
Expand Down Expand Up @@ -182,7 +182,7 @@ function New-AzWorkloadsSapVirtualInstance {
process {
try {
$configuration = [Microsoft.Azure.PowerShell.Cmdlets.Workloads.Support.SapConfigurationType]::Discovery
$discoveryConfiguration = [Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.DiscoveryConfiguration]::new();
$discoveryConfiguration = [Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.DiscoveryConfiguration]::new();
$discoveryConfiguration.ConfigurationType = $configuration
$discoveryConfiguration.CentralServerVMId = $CentralServerVmId
$null = $PSBoundParameters.Remove('CentralServerVmId')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Workloads.Cmdlets
/// </remarks>
[global::Microsoft.Azure.PowerShell.Cmdlets.Workloads.InternalExport]
[global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzWorkloadsSapVirtualInstance_CreateWithJsonString", SupportsShouldProcess = true)]
[global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance))]
[global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance))]
[global::Microsoft.Azure.PowerShell.Cmdlets.Workloads.Description(@"Creates a Virtual Instance for SAP solutions (VIS) resource")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Workloads.Generated]
public partial class NewAzWorkloadsSapVirtualInstance_CreateWithJsonString : global::System.Management.Automation.PSCmdlet,
Expand Down Expand Up @@ -187,12 +187,12 @@ public partial class NewAzWorkloadsSapVirtualInstance_CreateWithJsonString : glo
/// on that response. Implement this method in a partial class to enable this behavior
/// </summary>
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
/// <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>
/// <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>
/// from the remote call</param>
/// <param name="returnNow">/// Determines if the rest of the onOk method should be processed, or if the method should return
/// immediately (set to true to skip further processing )</param>

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);
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);

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

/// <summary>a delegate that is called when the remote service returns 200 (OK).</summary>
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
/// <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>
/// <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>
/// from the remote call</param>
/// <returns>
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
/// </returns>
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)
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)
{
using( NoSynchronizationContext )
{
Expand All @@ -479,7 +479,7 @@ protected override void StopProcessing()
return ;
}
// onOk - response for 200 / application/json
// (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance
// (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance
WriteObject((await response));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Creates a Virtual Instance for SAP solutions (VIS) resource
{{ Add code here }}

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance
Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -37,7 +37,7 @@ CONFIGURATION <ISapConfiguration>: Defines if the SAP system is being created us
https://learn.microsoft.com/powershell/module/az.workloads/new-azworkloadssapvirtualinstance
#>
function New-AzWorkloadsSapVirtualInstance_CreateWithJsonTemplatePath {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20230401.ISapVirtualInstance])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapVirtualInstance])]
[CmdletBinding(DefaultParameterSetName='CreateWithDiscovery', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public partial class WorkloadsClient
/// <returns>
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the response is completed.
/// </returns>
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)
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)
{
var apiVersion = @"2023-04-01";
var apiVersion = @"2023-10-01-preview";
// Constant Parameters
using( NoSynchronizationContext )
{
Expand Down
Loading