Skip to content

Commit

Permalink
update custom logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinpei2008 committed Nov 8, 2024
1 parent 86da71e commit 426f057
Show file tree
Hide file tree
Showing 20 changed files with 53 additions and 59 deletions.
3 changes: 3 additions & 0 deletions src/App/App.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,9 @@ directive:
verb: New|Update
subject: ContainerAppJob
hide: true
- from: UserAssignedIdentities.dictionary.cs
where: $
transform: $ = $.replace('null != property.Key && null != property.Value', 'null != property.Key');

# This command requires the user to provide the github token, but the command is missing this parameter,
# so the command cannot be used normally. Wait for the next version to fix the problem
Expand Down
11 changes: 1 addition & 10 deletions src/App/App.Autorest/custom/Update-AzContainerAppJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -451,21 +451,15 @@ function Update-AzContainerAppJob {
foreach ($item in $PSBoundParameters.UserAssignedIdentity) {
$PSBoundParameters.IdentityUserAssignedIdentity.Add($item, $userIdentityObject )
}
Write-Host "=========================================================================================="
Write-Host $PSBoundParameters.IdentityUserAssignedIdentity

if ($containerAppJobObj.IdentityUserAssignedIdentity -ne $null) {
if ($containerAppJobObj.IdentityUserAssignedIdentity.Count -gt 0) {
$containerAppJobObj.IdentityUserAssignedIdentity.Keys | ForEach-Object {
if (-NOT($_ -in $UserAssignedIdentity)) {
$PSBoundParameters.IdentityUserAssignedIdentity.Add($_, $null)
Write-Host "======================================A========================================="
Write-host $_
}
}
}
}
Write-Host "=========================================================================================="
Write-Host $PSBoundParameters.IdentityUserAssignedIdentity

# calculate IdentityType
$supportsSystemAssignedIdentity = $EnableSystemAssignedIdentity -or (($null -eq $EnableSystemAssignedIdentity) -and ($containerAppJobObj.IdentityType.Contains('SystemAssigned')))
Expand All @@ -492,9 +486,6 @@ function Update-AzContainerAppJob {
$null = $PSBoundParameters.Remove('UserAssignedIdentity')
}
}
Write-Host "=========================================================================================="
Write-Host $PSBoundParameters.IdentityUserAssignedIdentity
Write-Host $PSBoundParameters
Az.App.internal\Update-AzContainerAppJob @PSBoundParameters
}
}
34 changes: 17 additions & 17 deletions src/App/App.Autorest/docs/Az.App.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,22 @@ Get a SourceControl of a Container App.
Create a Container App.

### [New-AzContainerAppAuthConfig](New-AzContainerAppAuthConfig.md)
create the AuthConfig for a Container App.
Create the AuthConfig for a Container App.

### [New-AzContainerAppConfigurationObject](New-AzContainerAppConfigurationObject.md)
Create an in-memory object for Configuration.

### [New-AzContainerAppConnectedEnv](New-AzContainerAppConnectedEnv.md)
create an connectedEnvironment.
Create an connectedEnvironment.

### [New-AzContainerAppConnectedEnvCert](New-AzContainerAppConnectedEnvCert.md)
create a Certificate.
Create a Certificate.

### [New-AzContainerAppConnectedEnvDapr](New-AzContainerAppConnectedEnvDapr.md)
create a Dapr Component in a connected environment.
Create a Dapr Component in a connected environment.

### [New-AzContainerAppConnectedEnvStorage](New-AzContainerAppConnectedEnvStorage.md)
create storage for a connectedEnvironment.
Create storage for a connectedEnvironment.

### [New-AzContainerAppCustomDomainObject](New-AzContainerAppCustomDomainObject.md)
Create an in-memory object for CustomDomain.
Expand Down Expand Up @@ -159,19 +159,19 @@ Create an in-memory object for JobExecutionContainer.
Create an in-memory object for JobScaleRule.

### [New-AzContainerAppManagedCert](New-AzContainerAppManagedCert.md)
create a Managed Certificate.
Create a Managed Certificate.

### [New-AzContainerAppManagedEnv](New-AzContainerAppManagedEnv.md)
create a Managed Environment used to host container apps.
Create a Managed Environment used to host container apps.

### [New-AzContainerAppManagedEnvCert](New-AzContainerAppManagedEnvCert.md)
create a Certificate.
Create a Certificate.

### [New-AzContainerAppManagedEnvDapr](New-AzContainerAppManagedEnvDapr.md)
create a Dapr Component in a Managed Environment.
Create a Dapr Component in a Managed Environment.

### [New-AzContainerAppManagedEnvStorage](New-AzContainerAppManagedEnvStorage.md)
create storage for a managedEnvironment.
Create storage for a managedEnvironment.

