你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Test-AzLogicApp

Validates a logic app definition.

Syntax

Test-AzLogicApp
    -ResourceGroupName <String>
    -Name <String>
    -Location <String>
    [-State <String>]
    [-Definition <Object>]
    [-IntegrationAccountId <String>]
    [-Parameters <Object>]
    [-ParameterFilePath <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]
Test-AzLogicApp
    -ResourceGroupName <String>
    -Name <String>
    -Location <String>
    [-State <String>]
    [-DefinitionFilePath <String>]
    [-IntegrationAccountId <String>]
    [-Parameters <Object>]
    [-ParameterFilePath <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Test-AzLogicApp cmdlet validates a logic app definition in a resource group. Specify the logic app name, resource group name, location, state, integration account ID, or parameters. This module supports dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples

Example 1: Validate a logic app by using file paths

Test-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp01" -Location "westus" -State "Enabled" -DefinitionFilePath "d:\workflows\Definition.json" -ParameterFilePath "d:\workflows\Parameters.json"

This command validates a logic app named LogicApp01 in the specified resource group. The command specifies definition and parameter file paths.

Example 2: Validate a logic app by using objects

Test-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp01" -Location "westus" -State "Enabled" -Definition ([IO.File]::ReadAllText("d:\Workflows\Definition.json")) -Parameters @{name1="value1";name2="value2"}

This command validates a logic app named LogicApp01 in the specified resource group. The command specifies definition and parameter objects.

Example 3

Validates a logic app definition. (autogenerated)

Test-AzLogicApp -DefinitionFilePath 'd:\workflows\Definition.json' -IntegrationAccountId <String> -Location 'westus' -Name 'LogicApp01' -ParameterFilePath 'd:\workflows\Parameters.json' -ResourceGroupName 'ResourceGroup11'

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Definition

Specifies the definition of a logic app as an object or a string in JavaScript Object Notation (JSON) format.

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

-DefinitionFilePath

Specifies the definition of your logic app as the path of a definition file in JSON format.

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

-IntegrationAccountId

Specifies an integration account ID for the logic app.

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

-Location

Specifies the location of the logic app. Enter an Azure data center location, such as West US or Southeast Asia. You can place a logic app in any location.

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

-Name

Specifies the name of the logic app.

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

-ParameterFilePath

Specifies the path of a JSON formatted parameter file.

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

-Parameters

Specifies a parameters collection object of the logic app. Specify a hash table, Dictionary<string>, or Dictionary<string, WorkflowParameter>.

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

-ResourceGroupName

Specifies the name of a resource group.

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

-State

Specifies a state of the logic app. The acceptable values for this parameter are: Enabled and Disabled.

Type:String
Accepted values:Enabled, Disabled
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

Void