Compartilhar via


Get-AzApplicationInsightsWebTest

Obtenha uma definição de teste da Web do Application Insights específica.

Sintaxe

Get-AzApplicationInsightsWebTest
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzApplicationInsightsWebTest
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzApplicationInsightsWebTest
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   -AppInsightsName <String>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzApplicationInsightsWebTest
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzApplicationInsightsWebTest
   -InputObject <IApplicationInsightsIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

Obtenha uma definição de teste da Web do Application Insights específica.

Exemplos

Exemplo 1: listar todos os testes web do Application Insights em uma assinatura

Get-AzApplicationInsightsWebTest

Name                                 Location WebTestKind ResourceGroupName
----                                 -------- ----------- -----------------
bsaic-portal-appinsights-portal01    westus2  ping        azpwsh-rg-test
basic-portal02-appinsights-portal01  westus2  ping        azpwsh-rg-test
basic-portal03-appinsights-portal01  westus2  ping        azpwsh-rg-test
standard-portal-appinsights-portal01 westus2  standard    azpwsh-rg-test
standard-pwsh01                      westus2  standard    azpwsh-rg-test

Esse comando lista todos os testes web do Application Insights em uma assinatura.

Exemplo 2: listar todos os testes web do Application Insights em um grupo de recursos

Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test

Name                                 Location WebTestKind ResourceGroupName
----                                 -------- ----------- -----------------
bsaic-portal-appinsights-portal01    westus2  ping        azpwsh-rg-test
basic-portal02-appinsights-portal01  westus2  ping        azpwsh-rg-test
basic-portal03-appinsights-portal01  westus2  ping        azpwsh-rg-test
standard-portal-appinsights-portal01 westus2  standard    azpwsh-rg-test
standard-pwsh01                      westus2  standard    azpwsh-rg-test

Esse comando lista todos os testes web do Application Insights em um grupo de recursos.

Exemplo 3: listar todos os testes web do Application Insights em um Application Insights específico

Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -AppInsightsName appinsights-portal01

Name                                 Location WebTestKind ResourceGroupName   Enabled
----                                 -------- ----------- -----------------   -------
bsaic-portal-appinsights-portal01    westus2  ping        azpwsh-rg-test      True
basic-portal02-appinsights-portal01  westus2  ping        azpwsh-rg-test      True
basic-portal03-appinsights-portal01  westus2  ping        azpwsh-rg-test      True
standard-portal-appinsights-portal01 westus2  standard    azpwsh-rg-test      True
standard-pwsh01                      westus2  standard    azpwsh-rg-test      True

Esse comando lista todos os testes web do Application Insights em um Application Insights específico.

Exemplo 4: Obter uma definição de teste da Web do Application Insights específica

Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -Name standard-pwsh01

Name            Location WebTestKind ResourceGroupName  Enabled
----            -------- ----------- -----------------  -------
standard-pwsh01 westus2  standard    azpwsh-rg-test     True

Esse comando obtém uma definição de teste da Web do Application Insights específica.

Exemplo 5: Obter uma definição de teste web do Application Insights específica por pipeline

$location01 = New-AzApplicationInsightsWebTestGeolocationObject -Location "emea-nl-ams-azr"
$location02 = New-AzApplicationInsightsWebTestGeolocationObject -Location "us-ca-sjc-azr"
New-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -Name standardwebtestpwsh03 -Location 'westus2' `
-Tag @{"hidden-link:/subscriptions/xxxxxxxxxx-xxxx-xxxxx-xxxxxxxxxxxx/resourceGroups/azpwsh-rg-test/providers/microsoft.insights/components/appinsightsportal01" = "Resource"} `
-RequestUrl "https://learn.microsoft.com/" -RequestHttpVerb "GET" `
-TestName 'standardwebtestpwsh03' `
-RuleSslCheck -RuleSslCertRemainingLifetimeCheck 7 -RuleExpectedHttpStatusCode 200 `
-Enabled -Frequency 300 -Timeout 120 -Kind "standard" -RetryEnabled -GeoLocation $location01, $location02 ` |Get-AzApplicationInsightsWebTest

Name                    Location WebTestKind ResourceGroupName  Enabled
----                    -------- ----------- -----------------  -------
standardwebtestpwsh03   westus2  standard    azpwsh-rg-test     True

Esse comando obtém uma definição de teste web do Application Insights específica por pipeline.

Parâmetros

-AppInsightsName

O nome do recurso de componente do Application Insights.

Tipo:String
Cargo:Named
Valor padrão:None
Obrigatório:True
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-DefaultProfile

O parâmetro DefaultProfile não está funcional. Use o parâmetro SubscriptionId quando disponível se estiver executando o cmdlet em uma assinatura diferente.

Tipo:PSObject
Aliases:AzureRMContext, AzureCredential
Cargo:Named
Valor padrão:None
Obrigatório:False
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-InputObject

Parâmetro de identidade Para construir, consulte a seção NOTES para propriedades INPUTOBJECT e crie uma tabela de hash.

Tipo:IApplicationInsightsIdentity
Cargo:Named
Valor padrão:None
Obrigatório:True
Aceitar a entrada de pipeline:True
Aceitar caracteres curinga:False

-Name

O nome do recurso WebTest do Application Insights.

Tipo:String
Aliases:WebTestName
Cargo:Named
Valor padrão:None
Obrigatório:True
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-ResourceGroupName

O nome do grupo de recursos. O nome não diferencia maiúsculas de minúsculas.

Tipo:String
Cargo:Named
Valor padrão:None
Obrigatório:True
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-SubscriptionId

A ID da assinatura de destino.

Tipo:String[]
Cargo:Named
Valor padrão:(Get-AzContext).Subscription.Id
Obrigatório:False
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

Entradas

IApplicationInsightsIdentity

Saídas

IWebTest