編輯

共用方式為


New-AzContainerInstanceVolumeMountObject

Create a in-memory object for VolumeMount

Syntax

New-AzContainerInstanceVolumeMountObject
   -MountPath <String>
   -Name <String>
   [-ReadOnly <Boolean>]
   [<CommonParameters>]

Description

Create a in-memory object for VolumeMount

Examples

Example 1: Specify a volume mount available to a container instance

New-AzContainerInstanceVolumeMountObject -Name "mnt" -MountPath "/mnt/azfile" -ReadOnly $true

MountPath   Name ReadOnly
---------   ---- --------
/mnt/azfile mnt  True

This command specifies a volume mount available to a container instance

Parameters

-MountPath

The path within the container where the volume should be mounted. Must not contain colon (:).

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

-Name

The name of the volume mount.

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

-ReadOnly

The flag indicating whether the volume mount is read-only.

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

Outputs

VolumeMount