Skip to content

[Az.ConfidentialLedger] Update generation tool version: autorest.powers… #28218

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

Draft
wants to merge 1 commit 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
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 - ConfidentialLedger")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.1.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
37 changes: 21 additions & 16 deletions src/ConfidentialLedger/ConfidentialLedger.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,39 @@ module-version: 1.0.0
title: ConfidentialLedger
subject-prefix: $(service-name)

# If there are post APIs for some kinds of actions in the RP, you may need to
# uncomment following line to support viaIdentity for these post APIs
# identity-correction-for-post: 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:
- from: swagger-document
where: $.definitions.ResourceLocation.properties.location
transform: >-
return {
"description": "The Azure location where the Confidential Ledger is running.",
"type": "string",
"x-ms-mutability": [
"create",
"read",
"update"
]
}
# 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$
variant: ^(Create|Update|Check)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^CheckViaIdentityExpanded$
remove: true
# Remove the set-* cmdlet
- where:
verb: Set
remove: true
- where: # Only generate one version of CheckNameAvailability
verb: Test
variant: ^Check$|^CheckViaIdentity$|^CheckViaIdentityExpanded$
remove: true
- where: # Hide auto-generated Update since we implement a custom one requiring the 'Location' parameter.
verb: Update
Subject: Ledger
hide: true
- model-cmdlet: # Generate objects for common models.
- AADBasedSecurityPrincipal
- CertBasedSecurityPrincipal
- model-cmdlet:
- model-name: AADBasedSecurityPrincipal
cmdlet-name: New-AzConfidentialLedgerAADBasedSecurityPrincipalObject
- model-name: CertBasedSecurityPrincipal
cmdlet-name: New-AzConfidentialLedgerCertBasedSecurityPrincipalObject
```
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,29 @@ INPUTOBJECT <IConfidentialLedgerIdentity>: Identity Parameter
https://learn.microsoft.com/powershell/module/az.confidentialledger/update-azconfidentialledger
#>
function Update-AzConfidentialLedger {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.IConfidentialLedger])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.IConfidentialLedger])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
[Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
[Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Alias('LedgerName')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Path')]
[System.String]
# Name of the Confidential Ledger
${Name},

[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
[Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
[Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Path')]
[System.String]
# The name of the resource group.
${ResourceGroupName},

[Parameter(ParameterSetName='UpdateExpanded')]
[Parameter(ParameterSetName='UpdateViaJsonFilePath')]
[Parameter(ParameterSetName='UpdateViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
Expand All @@ -102,51 +108,66 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.IConfidentialLedgerIdentity]
# Identity Parameter
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},

[Parameter()]
[Parameter(ParameterSetName='UpdateExpanded')]
[Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.IAadBasedSecurityPrincipal[]]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.IAadBasedSecurityPrincipal[]]
# Array of all AAD based Security Principals.
# To construct, see NOTES section for AADBASEDSECURITYPRINCIPAL properties and create a hash table.
${AadBasedSecurityPrincipal},

[Parameter()]
[Parameter(ParameterSetName='UpdateExpanded')]
[Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.ICertBasedSecurityPrincipal[]]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.ICertBasedSecurityPrincipal[]]
# Array of all cert based Security Principals.
# To construct, see NOTES section for CERTBASEDSECURITYPRINCIPAL properties and create a hash table.
${CertBasedSecurityPrincipal},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Support.LedgerType])]
[Parameter(ParameterSetName='UpdateExpanded')]
[Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.PSArgumentCompleterAttribute("Unknown", "Public", "Private")]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Support.LedgerType]
[System.String]
# Type of Confidential Ledger
${LedgerType},

[Parameter(Mandatory)]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
[Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Body')]
[System.String]
# The Azure location where the Confidential Ledger is running.
${Location},

[Parameter()]
[Parameter(ParameterSetName='UpdateExpanded')]
[Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.ITags]))]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.ITags]))]
[System.Collections.Hashtable]
# Additional tags for Confidential Ledger
${Tag},

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

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

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.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()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ Create an in-memory object for AADBasedSecurityPrincipal.
Create an in-memory object for AADBasedSecurityPrincipal.

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

[Parameter(HelpMessage="LedgerRole associated with the Security Principal of Ledger.")]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Support.LedgerRoleName])]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Support.LedgerRoleName]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.PSArgumentCompleterAttribute("Reader", "Contributor", "Administrator")]
[string]
$LedgerRoleName,
[Parameter(HelpMessage="UUID/GUID based Principal Id of the Security Principal.")]
[string]
Expand All @@ -43,7 +44,7 @@ function New-AzConfidentialLedgerAADBasedSecurityPrincipalObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.AADBasedSecurityPrincipal]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.AADBasedSecurityPrincipal]::New()

if ($PSBoundParameters.ContainsKey('LedgerRoleName')) {
$Object.LedgerRoleName = $LedgerRoleName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,27 @@ Create an in-memory object for CertBasedSecurityPrincipal.
Create an in-memory object for CertBasedSecurityPrincipal.

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

[Parameter(HelpMessage="Public key of the user cert (.pem or .cer).")]
[string]
$Cert,
[Parameter(HelpMessage="LedgerRole associated with the Security Principal of Ledger.")]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Support.LedgerRoleName])]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Support.LedgerRoleName]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.PSArgumentCompleterAttribute("Reader", "Contributor", "Administrator")]
[string]
$LedgerRoleName
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.CertBasedSecurityPrincipal]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.CertBasedSecurityPrincipal]::New()

if ($PSBoundParameters.ContainsKey('Cert')) {
$Object.Cert = $Cert
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.ConfidentialLedger
Module Guid: c7eaa9c1-72c4-4251-9e7d-bf9b8e8fa71e
Module Guid: 1789b444-0978-48ab-a110-b9ece68b5ec8
Download Help Link: https://learn.microsoft.com/powershell/module/az.confidentialledger
Help Version: 1.0.0.0
Locale: en-US
Expand All @@ -15,7 +15,7 @@ Microsoft Azure PowerShell: ConfidentialLedger cmdlets
Retrieves the properties of a Confidential Ledger.

### [New-AzConfidentialLedger](New-AzConfidentialLedger.md)
Creates a Confidential Ledger with the specified ledger parameters.
Create a Confidential Ledger with the specified ledger parameters.

### [New-AzConfidentialLedgerAADBasedSecurityPrincipalObject](New-AzConfidentialLedgerAADBasedSecurityPrincipalObject.md)
Create an in-memory object for AADBasedSecurityPrincipal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,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.ConfidentialLedger.Models.IConfidentialLedgerIdentity
Expand Down Expand Up @@ -177,7 +176,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.IConfidentialLedger
### Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.IConfidentialLedger

## NOTES

Expand Down
Loading
Loading