Bearbeiten

Freigeben über


New-AzContainerInstanceEnvironmentVariableObject

Create a in-memory object for EnvironmentVariable

Syntax

New-AzContainerInstanceEnvironmentVariableObject
   -Name <String>
   [-SecureValue <SecureString>]
   [-Value <String>]
   [<CommonParameters>]

Description

Create a in-memory object for EnvironmentVariable

Examples

Example 1: Create an environment variable within a container instance

New-AzContainerInstanceEnvironmentVariableObject -Name "env1" -Value "value1"

Name SecureValue Value
---- ----------- -----
env1             value1

This command creates an environment variable within a container instance.

Example 2: Create a secure environment variable within a container instance

$pwd = ConvertTo-SecureString -String "****" -AsPlainText -Force
New-AzContainerInstanceEnvironmentVariableObject -Name "env2" -SecureValue $pwd

Name SecureValue Value
---- ----------- -----
env2 ******

This command creates a secure environment variable within a container instance

Parameters

-Name

The name of the environment variable.

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

-SecureValue

The value of the secure environment variable.

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

-Value

The value of the environment variable.

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

Outputs

EnvironmentVariable