New-AzApiManagementBackendProxy
建立新的後端 Proxy 物件。
Syntax
New-AzApiManagementBackendProxy
-Url <String>
[-ProxyCredential <PSCredential>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
建立新的後端 Proxy 物件,可在建立新的 Backend 實體時使用管線傳送。
範例
範例 1:建立記憶體內部後端 Proxy 物件
$secpassword = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
$proxyCreds = New-Object System.Management.Automation.PSCredential ("foo", $secpassword)
$credential = New-AzApiManagementBackendProxy -Url "http://12.168.1.1:8080" -ProxyCredential $proxyCreds
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
$backend = New-AzApiManagementBackend -Context $apimContext -BackendId 123 -Url 'https://contoso.com/awesomeapi' -Protocol http -Title "first backend" -SkipCertificateChainValidation $true -Proxy $credential -Description "backend with proxy server"
建立後端 Proxy 物件並設定後端
參數
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProxyCredential
用來連線到後端 Proxy 的認證。 這是選擇性參數。
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Url
將呼叫轉送至後端時要使用的 Proxy 伺服器 URL。 此為必要參數。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
輸入
None