Skip to content

[Az.Purview] Update generation tool version: autorest.powershell v3->v4 #27871

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

Merged
merged 3 commits into from
Jun 12, 2025
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/Purview/Purview.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 - Purview")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.2")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.2.2")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
12 changes: 4 additions & 8 deletions src/Purview/Purview.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,16 @@ input-file:
module-version: 0.1.0
title: Purview
subject-prefix: $(service-name)
identity-correction-for-post: true
nested-object-to-string: true
resourcegroup-append: 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:
# Following is two common directive which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Check$|^CheckViaIdentity$|^CheckViaIdentityExpanded$|^Set$|^AddViaIdentity$|^Add$
variant: ^(Create|Update|Check|Add|Set)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^CheckViaIdentityExpanded$
remove: true
# Remove the set-* cmdlet
- where:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,24 @@ function Add-AzPurviewAccountRootCollectionAdmin {
[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='AddExpanded', Mandatory)]
[Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)]
[Parameter(ParameterSetName='AddViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Path')]
[System.String]
# The name of the account.
${AccountName},

[Parameter(ParameterSetName='AddExpanded', Mandatory)]
[Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)]
[Parameter(ParameterSetName='AddViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Path')]
[System.String]
# The resource group name.
${ResourceGroupName},

[Parameter(ParameterSetName='AddExpanded')]
[Parameter(ParameterSetName='AddViaJsonFilePath')]
[Parameter(ParameterSetName='AddViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
Expand All @@ -73,21 +79,34 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.IPurviewIdentity]
# Identity Parameter
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},

[Parameter(Mandatory)]
[Parameter(ParameterSetName='AddExpanded', Mandatory)]
[Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# Gets or sets the object identifier of the admin.
${ObjectId},

[Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# Path of Json file supplied to the Add operation
${JsonFilePath},

[Parameter(ParameterSetName='AddViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# Json string supplied to the Add operation
${JsonString},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Azure')]
[System.Management.Automation.PSObject]
# The credentials, account, tenant, and subscription used for communication with Azure.
# The DefaultProfile parameter is not functional.
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},

[Parameter(DontShow)]
Expand Down
86 changes: 49 additions & 37 deletions src/Purview/Purview.Autorest/custom/New-AzPurviewAccount.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ PS C:\> {{ Add code here }}
{{ Add output here }}

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.Api20210701.IAccount
Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.IAccount
.Link
https://learn.microsoft.com/powershell/module/az.purview/new-azpurviewaccount
#>
function New-AzPurviewAccount {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.Api20210701.IAccount])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.IAccount])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
Expand All @@ -42,120 +42,132 @@ function New-AzPurviewAccount {
[System.String]
# The name of the account.
${Name},

[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Path')]
[System.String]
# The resource group name.
${ResourceGroupName},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The subscription identifier
${SubscriptionId},

[Parameter(Mandatory)]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Purview.Support.Type])]

[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Support.Type]
# Identity Type
${IdentityType},
[Parameter(Mandatory)]
[System.Management.Automation.SwitchParameter]
# Determines whether to enable a system-assigned identity for the resource.
${EnableSystemAssignedIdentity},

[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# Gets or sets the location.
${Location},
[Parameter()]

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# Gets or sets the managed resource group name
${ManagedResourceGroupName},
[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Purview.Support.PublicNetworkAccess])]

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.PSArgumentCompleterAttribute("NotSpecified", "Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Support.PublicNetworkAccess]
[System.String]
# Gets or sets the public network access.
${PublicNetworkAccess},
[Parameter(Mandatory)]

[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.Int32]
# Gets or sets the sku capacity.
# Possible values include: 4, 16
${SkuCapacity},
[Parameter(Mandatory)]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Purview.Support.Name])]

[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.PSArgumentCompleterAttribute("Standard")]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Support.Name]
[System.String]
# Gets or sets the sku name.
${SkuName},
[Parameter()]

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.Api20210701.ITrackedResourceTags]))]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Tags on the azure resource.
${Tag},


[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# Path of Json file supplied to the Create operation
${JsonFilePath},

[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# Json string supplied to the Create operation
${JsonString},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Azure')]
[System.Management.Automation.PSObject]
# The credentials, account, tenant, and subscription used for communication with Azure.
# The DefaultProfile parameter is not functional.
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Run the command as a job
${AsJob},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Wait for .NET debugger to attach
${Break},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SendAsyncStep[]]
# SendAsync Pipeline Steps to be appended to the front of the pipeline
${HttpPipelineAppend},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SendAsyncStep[]]
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
${HttpPipelinePrepend},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Run the command asynchronously
${NoWait},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Runtime')]
[System.Uri]
# The URI for the proxy server to use
${Proxy},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Runtime')]
[System.Management.Automation.PSCredential]
# Credentials for a proxy server to use for the remote call
${ProxyCredential},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
Expand Down
35 changes: 24 additions & 11 deletions src/Purview/Purview.Autorest/custom/Set-AzPurviewDefaultAccount.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,59 +28,72 @@ PS C:\> {{ Add code here }}
{{ Add output here }}

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.Api20210701.IDefaultAccountPayload
Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.IDefaultAccountPayload
.Link
https://learn.microsoft.com/powershell/module/az.purview/set-azpurviewdefaultaccount
#>
function Set-AzPurviewDefaultAccount {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.Api20210701.IDefaultAccountPayload])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Purview.Models.IDefaultAccountPayload])]
[CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
[Parameter(ParameterSetName='SetExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# The name of the account that is set as the default.
${AccountName},

[Parameter(Mandatory)]
[Parameter(ParameterSetName='SetExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# The resource group name of the account that is set as the default.
${ResourceGroupName},

[Parameter()]
[Parameter(ParameterSetName='SetExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# The scope object ID.
# For example, sub ID or tenant ID.
${Scope},

[Parameter(Mandatory)]
[Parameter(ParameterSetName='SetExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# The scope tenant in which the default account is set.
${ScopeTenantId},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Purview.Support.ScopeType])]
[Parameter(ParameterSetName='SetExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.PSArgumentCompleterAttribute("Tenant", "Subscription")]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Support.ScopeType]
[System.String]
# The scope where the default account is set.
${ScopeType},

[Parameter()]
[Parameter(ParameterSetName='SetExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The subscription ID of the account that is set as the default.
${SubscriptionId},

[Parameter(ParameterSetName='SetViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# Path of Json file supplied to the Set operation
${JsonFilePath},

[Parameter(ParameterSetName='SetViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Body')]
[System.String]
# Json string supplied to the Set operation
${JsonString},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Purview.Category('Azure')]
[System.Management.Automation.PSObject]
# The credentials, account, tenant, and subscription used for communication with Azure.
# The DefaultProfile parameter is not functional.
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},

[Parameter(DontShow)]
Expand Down
Loading