你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzureStorSimpleDeviceVolumeContainer

创建卷容器。

注意

本文档中引用的 cmdlet 用于管理使用 Azure Service Manager (ASM) API 的旧 Azure 资源。 创建新的资源时,不建议使用此旧版 PowerShell 模块,因为 ASM 计划停用。 有关详细信息,请参阅 Azure Service Manager 停用

Az PowerShell 模块是推荐的 PowerShell 模块,用于使用 PowerShell 管理 Azure 资源管理器 (ARM) 资源。

语法

New-AzureStorSimpleDeviceVolumeContainer
   -DeviceName <String>
   -VolumeContainerName <String>
   -PrimaryStorageAccountCredential <StorageAccountCredentialResponse>
   -BandWidthRateInMbps <Int32>
   [-EncryptionEnabled <Boolean>]
   [-EncryptionKey <String>]
   [-WaitForComplete]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

说明

New-AzureStorSimpleDeviceVolumeContainer cmdlet 创建卷容器。 必须将存储帐户凭据与新的卷容器相关联。 若要获取存储帐户凭据,请使用 Get-AzureStorSimpleStorageAccountCredential cmdlet。

示例

示例 1:创建容器

PS C:\>Get-AzureStorSimpleStorageAccountCredential -StorageAccountName "ContosoAccount" | New-AzureStorSimpleDeviceVolumeContainer -DeviceName "Contoso63-AppVm" -VolumeContainerName "Container08" -BandWidthRateInMbps 256
VERBOSE: ClientRequestId: 96a4ccd4-f2a9-4820-8bc8-e6b7b56dce0d_PS
VERBOSE: ClientRequestId: 90be20db-098a-4f2b-a6da-9da6f533a846_PS
VERBOSE: ClientRequestId: 410fd33a-8fa3-4ae5-a1bf-1b6da9b34ffc_PS
VERBOSE: Storage Access Credential with name ContosoAccount found! 
VERBOSE: ClientRequestId: 0a6d1008-ba1f-43b2-a424-9c86be2fb83b_PS
VERBOSE: ClientRequestId: 08f0d657-a130-4a25-8090-270c58b479dc_PS
VERBOSE: ClientRequestId: 0f3e894a-b031-467c-a258-41b74c89cf18_PS
5b192120-9df0-40ed-b75e-b4e728bd37ef
VERBOSE: The create task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
5b192120-9df0-40ed-b75e-b4e728bd37ef for tracking the task's status

此命令使用 Get-AzureStorSimpleStorageAccountCredential cmdlet 获取名为 ContosoAccount 的帐户的存储帐户凭据。 该命令使用管道运算符将凭据传递给当前 cmdlet。 此 cmdlet 使用该 cmdlet 中的凭据在名为 Contoso63-AppVm 的设备上创建名为 Container08 的容器。 此命令启动作业,然后返回 TaskResponse 对象。 若要查看作业的状态,请使用 Get-AzureStorSimpleTask cmdlet。

参数

-BandWidthRateInMbps

指定每秒兆比特(Mbps)的带宽速率。

类型:Int32
别名:CloudBandwidthInMbps
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-DeviceName

指定要在其中创建卷容器的 StorSimple 设备的名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-EncryptionEnabled

指示是否启用加密。

类型:Boolean
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-EncryptionKey

指定加密密钥。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-PrimaryStorageAccountCredential

将凭据指定为 StorageAccountCredential 对象,以与新的卷容器相关联。 若要获取 StorageAccountCredential 对象,请使用 Get-AzureStorSimpleStorageAccountCredential cmdlet。

类型:StorageAccountCredentialResponse
别名:StorageAccount
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:False

-Profile

指定 Azure 配置文件。

类型:AzureSMProfile
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-VolumeContainerName

指定要创建的卷容器的名称。

类型:String
别名:Name
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-WaitForComplete

指示此 cmdlet 等待操作完成,然后再将控制权返回到 Windows PowerShell 控制台。

类型:SwitchParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

输入

StorageAccountCredential

此 cmdlet 接受 与卷容器关联的 PrimaryStorageAccountCredential 对象。

输出

TaskStatusInfo

如果指定 WaitForComplete 参数,此 cmdlet 将返回 TaskStatusInfo 对象。