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

New-AzureStorSimpleInlineStorageAccountCredential

创建内联存储帐户凭据。

注意

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

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

语法

New-AzureStorSimpleInlineStorageAccountCredential
   -StorageAccountName <String>
   -StorageAccountKey <String>
   [-Endpoint <String>]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

说明

New-AzureStorSimpleInlineStorageAccountCredential cmdlet 创建内联 Azure 存储帐户凭据对象。 此 cmdlet 创建虚拟凭据对象。 可以使用 Windows PowerShell 管道在同 一命令中使用 New-AzureStorSimpleDeviceVolumeContainer cmdlet 和当前 cmdlet。 实际存储帐户凭据对象是在创建卷容器的过程中创建的。

示例

示例 1:内联创建存储帐户凭据

PS C:\>New-AzureStorSimpleInlineStorageAccountCredential -Name "contoso76" -Key x6o/tpZh8Coo8Tteo0NHLksTOKr/P9Vufo0LZNGdPGVTSUu00/p6ta1w9gRbVBNjzN8aa504kH2zkEsfUme+kw== | New-AzureStorSimpleDeviceVolumeContainer -Name "VolumeContainer_06" -DeviceName Contoso_App3 -BandWidthRate 256 -EncryptionEnabled $True -EncryptionKey "Key22" -WaitForComplete
VERBOSE: ClientRequestId: 535d24d5-1ed8-4759-92b2-dd492f94e23e_PS
VERBOSE: ClientRequestId: f32fc069-96c9-4fd9-a71a-0e62d81f25d8_PS
VERBOSE: ClientRequestId: 4376a931-89f5-448f-92bd-b2f7234244c9_PS
VERBOSE: ClientRequestId: 980109d4-7d76-40d0-ae3c-db539e2cb486_PS
VERBOSE: Encryption in progress... 
VERBOSE: Creating StorageAccountCredential inline
VERBOSE: Found storage account with name : contoso76
VERBOSE: Storage credential verification succeeded. 
VERBOSE: Encryption in progress... 
VERBOSE: ClientRequestId: d4f8a5de-bf81-4773-b6e6-edb034284cf4_PS


JobId        : 2dec64d3-b30d-4d35-adb3-12689b235b79
JobResult    : Succeeded
JobStatus    : Completed
ErrorCode    : 
ErrorMessage : 
JobSteps     : {Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStep, 
               Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStep}

VERBOSE: The job created for your create operation has completed successfully. 
VERBOSE: ClientRequestId: abd4082a-2eda-42ad-8cb3-5864dd2f7d1f_PS
BandwidthRate                   : 256
EncryptionKey                   : SK23I39L7GvoLce7u63TMT/A/V/TW8JXe+PoXKEKzwsr3t/h7tdqV1EpfaK0DGO/qo5b2PLCagFHAxnZEiejg
                                  jtF9TcyK+aLyzEnkqtM+eNRJmgANzJ9C/5L6Ubp+eSWiy+U/pyZygxPrb37e0yFg+qbHV9R9Qi+afBpHD9Gsi
                                  rhURuOc/idWG29eaEifuRzn/zEjvwJ2pEyYLcsuL+ftfRYZom69XO+cRDv5yT3xdNI/dAod/5YUaf1IhJl8wR
                                  cWjqyr00NxlCI03hTgH2sFyTFZWc07S2KI5K5n3rmCL6vGT76SRgNFeUxGz3v06/VoBhdmv9vDfrEz5UkW04d
                                  Qw==
InstanceId                      : a72bf4bb-0f0a-4ec2-a8b1-c4548825f522
IsDefault                       : False
IsEncryptionEnabled             : True
Name                            : VolumneContainer_06
OperationInProgress             : None
Owned                           : True
PrimaryStorageAccountCredential : Microsoft.WindowsAzure.Management.StorSimple.Models.StorageAccountCredentialResponse
SecretsEncryptionThumbprint     : 
VolumeCount                     : 0

此命令将创建一个存储帐户凭据内联,然后使用管道运算符将其 传递给 New-AzureStorSimpleDeviceVolumeContainer cmdlet。 该容器使用虚拟凭据创建卷容器。

参数

-Endpoint

指定存储帐户的 Azure 存储终结点。

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

-Profile

指定此 cmdlet 从中读取的 Azure 配置文件。 如果未指定配置文件,此 cmdlet 将从本地默认配置文件中读取。

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

-StorageAccountKey

以纯文本指定存储帐户的帐户密钥。 密钥以加密格式传输。

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

-StorageAccountName

指定现有存储帐户的名称。

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

输入

None

输出

StorageAccountCredentialResponse

此 cmdlet 返回一个 CloudType 对象,其中包含以下字段:

  • 主机名。 字符串
  • InstanceId字符串
  • IsDefaultBoolean中所创建的移动报表中使用。
  • Location字符串
  • 登录名。 字符串
  • 名称. 字符串
  • OperationInProgressOperationInProgress
  • 密码字符串
  • PasswordEncryptionCertThumbprint字符串
  • UseSSLBoolean中所创建的移动报表中使用。
  • VolumeCountInteger