Skip to content
Merged
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/Portal/Portal.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 - Portal")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.3.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.3.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
8 changes: 2 additions & 6 deletions src/Portal/Portal.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ module-version: 0.1.0
title: Portal
subject-prefix: $(service-name)

# 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:
verb: Set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the guide to migrate directives below.

  - where:
      verb: New
      subject: Dashboard
      variant: CreateViaIdentity|CreateViaIdentityExpanded
    remove: true
  - where:
      verb: Update
      subject: Dashboard
      variant: ^Update$|^UpdateViaIdentity$
    remove: true

Expand All @@ -66,12 +62,12 @@ directive:
- where:
verb: New
subject: Dashboard
variant: CreateViaIdentity|CreateViaIdentityExpanded
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
remove: true
- where:
verb: Update
subject: Dashboard
variant: ^Update$|^UpdateViaIdentity$
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- from: swagger-document
where: $.definitions.DashboardPropertiesWithProvisioningState.properties.metadata
Expand Down
4 changes: 2 additions & 2 deletions src/Portal/Portal.Autorest/custom/New-AzPortalDashboard.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


function New-AzPortalDashboard {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboard])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboard])]
[CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='CreateByFile', Mandatory)]
Expand Down Expand Up @@ -112,7 +112,7 @@ begin {
if (Test-Path $dashboardPath)
{
$content = (Get-content -Path $dashboardPath)
$deserializedContent = [Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.Dashboard]::FromJsonString($content)
$deserializedContent = [Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Dashboard]::FromJsonString($content)
$PSBoundParameters.Remove('DashboardPath') | Out-Null
$PSBoundParameters.Add('Resource', $deserializedContent) | Out-Null
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
Expand Down
4 changes: 2 additions & 2 deletions src/Portal/Portal.Autorest/custom/Set-AzPortalDashboard.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


function Set-AzPortalDashboard {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboard])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboard])]
[CmdletBinding(SupportsShouldProcess, PositionalBinding=$false, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Portal.Description("Creates or updates a Dashboard.")]
param(
Expand Down Expand Up @@ -112,7 +112,7 @@ begin {
if (Test-Path $dashboardPath)
{
$content = (Get-content -Path $dashboardPath)
$deserializedContent = [Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.Dashboard]::FromJsonString($content)
$deserializedContent = [Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Dashboard]::FromJsonString($content)
$PSBoundParameters.Remove('DashboardPath') | Out-Null
$PSBoundParameters.Add('Resource', $deserializedContent) | Out-Null
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
Expand Down
6 changes: 3 additions & 3 deletions src/Portal/Portal.Autorest/docs/Az.Portal.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.Portal
Module Guid: abd8c13e-6209-4e5a-a276-61e7a80845f9
Module Guid: 31aca27a-d75c-4e24-9a57-ed8c410db168
Download Help Link: https://learn.microsoft.com/powershell/module/az.portal
Help Version: 1.0.0.0
Locale: en-US
Expand All @@ -15,7 +15,7 @@ Microsoft Azure PowerShell: Portal Dashboard cmdlets
Gets the Dashboard.

### [New-AzPortalDashboard](New-AzPortalDashboard.md)
Creates or updates a Dashboard.
create a Dashboard.

### [Remove-AzPortalDashboard](Remove-AzPortalDashboard.md)
Deletes the Dashboard.
Expand All @@ -24,5 +24,5 @@ Deletes the Dashboard.
Creates or updates a Dashboard.

### [Update-AzPortalDashboard](Update-AzPortalDashboard.md)
Updates an existing Dashboard.
update an existing Dashboard.

3 changes: 1 addition & 2 deletions src/Portal/Portal.Autorest/docs/Get-AzPortalDashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,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.Portal.Models.IPortalIdentity
Expand Down Expand Up @@ -156,7 +155,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboard
### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboard

## NOTES

Expand Down
56 changes: 48 additions & 8 deletions src/Portal/Portal.Autorest/docs/New-AzPortalDashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzPortalDashboard

## SYNOPSIS
Creates or updates a Dashboard.
create a Dashboard.

## SYNTAX

Expand All @@ -31,8 +31,20 @@ New-AzPortalDashboard -Name <String> -ResourceGroupName <String> -DashboardPath
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

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

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

## DESCRIPTION
Creates or updates a Dashboard.
create a Dashboard.

## EXAMPLES

Expand Down Expand Up @@ -83,12 +95,41 @@ 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
```

### -Lens
The dashboard lenses.
To construct, see NOTES section for LENS properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboardLens[]
Type: Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboardLens[]
Parameter Sets: CreateExpanded
Aliases:

Expand Down Expand Up @@ -146,10 +187,9 @@ Accept wildcard characters: False

### -Resource
The shared dashboard resource definition.
To construct, see NOTES section for RESOURCE properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboard
Type: Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboard
Parameter Sets: Create
Aliases:

Expand Down Expand Up @@ -243,11 +283,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## INPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboard
### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboard

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboard
### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboard

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,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.Portal.Models.IPortalIdentity
Expand Down
2 changes: 1 addition & 1 deletion src/Portal/Portal.Autorest/docs/Set-AzPortalDashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboard
### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboard

## NOTES

Expand Down
64 changes: 52 additions & 12 deletions src/Portal/Portal.Autorest/docs/Update-AzPortalDashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# Update-AzPortalDashboard

## SYNOPSIS
Updates an existing Dashboard.
update an existing Dashboard.

## SYNTAX

Expand All @@ -25,8 +25,20 @@ Update-AzPortalDashboard -InputObject <IPortalIdentity> [-Lens <IDashboardLens[]
[-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpdateViaJsonFilePath
```
Update-AzPortalDashboard -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpdateViaJsonString
```
Update-AzPortalDashboard -Name <String> -ResourceGroupName <String> -JsonString <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

## DESCRIPTION
Updates an existing Dashboard.
update an existing Dashboard.

## EXAMPLES

Expand Down Expand Up @@ -78,7 +90,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.Portal.Models.IPortalIdentity
Expand All @@ -92,13 +103,42 @@ Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

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

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

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

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

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

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

### -Lens
The dashboard lenses.
To construct, see NOTES section for LENS properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboardLens[]
Parameter Sets: (All)
Type: Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboardLens[]
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:

Required: False
Expand All @@ -113,7 +153,7 @@ The dashboard metadata.

```yaml
Type: System.Collections.Hashtable
Parameter Sets: (All)
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:

Required: False
Expand All @@ -128,7 +168,7 @@ The name of the dashboard.

```yaml
Type: System.String
Parameter Sets: UpdateExpanded
Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString
Aliases: DashboardName

Required: True
Expand All @@ -144,7 +184,7 @@ The name is case insensitive.

```yaml
Type: System.String
Parameter Sets: UpdateExpanded
Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString
Aliases:

Required: True
Expand All @@ -160,7 +200,7 @@ The value must be an UUID.

```yaml
Type: System.String
Parameter Sets: UpdateExpanded
Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString
Aliases:

Required: False
Expand All @@ -175,7 +215,7 @@ Resource tags

```yaml
Type: System.Collections.Hashtable
Parameter Sets: (All)
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:

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

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api20221201Preview.IDashboard
### Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.IDashboard

## NOTES

Expand Down
2 changes: 1 addition & 1 deletion src/Portal/Portal.Autorest/generate-info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "351efe1a-d585-4289-9408-d9c07e8ef900"
"generate_Id": "aaee2442-a92f-4fe2-abbc-96ce6b74ab42"
}
Loading