Dijeli putem


az disk-pool iscsi-target

Note

This reference is part of the diskpool extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az disk-pool iscsi-target command. Learn more about extensions.

Manage iSCSI target with a Disk Pool.

Commands

Name Description Type Status
az disk-pool iscsi-target create

Create an iSCSI Target.

Extension GA
az disk-pool iscsi-target delete

Delete an iSCSI Target.

Extension GA
az disk-pool iscsi-target list

Get iSCSI Targets in a Disk pool.

Extension GA
az disk-pool iscsi-target show

Get an iSCSI Target.

Extension GA
az disk-pool iscsi-target update

Update an iSCSI Target.

Extension GA
az disk-pool iscsi-target wait

Place the CLI in a waiting state until a condition of the disk-pool iscsi-target is met.

Extension GA

az disk-pool iscsi-target create

Create an iSCSI Target.

az disk-pool iscsi-target create --acl-mode {Dynamic, Static}
                                 --disk-pool-name
                                 --iscsi-target-name
                                 --resource-group
                                 [--luns]
                                 [--managed-by]
                                 [--managed-by-extended]
                                 [--no-wait]
                                 [--static-acls]
                                 [--target-iqn]

Examples

Create or Update iSCSI Target

az disk-pool iscsi-target create --disk-pool-name "myDiskPool" --acl-mode "Dynamic" --luns name="lun0" managed-disk-azure-resource-id="/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm-name_DataDisk_1" --target-iqn "iqn.2005-03.org.iscsi:server1" --name "myIscsiTarget" --resource-group "myResourceGroup"

Required Parameters

--acl-mode

Mode for Target connectivity.

Accepted values: Dynamic, Static
--disk-pool-name

The name of the Disk Pool.

--iscsi-target-name --name -n

The name of the iSCSI Target.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--luns

List of LUNs to be exposed through iSCSI Target.

Usage: --luns name=XX managed-disk-azure-resource-id=XX

name: Required. User defined name for iSCSI LUN; example: "lun0" managed-disk-azure-resource-id: Required. Azure Resource ID of the Managed Disk.

Multiple actions can be specified by using more than one --luns argument.

--managed-by

Azure resource id. Indicates if this resource is managed by another Azure resource.

--managed-by-extended

List of Azure resource ids that manage this resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--static-acls

Access Control List (ACL) for an iSCSI Target; defines LUN masking policy.

Usage: --static-acls initiator-iqn=XX mapped-luns=XX

initiator-iqn: Required. iSCSI initiator IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:client". mapped-luns: Required. List of LUN names mapped to the ACL.

Multiple actions can be specified by using more than one --static-acls argument.

--target-iqn

ISCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server".

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az disk-pool iscsi-target delete

Delete an iSCSI Target.

az disk-pool iscsi-target delete [--disk-pool-name]
                                 [--ids]
                                 [--iscsi-target-name]
                                 [--no-wait]
                                 [--resource-group]
                                 [--subscription]
                                 [--yes]

Examples

Delete iSCSI Target

az disk-pool iscsi-target delete --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup"

Optional Parameters

--disk-pool-name

The name of the Disk Pool.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--iscsi-target-name --name -n

The name of the iSCSI Target.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az disk-pool iscsi-target list

Get iSCSI Targets in a Disk pool.

az disk-pool iscsi-target list --disk-pool-name
                               --resource-group

Examples

List Disk Pools by Resource Group

az disk-pool iscsi-target list --disk-pool-name "myDiskPool" --resource-group "myResourceGroup"

Required Parameters

--disk-pool-name

The name of the Disk Pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az disk-pool iscsi-target show

Get an iSCSI Target.

az disk-pool iscsi-target show [--disk-pool-name]
                               [--ids]
                               [--iscsi-target-name]
                               [--resource-group]
                               [--subscription]

Examples

Get iSCSI Target

az disk-pool iscsi-target show --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup"

Optional Parameters

--disk-pool-name

The name of the Disk Pool.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--iscsi-target-name --name -n

The name of the iSCSI Target.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az disk-pool iscsi-target update

Update an iSCSI Target.

az disk-pool iscsi-target update [--disk-pool-name]
                                 [--ids]
                                 [--iscsi-target-name]
                                 [--luns]
                                 [--managed-by]
                                 [--managed-by-extended]
                                 [--no-wait]
                                 [--resource-group]
                                 [--static-acls]
                                 [--subscription]

Examples

Update iSCSI Target

az disk-pool iscsi-target update --disk-pool-name "myDiskPool" --name "myIscsiTarget" --luns name="lun0" managed-disk-azure-resource-id="/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm-name_DataDisk_1"

Optional Parameters

--disk-pool-name

The name of the Disk Pool.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--iscsi-target-name --name -n

The name of the iSCSI Target.

--luns

List of LUNs to be exposed through iSCSI Target.

Usage: --luns name=XX managed-disk-azure-resource-id=XX

name: Required. User defined name for iSCSI LUN; example: "lun0" managed-disk-azure-resource-id: Required. Azure Resource ID of the Managed Disk.

Multiple actions can be specified by using more than one --luns argument.

--managed-by

Azure resource id. Indicates if this resource is managed by another Azure resource.

--managed-by-extended

List of Azure resource ids that manage this resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--static-acls

Access Control List (ACL) for an iSCSI Target; defines LUN masking policy.

Usage: --static-acls initiator-iqn=XX mapped-luns=XX

initiator-iqn: Required. iSCSI initiator IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:client". mapped-luns: Required. List of LUN names mapped to the ACL.

Multiple actions can be specified by using more than one --static-acls argument.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az disk-pool iscsi-target wait

Place the CLI in a waiting state until a condition of the disk-pool iscsi-target is met.

az disk-pool iscsi-target wait [--created]
                               [--custom]
                               [--deleted]
                               [--disk-pool-name]
                               [--exists]
                               [--ids]
                               [--interval]
                               [--iscsi-target-name]
                               [--resource-group]
                               [--subscription]
                               [--timeout]
                               [--updated]

Examples

Pause executing next line of CLI script until the disk-pool iscsi-target is successfully created.

az disk-pool iscsi-target wait --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup" --created

Pause executing next line of CLI script until the disk-pool iscsi-target is successfully updated.

az disk-pool iscsi-target wait --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup" --updated

Pause executing next line of CLI script until the disk-pool iscsi-target is successfully deleted.

az disk-pool iscsi-target wait --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup" --deleted

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--disk-pool-name

The name of the Disk Pool.

--exists

Wait until the resource exists.

Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

Polling interval in seconds.

Default value: 30
--iscsi-target-name --name -n

The name of the iSCSI Target.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.