Skip to main content

iscsi_targets

Creates, updates, deletes, gets or lists an iscsi_targets resource.

Overview

Nameiscsi_targets
TypeResource
Idazure_extras.storage_pool.iscsi_targets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
aclModestringMode for Target connectivity. Required. Known values are: "Dynamic" and "Static".
endpointsarrayList of private IPv4 addresses to connect to the iSCSI Target.
lunsarrayList of LUNs to be exposed through iSCSI Target.
managedBystringAzure resource id. Indicates if this resource is managed by another Azure resource.
managedByExtendedarrayList of Azure resource ids that manage this resource.
portintegerThe port used by iSCSI Target portal group.
provisioningStatestringState of the operation on the resource. Required. Known values are: "Invalid", "Succeeded", "Failed", "Canceled", "Pending", "Creating", "Updating", and "Deleting".
sessionsarrayList of identifiers for active sessions on the iSCSI target.
staticAclsarrayAccess Control List (ACL) for an iSCSI Target; defines LUN masking policy.
statusstringOperational status of the iSCSI Target. Required. Known values are: "Invalid", "Unknown", "Healthy", "Unhealthy", "Updating", "Running", "Stopped", and "Stopped (deallocated)".
systemDataobjectResource metadata required by ARM RPC.
targetIqnstringiSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server". Required.
typestringThe type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, disk_pool_name, iscsi_target_name, subscription_idGet an iSCSI Target.
list_by_disk_poolselectresource_group_name, disk_pool_name, subscription_idGet iSCSI Targets in a Disk pool.
create_or_updateinsertresource_group_name, disk_pool_name, iscsi_target_name, subscription_id, propertiesCreate or Update an iSCSI Target.
updateupdateresource_group_name, disk_pool_name, iscsi_target_name, subscription_idUpdate an iSCSI Target.
create_or_updatereplaceresource_group_name, disk_pool_name, iscsi_target_name, subscription_id, propertiesCreate or Update an iSCSI Target.
deletedeleteresource_group_name, disk_pool_name, iscsi_target_name, subscription_idDelete an iSCSI Target.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
disk_pool_namestringThe name of the Disk Pool. Required.
iscsi_target_namestringThe name of the iSCSI Target. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Get an iSCSI Target.

SELECT
id,
name,
aclMode,
endpoints,
luns,
managedBy,
managedByExtended,
port,
provisioningState,
sessions,
staticAcls,
status,
systemData,
targetIqn,
type
FROM azure_extras.storage_pool.iscsi_targets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND disk_pool_name = '{{ disk_pool_name }}' -- required
AND iscsi_target_name = '{{ iscsi_target_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or Update an iSCSI Target.

INSERT INTO azure_extras.storage_pool.iscsi_targets (
managedBy,
managedByExtended,
properties,
resource_group_name,
disk_pool_name,
iscsi_target_name,
subscription_id
)
SELECT
'{{ managedBy }}',
'{{ managedByExtended }}',
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ disk_pool_name }}',
'{{ iscsi_target_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
managedBy,
managedByExtended,
properties,
systemData,
type
;

UPDATE examples

Update an iSCSI Target.

UPDATE azure_extras.storage_pool.iscsi_targets
SET
managedBy = '{{ managedBy }}',
managedByExtended = '{{ managedByExtended }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND disk_pool_name = '{{ disk_pool_name }}' --required
AND iscsi_target_name = '{{ iscsi_target_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
managedBy,
managedByExtended,
properties,
systemData,
type;

REPLACE examples

Create or Update an iSCSI Target.

REPLACE azure_extras.storage_pool.iscsi_targets
SET
managedBy = '{{ managedBy }}',
managedByExtended = '{{ managedByExtended }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND disk_pool_name = '{{ disk_pool_name }}' --required
AND iscsi_target_name = '{{ iscsi_target_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
managedBy,
managedByExtended,
properties,
systemData,
type;

DELETE examples

Delete an iSCSI Target.

DELETE FROM azure_extras.storage_pool.iscsi_targets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND disk_pool_name = '{{ disk_pool_name }}' --required
AND iscsi_target_name = '{{ iscsi_target_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;