### [New-AzContainerAppProbeHeaderObject](New-AzContainerAppProbeHeaderObject.md)
Create an in-memory object for ContainerAppProbeHttpGetHttpHeadersItem.
Expand All @@ -198,7 +198,7 @@ Create an in-memory object for SecretVolumeItem.
Create an in-memory object for ServiceBind.

### [New-AzContainerAppSourceControl](New-AzContainerAppSourceControl.md)
create the SourceControl for a Container App.
Create the SourceControl for a Container App.

### [New-AzContainerAppTemplateObject](New-AzContainerAppTemplateObject.md)
Create an in-memory object for Container.
Expand Down Expand Up @@ -276,17 +276,17 @@ Checks if resource name is available.
Patches a Container App using JSON Merge Patch

### [Update-AzContainerAppAuthConfig](Update-AzContainerAppAuthConfig.md)
update the AuthConfig for a Container App.
Update the AuthConfig for a Container App.

### [Update-AzContainerAppConnectedEnvCert](Update-AzContainerAppConnectedEnvCert.md)
Patches a certificate.
Currently only patching of tags is supported

### [Update-AzContainerAppConnectedEnvDapr](Update-AzContainerAppConnectedEnvDapr.md)
update a Dapr Component in a connected environment.
Update a Dapr Component in a connected environment.

### [Update-AzContainerAppConnectedEnvStorage](Update-AzContainerAppConnectedEnvStorage.md)
update storage for a connectedEnvironment.
Update storage for a connectedEnvironment.

### [Update-AzContainerAppJob](Update-AzContainerAppJob.md)
Patches a Container Apps Job using JSON Merge Patch
Expand All @@ -303,11 +303,11 @@ Patches a certificate.
Currently only patching of tags is supported

### [Update-AzContainerAppManagedEnvDapr](Update-AzContainerAppManagedEnvDapr.md)
update a Dapr Component in a Managed Environment.
Update a Dapr Component in a Managed Environment.

### [Update-AzContainerAppManagedEnvStorage](Update-AzContainerAppManagedEnvStorage.md)
update storage for a managedEnvironment.
Update storage for a managedEnvironment.

### [Update-AzContainerAppSourceControl](Update-AzContainerAppSourceControl.md)
update the SourceControl for a Container App.
Update the SourceControl for a Container App.

4 changes: 2 additions & 2 deletions src/App/App.Autorest/docs/New-AzContainerAppAuthConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppAuthConfig

## SYNOPSIS
create the AuthConfig for a Container App.
Create the AuthConfig for a Container App.

## SYNTAX

Expand Down Expand Up @@ -68,7 +68,7 @@ New-AzContainerAppAuthConfig -ContainerAppName <String> -Name <String> -Resource
```

## DESCRIPTION
create the AuthConfig for a Container App.
Create the AuthConfig for a Container App.

## EXAMPLES

Expand Down
4 changes: 2 additions & 2 deletions src/App/App.Autorest/docs/New-AzContainerAppConnectedEnv.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppConnectedEnv

## SYNOPSIS
create an connectedEnvironment.
Create an connectedEnvironment.

## SYNTAX

Expand Down Expand Up @@ -46,7 +46,7 @@ New-AzContainerAppConnectedEnv -Name <String> -ResourceGroupName <String> -JsonS
```

## DESCRIPTION
create an connectedEnvironment.
Create an connectedEnvironment.

## EXAMPLES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppConnectedEnvCert

## SYNOPSIS
create a Certificate.
Create a Certificate.

## SYNTAX

Expand Down Expand Up @@ -49,7 +49,7 @@ New-AzContainerAppConnectedEnvCert -ConnectedEnvironmentName <String> -Name <Str
```

## DESCRIPTION
create a Certificate.
Create a Certificate.

## EXAMPLES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppConnectedEnvDapr

## SYNOPSIS
create a Dapr Component in a connected environment.
Create a Dapr Component in a connected environment.

## SYNTAX

Expand Down Expand Up @@ -52,7 +52,7 @@ New-AzContainerAppConnectedEnvDapr -ConnectedEnvironmentName <String> -Name <Str
```

## DESCRIPTION
create a Dapr Component in a connected environment.
Create a Dapr Component in a connected environment.

## EXAMPLES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppConnectedEnvStorage

## SYNOPSIS
create storage for a connectedEnvironment.
Create storage for a connectedEnvironment.

## SYNTAX

Expand Down Expand Up @@ -49,7 +49,7 @@ New-AzContainerAppConnectedEnvStorage -ConnectedEnvironmentName <String> -Name <
```

## DESCRIPTION
create storage for a connectedEnvironment.
Create storage for a connectedEnvironment.

## EXAMPLES

Expand Down
4 changes: 2 additions & 2 deletions src/App/App.Autorest/docs/New-AzContainerAppManagedCert.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppManagedCert

## SYNOPSIS
create a Managed Certificate.
Create a Managed Certificate.

## SYNTAX

Expand Down Expand Up @@ -48,7 +48,7 @@ New-AzContainerAppManagedCert -EnvName <String> -Name <String> -ResourceGroupNam
```

