Editar

Compartilhar via


Test-AzSupportTicketNameAvailability

Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription.

Syntax

Test-AzSupportTicketNameAvailability
    [-SubscriptionId <String>]
    -Name <String>
    -Type <String>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Test-AzSupportTicketNameAvailability
    [-SubscriptionId <String>]
    -CheckNameAvailabilityInput <ICheckNameAvailabilityInput>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Test-AzSupportTicketNameAvailability
    [-SubscriptionId <String>]
    -JsonFilePath <String>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Test-AzSupportTicketNameAvailability
    [-SubscriptionId <String>]
    -JsonString <String>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription.

Examples

Example 1: Check support ticket friendly name availability

Test-AzSupportTicketNameAvailability -Name "testSupportTicketName" -Type "Microsoft.Support/supportTickets"

Message NameAvailable Reason
------- ------------- ------
                 True

Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. If the provided type is neither Microsoft.Support/supportTickets nor Microsoft.Support/fileWorkspaces, then it will default to Microsoft.Support/supportTickets.

Example 2: Check file workspace friendly name availability

Test-AzSupportTicketNameAvailability -Name "testFileWorkspaceName" -Type "Microsoft.Support/fileWorkspaces"

Message NameAvailable Reason
------- ------------- ------
                 True

Check the availability of a resource name. This API should be used to check the uniqueness of the name for file workspace creation for the selected subscription. If the provided type is neither Microsoft.Support/supportTickets nor Microsoft.Support/fileWorkspaces, then it will default to Microsoft.Support/supportTickets.

Parameters

-CheckNameAvailabilityInput

Input of CheckNameAvailability API.

Type:ICheckNameAvailabilityInput
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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 DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

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

-JsonFilePath

Path of Json file supplied to the Check operation

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

-JsonString

Json string supplied to the Check operation

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

-Name

The resource name to validate.

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

-SubscriptionId

The ID of the target subscription. The value must be an UUID.

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

-Type

The type of resource.

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

Inputs

ICheckNameAvailabilityInput

Outputs

ICheckNameAvailabilityOutput