共用方式為


Update-AzContainerAppSourceControl

更新容器應用程式的SourceControl。

語法

Update-AzContainerAppSourceControl
      -ContainerAppName <String>
      -Name <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      [-AzureClientId <String>]
      [-AzureClientSecret <SecureString>]
      [-AzureKind <String>]
      [-AzureSubscriptionId <String>]
      [-AzureTenantId <String>]
      [-Branch <String>]
      [-GithubAccessToken <SecureString>]
      [-GithubConfigurationImage <String>]
      [-GithubContextPath <String>]
      [-GithubOS <String>]
      [-GithubPublishType <String>]
      [-GithubRuntimeStack <String>]
      [-GithubRuntimeVersion <String>]
      [-RegistryPassword <SecureString>]
      [-RegistryUrl <String>]
      [-RegistryUserName <String>]
      [-RepoUrl <String>]
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzContainerAppSourceControl
      -Name <String>
      -ContainerAppInputObject <IAppIdentity>
      [-AzureClientId <String>]
      [-AzureClientSecret <SecureString>]
      [-AzureKind <String>]
      [-AzureSubscriptionId <String>]
      [-AzureTenantId <String>]
      [-Branch <String>]
      [-GithubAccessToken <SecureString>]
      [-GithubConfigurationImage <String>]
      [-GithubContextPath <String>]
      [-GithubOS <String>]
      [-GithubPublishType <String>]
      [-GithubRuntimeStack <String>]
      [-GithubRuntimeVersion <String>]
      [-RegistryPassword <SecureString>]
      [-RegistryUrl <String>]
      [-RegistryUserName <String>]
      [-RepoUrl <String>]
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzContainerAppSourceControl
      -InputObject <IAppIdentity>
      [-AzureClientId <String>]
      [-AzureClientSecret <SecureString>]
      [-AzureKind <String>]
      [-AzureSubscriptionId <String>]
      [-AzureTenantId <String>]
      [-Branch <String>]
      [-GithubAccessToken <SecureString>]
      [-GithubConfigurationImage <String>]
      [-GithubContextPath <String>]
      [-GithubOS <String>]
      [-GithubPublishType <String>]
      [-GithubRuntimeStack <String>]
      [-GithubRuntimeVersion <String>]
      [-RegistryPassword <SecureString>]
      [-RegistryUrl <String>]
      [-RegistryUserName <String>]
      [-RepoUrl <String>]
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

更新容器應用程式的SourceControl。

範例

範例 1:更新容器應用程式的原始檔控制。

$AzureClientSecret = ConvertTo-SecureString -String "****" -AsPlainText -Force
$RegistryPassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
$GithubAccessToken = ConvertTo-SecureString -String "****" -AsPlainText -Force

Update-AzContainerAppSourceControl -ContainerAppName azps-containerapp-1 -ResourceGroupName azps_test_group_app -Name current -AzureClientId "UserObjectId" -AzureClientSecret $AzureClientSecret -AzureKind "feaderated" -AzureTenantId "UserDirectoryID" -Branch "main" -GithubContextPath "./" -GithubAccessToken $GithubAccessToken -GithubConfigurationImage "azps-containerapp-1" -RegistryPassword $RegistryPassword -RegistryUrl "azpscontainerregistry.azurecr.io" -RegistryUserName "azpscontainerregistry" -RepoUrl "https://github.com/lijinpei2008/ghatest"

Branch Name    RepoUrl                                 RegistryInfoRegistryUserName ResourceGroupName
------ ----    -------                                 ---------------------------- -----------------
main   current https://github.com/lijinpei2008/ghatest azpscontainerregistry        azps_test_group_app

更新容器應用程式的原始檔控制。

範例 2:更新容器應用程式的原始檔控制。

