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
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
[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.Reflection.AssemblyFileVersionAttribute("1.1.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.1.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

53 changes: 21 additions & 32 deletions src/ConfidentialLedger/ConfidentialLedger.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,50 +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))
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

- where:
verb: Get|New
subject: Ledger
set:
breaking-change:
deprecated-output-properties:
- AadBasedSecurityPrincipal
- CertBasedSecurityPrincipal
new-output-properties:
- AadBasedSecurityPrincipal
- CertBasedSecurityPrincipal
change-description: The type of property 'AadBasedSecurityPrincipal', 'CertBasedSecurityPrincipal' will be changed from single object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- 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,8 +73,7 @@ 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])]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.IConfidentialLedger", "15.0.0", "9.0.0", "2025/11/03", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.IConfidentialLedger", DeprecatedOutputProperties = ("AadBasedSecurityPrincipal Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.IAadBasedSecurityPrincipal", "CertBasedSecurityPrincipal Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.ICertBasedSecurityPrincipal"), NewOutputProperties = ("AadBasedSecurityPrincipal System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.IAadBasedSecurityPrincipal]", "CertBasedSecurityPrincipal System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.ICertBasedSecurityPrincipal]"))]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.IConfidentialLedger])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
Expand Down Expand Up @@ -103,29 +102,26 @@ 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()]
[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()]
[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])]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.PSArgumentCompleterAttribute("Unknown", "Public", "Private")]
Copy link
Member

Choose a reason for hiding this comment

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

Just curious. Why are enum changed to strings? E.g. LedgerType and LedgerRoleName

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a tool-level modification, and nothing will change for the user in terms of how and what they enter.

[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Support.LedgerType]
[System.String]
# Type of Confidential Ledger
${LedgerType},

Expand All @@ -137,7 +133,7 @@ param(

[Parameter()]
[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},
Expand All @@ -147,7 +143,8 @@ param(
[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: 2c3b46ee-4d07-486a-8677-2a7833ee933a
Module Guid: d8c2bac9-30d1-4c51-9b69-554251914080
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ schema: 2.0.0
# New-AzConfidentialLedger

## SYNOPSIS
Creates a Confidential Ledger with the specified ledger parameters.
Create a Confidential Ledger with the specified ledger parameters.

## SYNTAX

```
New-AzConfidentialLedger -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>]
[-AadBasedSecurityPrincipal <IAadBasedSecurityPrincipal[]>]
[-CertBasedSecurityPrincipal <ICertBasedSecurityPrincipal[]>] [-LedgerType <LedgerType>] [-Location <String>]
[-CertBasedSecurityPrincipal <ICertBasedSecurityPrincipal[]>] [-LedgerType <String>] [-Location <String>]
[-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

## DESCRIPTION
Creates a Confidential Ledger with the specified ledger parameters.
Create a Confidential Ledger with the specified ledger parameters.

## EXAMPLES

Expand Down Expand Up @@ -86,10 +86,9 @@ Creates a new Confidential Ledger using objects for `AadBasedSecurityPrincipal`

### -AadBasedSecurityPrincipal
Array of all AAD based Security Principals.
To construct, see NOTES section for AADBASEDSECURITYPRINCIPAL properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.IAadBasedSecurityPrincipal[]
Type: Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.IAadBasedSecurityPrincipal[]
Parameter Sets: (All)
Aliases:

Expand Down Expand Up @@ -117,10 +116,9 @@ Accept wildcard characters: False
### -CertBasedSecurityPrincipal
Array of all cert based Security Principals.
To construct, see NOTES section for CERTBASEDSECURITYPRINCIPAL properties and create a hash table.
```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.ICertBasedSecurityPrincipal[]
Type: Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.ICertBasedSecurityPrincipal[]
Parameter Sets: (All)
Aliases:

Expand Down Expand Up @@ -151,7 +149,7 @@ Accept wildcard characters: False
Type of Confidential Ledger
```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Support.LedgerType
Type: System.String
Parameter Sets: (All)
Aliases:

Expand Down Expand Up @@ -292,7 +290,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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.ConfidentialLedger
online version: https://learn.microsoft.com/powershell/module/Az.ConfidentialLedger/new-AzConfidentialLedgerAADBasedSecurityPrincipalObject
online version: https://learn.microsoft.com/powershell/module/Az.ConfidentialLedger/new-azconfidentialledgeraadbasedsecurityprincipalobject
schema: 2.0.0
---

Expand All @@ -13,8 +13,8 @@ Create an in-memory object for AADBasedSecurityPrincipal.
## SYNTAX

```
New-AzConfidentialLedgerAADBasedSecurityPrincipalObject [-LedgerRoleName <LedgerRoleName>]
[-PrincipalId <String>] [-TenantId <String>] [<CommonParameters>]
New-AzConfidentialLedgerAADBasedSecurityPrincipalObject [-LedgerRoleName <String>] [-PrincipalId <String>]
[-TenantId <String>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -44,7 +44,7 @@ Creates an AadBasedSecurityPrincipalObject that may be used for `Az.Confidential
LedgerRole associated with the Security Principal of Ledger.

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

Expand Down Expand Up @@ -92,7 +92,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.AadBasedSecurityPrincipal
### Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.AadBasedSecurityPrincipal
## NOTES
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.ConfidentialLedger
online version: https://learn.microsoft.com/powershell/module/Az.ConfidentialLedger/new-AzConfidentialLedgerCertBasedSecurityPrincipalObject
online version: https://learn.microsoft.com/powershell/module/Az.ConfidentialLedger/new-azconfidentialledgercertbasedsecurityprincipalobject
schema: 2.0.0
---

Expand All @@ -13,7 +13,7 @@ Create an in-memory object for CertBasedSecurityPrincipal.
## SYNTAX

```
New-AzConfidentialLedgerCertBasedSecurityPrincipalObject [-Cert <String>] [-LedgerRoleName <LedgerRoleName>]
New-AzConfidentialLedgerCertBasedSecurityPrincipalObject [-Cert <String>] [-LedgerRoleName <String>]
[<CommonParameters>]
```

Expand Down Expand Up @@ -58,7 +58,7 @@ Accept wildcard characters: False
LedgerRole associated with the Security Principal of Ledger.

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

Expand All @@ -76,7 +76,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

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

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,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
Loading