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

Quantum v3 to v4 #27282

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
26 changes: 26 additions & 0 deletions src/Quantum/Quantum.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Quantum")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.2")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.2")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
8 changes: 0 additions & 8 deletions src/Quantum/Quantum.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ title: Quantum
module-version: 0.1.0
subject-prefix: $(service-name)

identity-correction-for-post: true
resourcegroup-append: true
nested-object-to-string: true

# 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"

directive:
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Check$|^CheckViaIdentity$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ Create an in-memory object for Provider.
Create an in-memory object for Provider.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.Provider
Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Provider
.Link
https://learn.microsoft.com/powershell/module/Az.Quantum/new-AzQuantumProviderObject
#>
function New-AzQuantumProviderObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.Provider')]
[Microsoft.Azure.PowerShell.Cmdlets.Quantum.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Provider')]
[CmdletBinding(PositionalBinding=$false)]
Param(

Expand All @@ -40,8 +41,8 @@ function New-AzQuantumProviderObject {
[string]
$InstanceUri,
[Parameter(HelpMessage="Provisioning status field.")]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Quantum.Support.Status])]
[Microsoft.Azure.PowerShell.Cmdlets.Quantum.Support.Status]
[Microsoft.Azure.PowerShell.Cmdlets.Quantum.PSArgumentCompleterAttribute("Succeeded", "Launching", "Updating", "Deleting", "Deleted", "Failed")]
[string]
$ProvisioningState,
[Parameter(HelpMessage="Id to track resource usage for the provider.")]
[string]
Expand All @@ -52,7 +53,7 @@ function New-AzQuantumProviderObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.Provider]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Provider]::New()

if ($PSBoundParameters.ContainsKey('ApplicationName')) {
$Object.ApplicationName = $ApplicationName
Expand All @@ -75,4 +76,3 @@ function New-AzQuantumProviderObject {
return $Object
}
}

6 changes: 3 additions & 3 deletions src/Quantum/Quantum.Autorest/docs/Az.Quantum.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.Quantum
Module Guid: c33ffd08-641a-46a2-8984-f16074447b27
Module Guid: 7532d806-a02e-4287-87ef-54f4c6c45469
Download Help Link: https://learn.microsoft.com/powershell/module/az.quantum
Help Version: 1.0.0.0
Locale: en-US
Expand All @@ -21,7 +21,7 @@ Returns the Workspace resource associated with the given name.
Create an in-memory object for Provider.

### [New-AzQuantumWorkspace](New-AzQuantumWorkspace.md)
Creates or updates a workspace resource.
create a workspace resource.

### [Remove-AzQuantumWorkspace](Remove-AzQuantumWorkspace.md)
Deletes a Workspace resource.
Expand All @@ -30,5 +30,5 @@ Deletes a Workspace resource.
Check the availability of the resource name.

### [Update-AzQuantumWorkspace](Update-AzQuantumWorkspace.md)
Updates an existing workspace's tags.
update an existing workspace's tags.

2 changes: 1 addition & 1 deletion src/Quantum/Quantum.Autorest/docs/Get-AzQuantumOffering.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.IProviderDescription
### Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IProviderDescription

## NOTES

Expand Down
3 changes: 1 addition & 2 deletions src/Quantum/Quantum.Autorest/docs/Get-AzQuantumWorkspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IQuantumIdentity
Expand Down Expand Up @@ -166,7 +165,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.IQuantumWorkspace
### Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IQuantumWorkspace

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Create an in-memory object for Provider.

