Update-AzContainerAppSourceControl
update the SourceControl for a Container App.
Syntax
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
update the SourceControl for a Container App.
Examples
Example 1: Update source control for a Container App.
$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
Update source control for a Container App.
Example 2: Update source control for a Container App.
$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
Update source control for a Container App.
Example 3: Update source control for a Container App.
$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
Update source control for a Container App.
Parameters
-AsJob
Run the command as a job
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureClientId
Client Id.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureClientSecret
Client Secret.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureKind
Kind of auth github does for deploying the template
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureSubscriptionId
Subscription Id.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureTenantId
Tenant Id.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Branch
The branch which will trigger the auto deployment
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
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 |
-ContainerAppInputObject
Identity Parameter
Type: | IAppIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ContainerAppName
Name of the Container App.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
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 |
-GithubAccessToken
One time Github PAT to configure github environment
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GithubConfigurationImage
Image name
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GithubContextPath
Context path
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GithubOS
Operation system
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GithubPublishType
Code or Image
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GithubRuntimeStack
Runtime stack
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GithubRuntimeVersion
Runtime version
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Identity Parameter
Type: | IAppIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Name of the Container App SourceControl.
Type: | String |
Aliases: | SourceControlName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NoWait
Run the command asynchronously
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RegistryPassword
registry secret.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RegistryUrl
registry server Url.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RegistryUserName
registry username.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RepoUrl
The repo url which will be integrated to ContainerApp.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group. The name is case insensitive.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
The ID of the target subscription.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
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
Outputs
Azure PowerShell