Test-AzConfidentialLedgerNameAvailability

To check whether a resource name is available.

Syntax

Test-AzConfidentialLedgerNameAvailability
    [-SubscriptionId <String>]
    [-Name <String>]
    [-Type <String>]
    [-DefaultProfile <PSObject>]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

Description

To check whether a resource name is available.

Examples

Example 1: Name is available

Test-AzConfidentialLedgerNameAvailability `
  -Name "available-name" `
  -Type "Microsoft.ConfidentialLedger/ledgers"

Message       :
NameAvailable : True
Reason        :

Checks to see if the specified Confidential Ledger name is available. In this case, the name is available. Confidential Ledger names must be globally unique.

Example 2: Name is not available

Test-AzConfidentialLedgerNameAvailability `
  -Name "not-available-name" `
  -Type "Microsoft.ConfidentialLedger/ledgers"

Message       : Resource name already exists
NameAvailable : False
Reason        : AlreadyExists

Checks to see if the specified Confidential Ledger name is available. In this case, the name is not available. Confidential Ledger names must be globally unique.

Parameters

-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

-Name

The name of the resource for which availability needs to be checked.

Type:String
Position:Named
Default value:None
Required:False
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

-Type

The resource type.

Type:String
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

ICheckNameAvailabilityResponse

Notes

ALIASES