## DESCRIPTION
create a Managed Certificate.
Create a Managed Certificate.

## EXAMPLES

Expand Down
4 changes: 2 additions & 2 deletions src/App/App.Autorest/docs/New-AzContainerAppManagedEnv.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppManagedEnv

## SYNOPSIS
create a Managed Environment used to host container apps.
Create a Managed Environment used to host container apps.

## SYNTAX

Expand Down Expand Up @@ -56,7 +56,7 @@ New-AzContainerAppManagedEnv -Name <String> -ResourceGroupName <String> -JsonStr
```

## DESCRIPTION
create a Managed Environment used to host container apps.
Create a Managed Environment used to host container apps.

## EXAMPLES

Expand Down
4 changes: 2 additions & 2 deletions src/App/App.Autorest/docs/New-AzContainerAppManagedEnvCert.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppManagedEnvCert

## SYNOPSIS
create a Certificate.
Create a Certificate.

## SYNTAX

Expand Down Expand Up @@ -48,7 +48,7 @@ New-AzContainerAppManagedEnvCert -EnvName <String> -Name <String> -ResourceGroup
```

## DESCRIPTION
create a Certificate.
Create a Certificate.

## EXAMPLES

Expand Down
4 changes: 2 additions & 2 deletions src/App/App.Autorest/docs/New-AzContainerAppManagedEnvDapr.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppManagedEnvDapr

## SYNOPSIS
create a Dapr Component in a Managed Environment.
Create a Dapr Component in a Managed Environment.

## SYNTAX

Expand Down Expand Up @@ -51,7 +51,7 @@ New-AzContainerAppManagedEnvDapr -EnvName <String> -Name <String> -ResourceGroup
```

## DESCRIPTION
create a Dapr Component in a Managed Environment.
Create a Dapr Component in a Managed Environment.

## EXAMPLES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzContainerAppManagedEnvStorage

## SYNOPSIS
create storage for a managedEnvironment.
Create storage for a managedEnvironment.

## SYNTAX

Expand Down Expand Up @@ -49,7 +49,7 @@ New-AzContainerAppManagedEnvStorage -EnvName <String> -Name <String> -ResourceGr
```

## DESCRIPTION
create storage for a managedEnvironment.
Create storage for a managedEnvironment.

## EXAMPLES

Expand Down
4 changes: 2 additions & 2 deletions src/App/App.Autorest/docs/Update-AzContainerAppAuthConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# Update-AzContainerAppAuthConfig

## SYNOPSIS
update the AuthConfig for a Container App.
Update the AuthConfig for a Container App.

## SYNTAX

Expand Down Expand Up @@ -54,7 +54,7 @@ Update-AzContainerAppAuthConfig -InputObject <IAppIdentity> [-CookieExpirationCo
```

## DESCRIPTION
update the AuthConfig for a Container App.
Update the AuthConfig for a Container App.

## EXAMPLES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# Update-AzContainerAppConnectedEnvDapr

## SYNOPSIS
update a Dapr Component in a connected environment.
Update a Dapr Component in a connected environment.

## SYNTAX

Expand Down Expand Up @@ -38,7 +38,7 @@ Update-AzContainerAppConnectedEnvDapr -InputObject <IAppIdentity> [-ComponentTyp
```

## DESCRIPTION
update a Dapr Component in a connected environment.
Update a Dapr Component in a connected environment.

## EXAMPLES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# Update-AzContainerAppConnectedEnvStorage

## SYNOPSIS
update storage for a connectedEnvironment.
Update storage for a connectedEnvironment.

## SYNTAX

Expand All @@ -35,7 +35,7 @@ Update-AzContainerAppConnectedEnvStorage -InputObject <IAppIdentity> [-AzureFile
```

## DESCRIPTION
update storage for a connectedEnvironment.
Update storage for a connectedEnvironment.

## EXAMPLES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# Update-AzContainerAppManagedEnvDapr

## SYNOPSIS
update a Dapr Component in a Managed Environment.
Update a Dapr Component in a Managed Environment.

## SYNTAX

Expand Down Expand Up @@ -37,7 +37,7 @@ Update-AzContainerAppManagedEnvDapr -ManagedEnvironmentInputObject <IAppIdentity
```

## DESCRIPTION
update a Dapr Component in a Managed Environment.
Update a Dapr Component in a Managed Environment.

## EXAMPLES

Expand Down
Loading

0 comments on commit 426f057

Please sign in to comment.