New-AzureStorSimpleAccessControlRecord
Creates an access control record.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
New-AzureStorSimpleAccessControlRecord
-ACRName <String>
-IQNInitiatorName <String>
[-WaitForComplete]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
The New-AzureStorSimpleAccessControlRecord cmdlet creates an access control record. You can use an AccessControlRecord object to configure volumes.
Examples
Example 1: Create an Access Controlaccess control record and wait for the resultaccess control
PS C:\>New-AzureStorSimpleAccessControlRecord -ACRName "Acr10" -IQNInitiatorName "Iqn10" -WaitForComplete
Error : Microsoft.WindowsAzure.Management.StorSimple.Models.ErrorDetails
JobId : 08719243-3a76-43a5-a88b-e5f2b63ed3d9
JobSteps : {}
Result : Succeeded
Status : Completed
TaskResult : Succeeded
StatusCode : OK
RequestId : e12362c2c06615108ba8436cf85fcd40
This command creates an access control record named Acr10 for the iSCSI initiator named Iqn10. This command specifies the WaitForComplete parameter, and, therefore, the command waits until the operation is complete, and then returns a TaskStatusInfo object.
Example 2: Create an Access Controlaccess control recordaccess control
PS C:\>New-AzureStorSimpleAccessControlRecord -ACRName "Acr11" -IQNInitiatorName "Iqn11"
VERBOSE: The create job is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
2bd56fbb-4b95-4f2c-b99f-6321231a018d for tracking the job status
This command creates an access control record named Acr11 for the iSCSI initiator named Iqn11. This command does not specify the WaitForComplete parameter, and, therefore, the command starts the task, and then returns a TaskResponse object. To see the status of the task, use the Get-AzureStorSimpleTask cmdlet.
Parameters
-ACRName
Specifies a name for the access control record.
Type: | String |
Aliases: | Name |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IQNInitiatorName
Specifies the iSCSI qualified name (IQN) of the iSCSI initiator to which this cmdlet provides access for the volume.
Type: | String |
Aliases: | IQN |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
Specifies an Azure profile.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WaitForComplete
Indicates that this cmdlet waits for the operation to complete before it returns control to the Windows PowerShell console.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
TaskStatusInfo, TaskResponse
This cmdlet returns a TaskStatusInfo object if you specify the WaitForComplete parameter. If you do not specify that parameter, it returns a TaskResponse object.