New-AzConfidentialLedger

Creates 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>]
   [-Tag <Hashtable>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Creates a Confidential Ledger with the specified ledger parameters.

Examples

Example 1: Create a new Confidential Ledger

New-AzConfidentialLedger `
  -Name test-ledger `
  -ResourceGroupName rg-000 `
  -SubscriptionId 00000000-0000-0000-0000-000000000000 `
  -AadBasedSecurityPrincipal `
      @{
          LedgerRoleName="Administrator";
          PrincipalId="34621747-6fc8-4771-a2eb-72f31c461f2e";
          TenantId="bce123b9-2b7b-4975-8360-5ca0b9b1cd08"
      } `
  -CertBasedSecurityPrincipal `
      @{
          Cert="-----BEGIN CERTIFICATE-----********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************-----END CERTIFICATE-----";
          LedgerRoleName="Reader"
      } `
  -LedgerType Public `
  -Location eastus `
  -Tag @{Location="additional properties 0"}

Location Name
eastus   test-ledger

Creates a new Confidential Ledger.

Example 2: Create Using Security Principal Objects

$aadSecurityPrincipal = New-AzConfidentialLedgerAADBasedSecurityPrincipalObject `
  -LedgerRoleName "Administrator" `
  -PrincipalId "34621747-6fc8-4771-a2eb-72f31c461f2e" `
  -TenantId "bce123b9-2b7b-4975-8360-5ca0b9b1cd08"

$certSecurityPrincipal = New-AzConfidentialLedgerCertBasedSecurityPrincipalObject `
  -Cert "-----BEGIN CERTIFICATE-----********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************-----END CERTIFICATE-----" `
  -LedgerRoleName "Reader"

New-AzConfidentialLedger `
  -Name test-ledger `
  -ResourceGroupName rg-000 `
  -SubscriptionId 00000000-0000-0000-0000-000000000000 `
  -AadBasedSecurityPrincipal $aadSecurityPrincipal `
  -CertBasedSecurityPrincipal $certSecurityPrincipal `
  -LedgerType Public `
  -Location eastus `
  -Tag @{Location="additional properties 0"}

Location Name
eastus   test-ledger

Creates a new Confidential Ledger using objects for AadBasedSecurityPrincipal and CertBasedSecurityPrincipal.

Parameters

-AadBasedSecurityPrincipal

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

Type:IAadBasedSecurityPrincipal[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

Run the command as a job

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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.

Type:ICertBasedSecurityPrincipal[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LedgerType

Type of Confidential Ledger

Type:LedgerType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

The Azure location where the Confidential Ledger is running.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the Confidential Ledger

Type:String
Aliases:LedgerName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group.

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

-SubscriptionId

The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tag

Additional tags for Confidential Ledger

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IConfidentialLedger

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

AADBASEDSECURITYPRINCIPAL <IAadBasedSecurityPrincipal[]>: Array of all AAD based Security Principals.

  • [LedgerRoleName <LedgerRoleName?>]: LedgerRole associated with the Security Principal of Ledger
  • [PrincipalId <String>]: UUID/GUID based Principal Id of the Security Principal
  • [TenantId <String>]: UUID/GUID based Tenant Id of the Security Principal

CERTBASEDSECURITYPRINCIPAL <ICertBasedSecurityPrincipal[]>: Array of all cert based Security Principals.

  • [Cert <String>]: Public key of the user cert (.pem or .cer)
  • [LedgerRoleName <LedgerRoleName?>]: LedgerRole associated with the Security Principal of Ledger