Modifier

Partager via


New-AzContainerAppTemplateObject

Create an in-memory object for Container.

Syntax

New-AzContainerAppTemplateObject
   [-Probe <IContainerAppProbe[]>]
   [-Arg <String[]>]
   [-Command <String[]>]
   [-Env <IEnvironmentVar[]>]
   [-Image <String>]
   [-Name <String>]
   [-ResourceCpu <Double>]
   [-ResourceMemory <String>]
   [-VolumeMount <IVolumeMount[]>]
   [<CommonParameters>]

Description

Create an in-memory object for Container.

Examples

Example 1: Create an in-memory object for Container.

$probeHttpGetHttpHeader = New-AzContainerAppProbeHeaderObject -Name "Custom-Header" -Value "Awesome"
$probe = New-AzContainerAppProbeObject -Type "Liveness" -HttpGetPath "/health" -HttpGetPort 8080 -InitialDelaySecond 3 -PeriodSecond 3 -HttpGetHttpHeader $probeHttpGetHttpHeader

New-AzContainerAppTemplateObject -Image "repo/testcontainerApp0:v1" -Name "testcontainerApp0" -Probe $probe

Image                     Name              ResourceCpu ResourceEphemeralStorage ResourceMemory
-----                     ----              ----------- ------------------------ --------------
repo/testcontainerApp0:v1 testcontainerApp0

Create an in-memory object for Container.

Parameters

-Arg

Container start command arguments.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Command

Container start command.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Env

Container environment variables.

Type:IEnvironmentVar[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Image

Container image tag.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Custom container name.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Probe

List of probes for the container.

Type:IContainerAppProbe[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceCpu

Required CPU in cores, e.g. 0.5.

Type:Double
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceMemory

Required memory, e.g. "250Mb".

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VolumeMount

Container volume mounts.

Type:IVolumeMount[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Container