$AzureClientSecret = ConvertTo-SecureString -String "****" -AsPlainText -Force
$RegistryPassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
$GithubAccessToken = ConvertTo-SecureString -String "****" -AsPlainText -Force
$sourcecontrol = Get-AzContainerAppSourceControl -ContainerAppName azps-containerapp-1 -ResourceGroupName azps_test_group_app -Name current

Update-AzContainerAppSourceControl -InputObject $sourcecontrol -AzureClientId "UserObjectId" -AzureClientSecret $AzureClientSecret -AzureKind "feaderated" -AzureTenantId "UserDirectoryID" -Branch "main" -GithubContextPath "./" -GithubAccessToken $GithubAccessToken -GithubConfigurationImage "azps-containerapp-1" -RegistryPassword $RegistryPassword -RegistryUrl "azpscontainerregistry.azurecr.io" -RegistryUserName "azpscontainerregistry" -RepoUrl "https://github.com/lijinpei2008/ghatest"

Branch Name    RepoUrl                                 RegistryInfoRegistryUserName ResourceGroupName
------ ----    -------                                 ---------------------------- -----------------
main   current https://github.com/lijinpei2008/ghatest azpscontainerregistry        azps_test_group_app

更新容器應用程式的原始檔控制。

範例 3:更新容器應用程式的原始檔控制。

$AzureClientSecret = ConvertTo-SecureString -String "****" -AsPlainText -Force
$RegistryPassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
$GithubAccessToken = ConvertTo-SecureString -String "****" -AsPlainText -Force
$containerapp = Get-AzContainerApp -ResourceGroupName azps_test_group_app -Name azps-containerapp-1

Update-AzContainerAppSourceControl -ContainerAppInputObject $containerapp -Name current -AzureClientId "UserObjectId" -AzureClientSecret $AzureClientSecret -AzureKind "feaderated" -AzureTenantId "UserDirectoryID" -Branch "main" -GithubContextPath "./" -GithubAccessToken $GithubAccessToken -GithubConfigurationImage "azps-containerapp-1" -RegistryPassword $RegistryPassword -RegistryUrl "azpscontainerregistry.azurecr.io" -RegistryUserName "azpscontainerregistry" -RepoUrl "https://github.com/lijinpei2008/ghatest"

Branch Name    RepoUrl                                 RegistryInfoRegistryUserName ResourceGroupName
------ ----    -------                                 ---------------------------- -----------------
main   current https://github.com/lijinpei2008/ghatest azpscontainerregistry        azps_test_group_app

更新容器應用程式的原始檔控制。

參數

-AsJob

以作業身分執行命令

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AzureClientId

用戶端識別碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AzureClientSecret

客戶端密碼。

類型:SecureString
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AzureKind

github 的驗證種類用於部署範本

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AzureSubscriptionId

訂用帳戶標識碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AzureTenantId

租用戶標識碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Branch

將觸發自動部署的分支

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ContainerAppInputObject

Identity 參數

類型:IAppIdentity
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ContainerAppName

容器應用程式的名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。

類型:PSObject
別名:AzureRMContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-GithubAccessToken

一次 Github PAT 設定 github 環境

類型:SecureString
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-GithubConfigurationImage

映射名稱

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-GithubContextPath

內容路徑

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-GithubOS

作系統

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-GithubPublishType

程序代碼或影像

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-GithubRuntimeStack

運行時間堆疊

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-GithubRuntimeVersion

運行時間版本

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

Identity 參數

類型:IAppIdentity
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

容器應用程式SourceControl的名稱。

類型:String
別名:SourceControlName
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-NoWait

以異步方式執行命令

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RegistryPassword

登錄密碼。

類型:SecureString
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RegistryUrl

登錄伺服器 URL。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RegistryUserName

登錄用戶名稱。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RepoUrl

將整合至 ContainerApp 的存放庫 URL。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

資源群組的名稱。 名稱不區分大小寫。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-SubscriptionId

目標訂用帳戶的標識碼。

類型:String
Position:Named
預設值:(Get-AzContext).Subscription.Id
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出