New-AzContainerInstanceInitDefinitionObject
Create a in-memory object for InitContainerDefinition
Syntax
New-AzContainerInstanceInitDefinitionObject
-Name <String>
[-Command <String[]>]
[-EnvironmentVariable <IEnvironmentVariable[]>]
[-Image <String>]
[-VolumeMount <IVolumeMount[]>]
[<CommonParameters>]
Description
Create a in-memory object for InitContainerDefinition
Examples
Example 1: Set up the init container definition
New-AzContainerInstanceInitDefinitionObject -Name "initDefinition" -Command "/bin/sh -c myscript.sh"
Name
----
initDefinition
This command sets up the init container definition with command /bin/sh -c myscript.sh
Parameters
-Command
The command to execute within the init container in exec form.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnvironmentVariable
The environment variables to set in the init container. To construct, see NOTES section for ENVIRONMENTVARIABLE properties and create a hash table.
Type: | IEnvironmentVariable[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Image
The image of the init container.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The name for the init container.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VolumeMount
The volume mounts available to the init container. To construct, see NOTES section for VOLUMEMOUNT properties and create a hash table.
Type: | IVolumeMount[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Azure PowerShell