Share via


New-AzureStorSimpleStorageAccountCredential

Azure Storage 액세스 자격 증명을 추가합니다.

참고

이 설명서에서 참조하는 cmdlet은 Service Management API를 사용하는 레거시 Azure 리소스를 관리하기 위한 것입니다. Azure Resource Manager 리소스를 관리하는 cmdlet은 Az PowerShell 모듈을 참조하세요.

Syntax

New-AzureStorSimpleStorageAccountCredential
   -StorageAccountName <String>
   -StorageAccountKey <String>
   -UseSSL <Boolean>
   [-Endpoint <String>]
   [-WaitForComplete]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

New-AzureStorSimpleStorageAccountCredential cmdlet은 StorSimple OneSDK cmdlet에서 사용하기 위해 StorSimple 관리자에 Azure Storage 액세스 자격 증명을 추가합니다. 대부분의 StorSimple OneSDK cmdlet은 결국 볼륨, 볼륨 컨테이너, 백업 및 백업 정책과 같은 특정 스토리지 계정에 연결된 엔터티를 처리합니다. 일부 cmdlet의 경우 사용 중인 스토리지 계정의 자격 증명을 제공해야 합니다. 스토리지 계정 자격 증명은 기존 Azure Storage 계정을 가리키는 OneSDK에서 만든 액세스 개체입니다. 기존 스토리지 계정의 이름 및 액세스 키를 제공하여 스토리지 계정 자격 증명을 만듭니다. 그런 다음 해당 자격 증명 개체를 다른 cmdlet과 함께 사용할 수 있습니다.

이 cmdlet은 Select-AzureStorSimpleResource cmdlet을 사용하여 리소스를 선택할 때 제공하는 등록 키를 사용합니다. 암호화 오류를 방지하기 위해 값이 올바른지 확인합니다. 등록 키를 올바른 값으로 수정하려면 Select-AzureStorSimpleResource를 사용합니다.

예제

예제 1: 자격 증명 만들기

PS C:\>New-AzureStorSimpleStorageAccountCredential -StorageAccountName "ContosoAccount07" -StorageAccountKey "L/eVcHtvqKjPWm5SaAJXtDlc0d69yVs0ICoZ2XIV1x0r9TqUyQyLUNS8lHvTvRmzdvQhJelav3fYyX7wyAu/SA==" -UseSSL $False -WaitForComplete
VERBOSE: ClientRequestId: f363cda4-54aa-4ee8-a3fa-00651ac86ffb_PS
VERBOSE: Found storage account with name : ContosoAccount07
VERBOSE: Storage credential verification succeeded. 
VERBOSE: ClientRequestId: 716ce6df-62b3-4d48-8e0e-b0c94eec6934_PS
VERBOSE: Encryption in progress... 
VERBOSE: ClientRequestId: 19aa4ef7-2789-4817-980c-19e33d257650_PS

JobId        : 84f74c25-b742-452c-973c-43c7446e9f49
JobResult    : Succeeded
JobStatus    : Completed
ErrorCode    : 
ErrorMessage : 
JobSteps     : {}

VERBOSE: The job created for your create operation has completed successfully. 
VERBOSE: ClientRequestId: 72bcdf37-bf06-4dac-adc9-31bb8d06475a_PS
CloudType                        : Azure
Hostname                         : blob.core.windows.net
InstanceId                       : b9986714-cef4-4c3f-a719-7acfc9559320
IsDefault                        : False
Location                         : West Europe
Login                            : ContosoAccount07
Name                             : ContosoAccount07
OperationInProgress              : None

Password                         : G1sBQ6/qAN1gyRGRZVarpi7o6ToJl61sGugfeJ75yx7cwyaGLQHjrSEEwhxThbDJkxso2emAOarTe920Uufy
                                   0AmJ9NpBI5hNyIFfwS4Ff+z2WmfKOzApyeofW5Zy7GPufehe/2ondq0XG4pGt3qxHFXNVUuiaPSU6TVWEKSh
                                   hWDaksSXYMGij3DJdZDW1MA49e6Q7OY+rFujbYvi9P2OjVj8T+FbiMtMB5NnQEqE+t3k74RqPIDKU+d3h9x4
                                   rYbAksGPfMvSa0fUipwYJ+Y5/NABA6j/MfB2pNDJbvqDoa1JCX6SKiwL81wmTh78/KnDY5ST3Said5DzKEbR
                                   iYMQZg==
PasswordEncryptionCertThumbprint : 
UseSSL                           : False
VolumeCount                      : 0

이 명령은 지정된 스토리지 계정에 대한 스토리지 액세스 자격 증명을 만듭니다. 이 명령은 WaitForComplete 매개 변수를 지정하므로 cmdlet은 작업이 완료되어 컨트롤을 콘솔로 반환할 때까지 기다립니다.

예제 2: 자격 증명 만들기 및 작업의 해당 상태 쿼리

PS C:\>New-AzureStorSimpleStorageAccountCredential -Name "ContosoAccount08" -Key "6BlMpSVrCQVQy3iOpkxiyY8uk/e3PiHIhadxV4qpPlKInr/eRFrGcWKDrfNC1IHj6oh0If/h3rALdZ0zuaf9cQ==" -UseSSL $True
PS C:\> Get-AzureStorSimpleTask -InstanceId "53816d8d-a8b5-4c1d-a177-e59007608d6d"
VERBOSE: ClientRequestId: 6104a834-ea57-4687-8e0b-1d97dc1c038b_PS
VERBOSE: Found storage account with name : ContosoAccount08
VERBOSE: Storage credential verification succeeded. 
VERBOSE: ClientRequestId: 1f686fa4-5afc-43c3-87b6-f2da7bf9e65f_PS
VERBOSE: Encryption in progress... 
VERBOSE: ClientRequestId: 8acb3770-bd72-43e6-9622-481002ad40b0_PS
53816d8d-a8b5-4c1d-a177-e59007608d6d
VERBOSE: The create task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
53816d8d-a8b5-4c1d-a177-e59007608d6d for tracking the task's status

