Dela via


Update-AzContainerAppSourceControl

uppdatera SourceControl för en containerapp.

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

uppdatera SourceControl för en containerapp.

Exempel

Exempel 1: Uppdatera källkontrollen för en containerapp.

$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

Uppdatera källkontrollen för en containerapp.

Exempel 2: Uppdatera källkontrollen för en containerapp.

$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

Uppdatera källkontrollen för en containerapp.

Exempel 3: Uppdatera källkontrollen för en containerapp.

$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

Uppdatera källkontrollen för en containerapp.

Parametrar

-AsJob

Kör kommandot som ett jobb

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-AzureClientId

Klient-ID.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-AzureClientSecret

Klienthemlighet.

Typ:SecureString
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-AzureKind

Typ av autentisering som github gör för att distribuera mallen

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-AzureSubscriptionId

Prenumerations-ID.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-AzureTenantId

Klientorganisations-ID.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Branch

Grenen som utlöser den automatiska distributionen

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

Typ:SwitchParameter
Alias:cf
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ContainerAppInputObject

Identitetsparameter

Typ:IAppIdentity
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-ContainerAppName

Namnet på containerappen.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DefaultProfile

Parametern DefaultProfile fungerar inte. Använd parametern SubscriptionId när den är tillgänglig om du kör cmdleten mot en annan prenumeration.

Typ:PSObject
Alias:AzureRMContext, AzureCredential
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-GithubAccessToken

En gång Github PAT för att konfigurera github-miljön

Typ:SecureString
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-GithubConfigurationImage

Bildnamn

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-GithubContextPath

Kontextsökväg

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-GithubOS

Åtgärdssystem

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-GithubPublishType

Kod eller bild

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-GithubRuntimeStack

Körningsstack

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-GithubRuntimeVersion

Körningsversion

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-InputObject

Identitetsparameter

Typ:IAppIdentity
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-Name

Namnet på Container App SourceControl.

Typ:String
Alias:SourceControlName
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-NoWait

Kör kommandot asynkront

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-RegistryPassword

registerhemlighet.

Typ:SecureString
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-RegistryUrl

registerserver-URL.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-RegistryUserName

registeranvändarnamn.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-RepoUrl

Lagringsplatsens URL som ska integreras med ContainerApp.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ResourceGroupName

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-SubscriptionId

ID för målprenumerationen.

Typ:String
Position:Named
Standardvärde:(Get-AzContext).Subscription.Id
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-WhatIf

Visar vad som skulle hända om cmdleten körs. Cmdleten körs inte.

Typ:SwitchParameter
Alias:wi
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

Utdata