Skip to main content
A newer release of this product is available.

Retrieve LUN maps

Contributors

GET /protocols/san/lun-maps

Introduced In: 9.6

Retrieves LUN maps.

Parameters

Name Type In Required Description

lun.node.name

string

query

False

Filter by lun.node.name

lun.node.uuid

string

query

False

Filter by lun.node.uuid

lun.uuid

string

query

False

Filter by lun.uuid

lun.name

string

query

False

Filter by lun.name

igroup.protocol

string

query

False

Filter by igroup.protocol

igroup.initiators

string

query

False

Filter by igroup.initiators

igroup.os_type

string

query

False

Filter by igroup.os_type

igroup.uuid

string

query

False

Filter by igroup.uuid

igroup.name

string

query

False

Filter by igroup.name

svm.uuid

string

query

False

Filter by svm.uuid

svm.name

string

query

False

Filter by svm.name

logical_unit_number

integer

query

False

Filter by logical_unit_number

fields

array[string]

query

False

Specify the fields to return.

max_records

integer

query

False

Limit the number of records returned.

return_records

boolean

query

False

The default is true for GET calls. When set to false, only the number of records is returned.

  • Default value: 1

return_timeout

integer

query

False

The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.

  • Default value: 1

  • Max value: 120

  • Min value: 0

order_by

array[string]

query

False

Order results by specified fields and optional [asc

Response

Status: 200, Ok
Name Type Description

_links

_links

num_records

integer

Number of records.

records

array[lun_map]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "records": [
    {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "igroup": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "initiators": [
          "iqn.1998-01.com.corp.iscsi:name1"
        ],
        "name": "igroup1",
        "os_type": "string",
        "protocol": "string",
        "uuid": "1ad8544d-8cd1-91e0-9e1c-723478563412"
      },
      "logical_unit_number": "1",
      "lun": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "/vol/volume1/qtree1/lun1",
        "node": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "node1",
          "uuid": "1cf8aa42-8cd1-12e0-a11c-423468563412"
        },
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      },
      "svm": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "svm1",
        "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
      }
    }
  ]
}

Error

Status: Default, Error
Name Type Description

error

error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

next

href

self

href

Name Type Description

self

href

igroup

The initiator group to which the LUN is mapped. Required in POST by supplying either the igroup.uuid, igroup.name, or both.

Name Type Description

_links

_links

initiators

array[string]

The initiators that are members of the initiator group.

name

string

The name of the initiator group. Valid in POST.

os_type

string

The host operating system of the initiator group. All initiators in the group should be hosts of the same operating system.

protocol

string

The protocols supported by the initiator group. This restricts the type of initiators that can be added to the initiator group.

uuid

string

The unique identifier of the initiator group. Valid in POST.

node

The LUN node.

Name Type Description

_links

_links

name

string

The name the LUN's node.

uuid

string

The unique identifier of the LUN node.

lun

The LUN to which the initiator group is mapped. Required in POST by supplying either the lun.uuid, lun.name, or both.

Name Type Description

_links

_links

name

string

The fully qualified path name of the LUN composed of a "/vol" prefix, the volume name, the (optional) qtree name, and file name of the LUN. Valid in POST.

node

node

The LUN node.

uuid

string

The unique identifier of the LUN. Valid in POST.

svm

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

lun_map

A LUN map is an association between a LUN and an initiator group. When a LUN is mapped to an initiator group, the initiator group's initiators are granted access to the LUN. The relationship between a LUN and an initiator group is many LUNs to many initiator groups.

Name Type Description

_links

_links

igroup

igroup

The initiator group to which the LUN is mapped. Required in POST by supplying either the igroup.uuid, igroup.name, or both.

logical_unit_number

integer

The logical unit number assigned to the LUN when mapped to the specified initiator group. The number is used to identify the LUN to initiators in the initiator group when communicating through Fibre Channel Protocol or iSCSI. Optional in POST; if no value is provided, ONTAP assigns the lowest available value.

  • example: 1

  • Max value: 4095

  • Min value: 0

  • Introduced in: 9.6

  • readCreate: 1

lun

lun

The LUN to which the initiator group is mapped. Required in POST by supplying either the lun.uuid, lun.name, or both.

svm

svm

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.