첫 번째 명령은 지정된 스토리지 계정에 대한 스토리지 액세스 자격 증명을 만듭니다. 이 명령은 작업 ID를 반환합니다.

두 번째 명령은 Get-AzureStorSimpleTask cmdlet을 사용하여 작업의 상태를 쿼리합니다. 이 명령은 첫 번째 명령의 작업 ID를 지정합니다.

예제 3: 다른 cmdlet과 함께 사용할 자격 증명 만들기

PS C:\>Get-AzureStorSimpleStorageAccountCredential -Name "ContosoAccount09" | New-AzureStorSimpleDeviceVolumeContainer -Name "VC03" -DeviceName "Contoso63-AppVm" -BandWidthRate 256 -EncryptionEnabled $True -EncryptionKey "<your encryption key>" -WaitForComplete
VERBOSE: ClientRequestId: b1d1e637-cd72-4a1e-95a8-4db1d0b921a7_PS
VERBOSE: ClientRequestId: 71f56ca0-1f0b-4655-9331-4849e096345a_PS
VERBOSE: ClientRequestId: fbdd5a96-c95f-4547-9bcd-376d05543348_PS
VERBOSE: Storage Access Credential with name ContosoAccount09 found! 
VERBOSE: ClientRequestId: b44e0363-9979-4e97-aeb1-d9eb4073a337_PS
VERBOSE: ClientRequestId: a6047943-b01e-44e4-a91d-5103aa80ce57_PS
VERBOSE: Encryption in progress... 
VERBOSE: ClientRequestId: ac2dfd8b-922f-4e4d-8c8d-df1e2f87806c_PS


JobId        : 1cf2db5d-624f-46c4-97b9-c36451ba144e
JobResult    : Succeeded
JobStatus    : Completed
ErrorCode    : 
ErrorMessage : 
JobSteps     : {Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStep}

VERBOSE: The job created for your create operation has completed successfully. 
VERBOSE: ClientRequestId: 9558414b-0883-4cf6-8a02-40efc7edd80d_PS
BandwidthRate                   : 256
EncryptionKey                   : g53NTgCF3SBVZzzk+9yUz5nZopvZpNr3th92ol7WRO7ZUKhodPm7WNjjHEKB0/V+JY6P68tdaF4JxF5jH58e/
                                  mCtTvnPNpOxykYFdY9GKGd9gnf+36sUPqiLFP+ONO5nN/N/zFmOeyuySsaa3gJsZG8eIiFc821yfe9m5QPbF
                                  bx/Qyu8qLl1R1LrKU7k+46IXfwQYSyclztydyuzvFUUic9kaJuR3944VLvrjvxJIbnLrYy7hsn+Gfq7ds9NFq
                                  AUILBH0+bk2uWgUlofAcE8fJ/rzDAHr8nFGWxOTJSrqAo0J3st8BN39+BcrY+zOWsMc/vKfc+Ss5PsGVGDT1r
                                  eQ==
InstanceId                      : 60c34706-ef0c-4c6f-ad90-7249f42648f7
IsDefault                       : False
IsEncryptionEnabled             : True
Name                            : VC03
OperationInProgress             : None
Owned                           : True
PrimaryStorageAccountCredential : Microsoft.WindowsAzure.Management.StorSimple.Models.StorageAccountCredentialResponse
SecretsEncryptionThumbprint     : 
VolumeCount                     : 0

이 명령은 스토리지 계정 자격 증명을 만듭니다. 그런 다음, 이 명령은 파이프라인 연산자를 사용하여 해당 자격 증명 을 New-AzureStorSimpleDeviceVolumeContainer cmdlet에 전달합니다. 이 cmdlet은 자격 증명을 사용하여 새 볼륨 컨테이너를 만듭니다.

매개 변수

-Endpoint

스토리지 계정에 대한 Azure Storage 엔드포인트를 지정합니다.

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

-Profile

Azure 프로필을 지정합니다.

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

-StorageAccountKey

스토리지 계정의 액세스 키를 일반 텍스트로 지정합니다.

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

-StorageAccountName

기존 스토리지 계정의 이름을 지정합니다.

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

-UseSSL

새 스토리지 계정 자격 증명을 사용할 때 연결에 SSL을 사용할지 여부를 나타냅니다.

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

-WaitForComplete

이 cmdlet은 Windows PowerShell 콘솔에 컨트롤을 반환하기 전에 작업이 완료될 때까지 기다립니다.

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

입력

None

출력

IEnumerable\<StorageAccountCredentialResponse\>, TaskResponse

WaitForComplete 매개 변수를 지정하면 이 cmdlet은 StorageAccountCredentialResponse 개체 목록을 반환합니다. 해당 매개 변수를 지정하지 않으면 cmdlet은 TaskResponse 개체를 반환합니다. StorageAccountCredentialResponse에는 다음 속성이 포함됩니다.

  • CloudType (CloudType)
  • 호스트 이름 (문자열)
  • InstanceId (문자열)
  • IsDefault (Boolean)
  • 위치 (문자열)
  • 로그인 (문자열)
  • 이름 (문자열)
  • OperationInProgress (OperationInProgress)
  • 암호 (문자열)
  • PasswordEncryptionCertThumbprint (문자열)
  • UseSSL (Boolean)
  • VolumeCount (int)