iscsi_targets
Creates, updates, deletes, gets or lists an iscsi_targets resource.
Overview
| Name | iscsi_targets |
| Type | Resource |
| Id | azure_extras.storage_pool.iscsi_targets |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_disk_pool
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
aclMode | string | Mode for Target connectivity. Required. Known values are: "Dynamic" and "Static". |
endpoints | array | List of private IPv4 addresses to connect to the iSCSI Target. |
luns | array | List of LUNs to be exposed through iSCSI Target. |
managedBy | string | Azure resource id. Indicates if this resource is managed by another Azure resource. |
managedByExtended | array | List of Azure resource ids that manage this resource. |
port | integer | The port used by iSCSI Target portal group. |
provisioningState | string | State of the operation on the resource. Required. Known values are: "Invalid", "Succeeded", "Failed", "Canceled", "Pending", "Creating", "Updating", and "Deleting". |
sessions | array | List of identifiers for active sessions on the iSCSI target. |
staticAcls | array | Access Control List (ACL) for an iSCSI Target; defines LUN masking policy. |
status | string | Operational status of the iSCSI Target. Required. Known values are: "Invalid", "Unknown", "Healthy", "Unhealthy", "Updating", "Running", "Stopped", and "Stopped (deallocated)". |
systemData | object | Resource metadata required by ARM RPC. |
targetIqn | string | iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server". Required. |
type | string | The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
aclMode | string | Mode for Target connectivity. Required. Known values are: "Dynamic" and "Static". |
endpoints | array | List of private IPv4 addresses to connect to the iSCSI Target. |
luns | array | List of LUNs to be exposed through iSCSI Target. |
managedBy | string | Azure resource id. Indicates if this resource is managed by another Azure resource. |
managedByExtended | array | List of Azure resource ids that manage this resource. |
port | integer | The port used by iSCSI Target portal group. |
provisioningState | string | State of the operation on the resource. Required. Known values are: "Invalid", "Succeeded", "Failed", "Canceled", "Pending", "Creating", "Updating", and "Deleting". |
sessions | array | List of identifiers for active sessions on the iSCSI target. |
staticAcls | array | Access Control List (ACL) for an iSCSI Target; defines LUN masking policy. |
status | string | Operational status of the iSCSI Target. Required. Known values are: "Invalid", "Unknown", "Healthy", "Unhealthy", "Updating", "Running", "Stopped", and "Stopped (deallocated)". |
systemData | object | Resource metadata required by ARM RPC. |
targetIqn | string | iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server". Required. |
type | string | The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, disk_pool_name, iscsi_target_name, subscription_id | Get an iSCSI Target. | |
list_by_disk_pool | select | resource_group_name, disk_pool_name, subscription_id | Get iSCSI Targets in a Disk pool. | |
create_or_update | insert | resource_group_name, disk_pool_name, iscsi_target_name, subscription_id, properties | Create or Update an iSCSI Target. | |
update | update | resource_group_name, disk_pool_name, iscsi_target_name, subscription_id | Update an iSCSI Target. | |
create_or_update | replace | resource_group_name, disk_pool_name, iscsi_target_name, subscription_id, properties | Create or Update an iSCSI Target. | |
delete | delete | resource_group_name, disk_pool_name, iscsi_target_name, subscription_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
disk_pool_name | string | The name of the Disk Pool. Required. |
iscsi_target_name | string | The name of the iSCSI Target. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_disk_pool
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
;
Get iSCSI Targets in a Disk pool.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: iscsi_targets
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the iscsi_targets resource.
- name: disk_pool_name
value: "{{ disk_pool_name }}"
description: Required parameter for the iscsi_targets resource.
- name: iscsi_target_name
value: "{{ iscsi_target_name }}"
description: Required parameter for the iscsi_targets resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the iscsi_targets resource.
- name: managedBy
value: "{{ managedBy }}"
description: |
Azure resource id. Indicates if this resource is managed by another Azure resource.
- name: managedByExtended
value:
- "{{ managedByExtended }}"
description: |
List of Azure resource ids that manage this resource.
- name: properties
value:
aclMode: "{{ aclMode }}"
targetIqn: "{{ targetIqn }}"
staticAcls:
- initiatorIqn: "{{ initiatorIqn }}"
mappedLuns: "{{ mappedLuns }}"
luns:
- name: "{{ name }}"
managedDiskAzureResourceId: "{{ managedDiskAzureResourceId }}"
lun: {{ lun }}
UPDATE examples
- update
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
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
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
;