```
New-AzQuantumProviderObject [-ApplicationName <String>] [-Id <String>] [-InstanceUri <String>]
[-ProvisioningState <Status>] [-ResourceUsageId <String>] [-Sku <String>] [<CommonParameters>]
[-ProvisioningState <String>] [-ResourceUsageId <String>] [-Sku <String>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -86,7 +86,7 @@ Accept wildcard characters: False
Provisioning status field.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Quantum.Support.Status
Type: System.String
Parameter Sets: (All)
Aliases:

Expand Down Expand Up @@ -134,7 +134,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.Provider
### Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Provider

## NOTES

Expand Down
74 changes: 59 additions & 15 deletions src/Quantum/Quantum.Autorest/docs/New-AzQuantumWorkspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,41 @@ schema: 2.0.0
# New-AzQuantumWorkspace

## SYNOPSIS
Creates or updates a workspace resource.
create a workspace resource.

## SYNTAX

### CreateExpanded (Default)
```
New-AzQuantumWorkspace -Name <String> -ResourceGroupName <String> -Location <String>
[-SubscriptionId <String>] [-IdentityType <ResourceIdentityType>] [-Provider <IProvider[]>]
[-SubscriptionId <String>] [-EnableSystemAssignedIdentity] [-Provider <IProvider[]>]
[-StorageAccount <String>] [-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm]
[-WhatIf] [<CommonParameters>]
```

### CreateViaJsonFilePath
```
New-AzQuantumWorkspace -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[<CommonParameters>]
```

### CreateViaJsonString
```
New-AzQuantumWorkspace -Name <String> -ResourceGroupName <String> -JsonString <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[<CommonParameters>]
```

## DESCRIPTION
Creates or updates a workspace resource.
create a workspace resource.

## EXAMPLES

### Example 1: Creates or updates a workspace resource.
```powershell
$object = New-AzQuantumProviderObject -Id "ionq" -Sku "pay-as-you-go-cred"
New-AzQuantumWorkspace -Name azps-qw -ResourceGroupName azps_test_group_quantum -Location eastus -IdentityType 'SystemAssigned' -Provider $object -StorageAccount "/subscriptions/{subId}/resourceGroups/azps_test_group_quantum/providers/Microsoft.Storage/storageAccounts/azpssa"
New-AzQuantumWorkspace -Name azps-qw -ResourceGroupName azps_test_group_quantum -Location eastus -EnableSystemAssignedIdentity -Provider $object -StorageAccount "/subscriptions/{subId}/resourceGroups/azps_test_group_quantum/providers/Microsoft.Storage/storageAccounts/azpssa"
```

```output
Expand Down Expand Up @@ -71,12 +86,12 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -IdentityType
The identity type.
### -EnableSystemAssignedIdentity
Determines whether to enable a system-assigned identity for the resource.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Quantum.Support.ResourceIdentityType
Parameter Sets: (All)
Type: System.Management.Automation.SwitchParameter
Parameter Sets: CreateExpanded
Aliases:

Required: False
Expand All @@ -86,12 +101,42 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -JsonFilePath
Path of Json file supplied to the Create operation

```yaml
Type: System.String
Parameter Sets: CreateViaJsonFilePath
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -JsonString
Json string supplied to the Create operation

```yaml
Type: System.String
Parameter Sets: CreateViaJsonString
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Location
The geo-location where the resource lives

```yaml
Type: System.String
Parameter Sets: (All)
Parameter Sets: CreateExpanded
Aliases:

Required: True
Expand Down Expand Up @@ -133,11 +178,10 @@ Accept wildcard characters: False

### -Provider
List of Providers selected for this Workspace
To construct, see NOTES section for PROVIDER properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.IProvider[]
Parameter Sets: (All)
Type: Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IProvider[]
Parameter Sets: CreateExpanded
Aliases:

Required: False
Expand Down Expand Up @@ -167,7 +211,7 @@ ARM Resource Id of the storage account associated with this workspace.

```yaml
Type: System.String
Parameter Sets: (All)
Parameter Sets: CreateExpanded
Aliases:

Required: False
Expand Down Expand Up @@ -197,7 +241,7 @@ Resource tags.

```yaml
Type: System.Collections.Hashtable
Parameter Sets: (All)
Parameter Sets: CreateExpanded
Aliases:

Required: False
Expand Down Expand Up @@ -245,7 +289,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.IQuantumWorkspace
### Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IQuantumWorkspace

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IQuantumIdentity
Expand Down
Loading