REST API Reference Version 5.2.1.0Search

Create

POST v1/access_control_records

Description

Add an access control record to the specified volume.

Normal Response Codes

201 202

HTTP Error Codes

400 401 403 404 405 408 409 500 501 503

Request

Parameter Type JSON Type Description Default Mandatory Deprecated
apply_to NsAccessApplyTo string enum Type of object this access control record applies to. Possible values: 'volume', 'snapshot', 'both', 'pe', 'vvol_volume', 'vvol_snapshot'. 'both' false  
chap_user_id NsObjectID string Identifier for the CHAP user. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'. ''; which allows any CHAP user false  
initiator_group_id NsObjectID string Identifier for the initiator group. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'. ''; which allows any initiators false  
lun NsUnsignedLong number If this access control record applies to a regular volume, this attribute is the volume's LUN (Logical Unit Number). If the access protocol is iSCSI, the LUN will be 0. However, if the access protocol is Fibre Channel, the LUN will be in the range from 0 to 2047. If this record applies to a Virtual Volume, this attribute is the volume's secondary LUN in the range from 0 to 199999, for both iSCSI and Fibre Channel. If the record applies to a OpenstackV2 volume, the LUN will be in the range from 0 to 2047, for both iSCSI and Fibre Channel. If this record applies to a protocol endpoint, this attribute is not meaningful. Unsigned 64-bit integer. Example: 1234. (Represents LUN for regular volume and secondary LUN for Virtual Volume. This attribute is not meaningful for protocol endpoint.) false  
vol_id NsObjectID string Identifier for the volume this access control record applies to. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'. (ID of the volume. If this record does not apply to a protocol endpoint, this attribute is required. If this record applies to a protocol endpoint, this attribute is not meaningful and should not be specified.) false  
pe_id NsObjectID string Identifier for the protocol endpoint this access control record applies to. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'. (ID of the protocol endpoint. If this record applies to a protocol endpoint or a Virtual Volume, this attribute is required. Otherwise, this attribute is not meaningful and should not be specified.) false  
snap_id NsObjectID string Identifier for the snapshot this access control record applies to. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'. (ID of the VVol snapshot. If this record applies to a VVol snapshot, this attribute is required. Otherwise, this attribute is not meaningful and should not be specified.) false  
pe_ids NsObjectIDList Array of NsObjectID List of candidate protocol endpoints that may be used to access the Virtual Volume. One of them will be selected for the access control record. This field is required only when creating an access control record for a Virtual Volume. A list of object ids.   false  

JSON Request

            

{
   "data" : {
      "apply_to" : "both",
      "chap_user_id" : "0100000000000004d3000000000000000000000004",
      "initiator_group_id" : "0200000000000004d3000000000000000000000005",
      "vol_id" : "0600000000000004d3000000000000000000000017"
   }
}


{
    "data": {
        "apply_to": "pe",
        "initiator_group_id": "0200000000000004d3000000000000000000000001",
        "pe_id": "2e00000000000004d3000000000000000000000001"
    }
}


{
    "data": {
        "apply_to": "vvol_volume",
        "initiator_group_id": "0200000000000004d3000000000000000000000001",
        "pe_ids": [
            "2e00000000000004d3000000000000000000000001",
            "2e00000000000004d3000000000000000000000002"
        ],
        "vol_id": "0600000000000004d3000000000000000000000005"
    }
}


{
    "data": {
        "apply_to": "vvol_snapshot",
        "initiator_group_id": "0200000000000004d3000000000000000000000001",
        "pe_ids": [
            "2e00000000000004d3000000000000000000000001",
            "2e00000000000004d3000000000000000000000002"
        ],
        "snap_id": "0400000000000004d3000000000000000500000001",
        "vol_id": "0600000000000004d3000000000000000000000005"
    }
}

        
         

Response

Parameter Type JSON Type Description Deprecated
id NsObjectID string Identifier for the access control record. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.  
apply_to NsAccessApplyTo string enum Type of object this access control record applies to. Possible values: 'volume', 'snapshot', 'both', 'pe', 'vvol_volume', 'vvol_snapshot'.  
chap_user_id NsObjectID string Identifier for the CHAP user. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.  
chap_user_name NsObjectNameOrAny string Name of the CHAP user. String of up to 64 alphanumeric characters or standalone wildcard character '*' to represent any object name, - and . and : are allowed after first character. Examples: 'myobject-5', '*'.  
initiator_group_id NsObjectID string Identifier for the initiator group. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.  
initiator_group_name NsObjectNameOrAny string Name of the initiator group. String of up to 64 alphanumeric characters or standalone wildcard character '*' to represent any object name, - and . and : are allowed after first character. Examples: 'myobject-5', '*'.  
lun NsUnsignedLong number If this access control record applies to a regular volume, this attribute is the volume's LUN (Logical Unit Number). If the access protocol is iSCSI, the LUN will be 0. However, if the access protocol is Fibre Channel, the LUN will be in the range from 0 to 2047. If this record applies to a Virtual Volume, this attribute is the volume's secondary LUN in the range from 0 to 199999, for both iSCSI and Fibre Channel. If the record applies to a OpenstackV2 volume, the LUN will be in the range from 0 to 2047, for both iSCSI and Fibre Channel. If this record applies to a protocol endpoint, this attribute is not meaningful. Unsigned 64-bit integer. Example: 1234.  
vol_id NsObjectID string Identifier for the volume this access control record applies to. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.  
vol_name NsVolSnapName string Name of the volume this access control record applies to. String of up to 215 alphanumeric, hyphenated, colon, or period-separated characters; but cannot begin with hyphen, colon or period. This type is used for object sets containing volumes, snapshots, snapshot collections and protocol endpoints.  
vol_agent_type NsAgentType string enum External management agent type. Possible values: 'none', 'smis', 'vvol', 'openstack', 'openstackv2'.  
pe_id NsObjectID string Identifier for the protocol endpoint this access control record applies to. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.  
pe_name NsVolSnapName string Name of the protocol endpoint this access control record applies to. String of up to 215 alphanumeric, hyphenated, colon, or period-separated characters; but cannot begin with hyphen, colon or period. This type is used for object sets containing volumes, snapshots, snapshot collections and protocol endpoints.  
pe_lun NsUnsignedLong number LUN (Logical Unit Number) to associate with this protocol endpoint. Valid LUNs are in the 0-2047 range. Unsigned 64-bit integer. Example: 1234.  
snap_id NsObjectID string Identifier for the snapshot this access control record applies to. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.  
snap_name NsVolSnapName string Name of the snapshot this access control record applies to. String of up to 215 alphanumeric, hyphenated, colon, or period-separated characters; but cannot begin with hyphen, colon or period. This type is used for object sets containing volumes, snapshots, snapshot collections and protocol endpoints.  
snapluns NsSnapLunInfoList Array of NsSnapLunInfo Information about the snapshot LUNs associated with this access control record. This field is meaningful when the online snapshot can be accessed as a LUN in the group. Information about the snapshot LUNs as presented in the access_control_records object set. This information is available only for Fibre Channel.  
creation_time NsTime number Time when this access control record was created. Seconds since last epoch i.e. 00:00 January 1, 1970. Example: '3400'.  
last_modified NsTime number Time when this access control record was last modified. Seconds since last epoch i.e. 00:00 January 1, 1970. Example: '3400'.  
access_protocol NsAccessProtocol string enum Access protocol of the volume. Possible values: 'iscsi', 'fc'.  

JSON Response

            

{
   "data" : {
      "apply_to" : "both",
      "initiator_group_name" : "initiatorgrp0.227931934731664",
      "last_modified" : 1426776528,
      "access_protocol" : "iscsi",
      "initiator_group_id" : "0200000000000004d3000000000000000000000005",
      "chap_user_name" : "chapuser0.649425628633377",
      "vol_id" : "0600000000000004d3000000000000000000000017",
      "lun" : 0,
      "chap_user_id" : "0100000000000004d3000000000000000000000004",
      "vol_name" : "vol0.512194647294567",
      "creation_time" : 1426776528,
      "id" : "0d00000000000004d3000000000000000000000001"
   }
}


{
    "data": {
        "access_protocol": "iscsi",
        "apply_to": "pe",
        "chap_user_id": "",
        "chap_user_name": "*",
        "creation_time": 1436195137,
        "id": "0d00000000000004d3000000000000000000000001",
        "initiator_group_id": "0200000000000004d3000000000000000000000001",
        "initiator_group_name": "initiatorgrp0.0770883749156717",
        "last_modified": 1436195138,
        "lun": null,
        "pe_id": "2e00000000000004d3000000000000000000000001",
        "pe_lun": 0,
        "pe_name": "pe0.616334002089339",
        "snap_id": "",
        "snap_name": "",
        "snapluns": null,
        "vol_id": "",
        "vol_name": ""
    }
}


{
    "data": {
        "access_protocol": "iscsi",
        "apply_to": "vvol_volume",
        "chap_user_id": "",
        "chap_user_name": "*",
        "creation_time": 1436195138,
        "id": "0d00000000000004d3000000000000000000000002",
        "initiator_group_id": "0200000000000004d3000000000000000000000001",
        "initiator_group_name": "initiatorgrp0.0770883749156717",
        "last_modified": 1436195138,
        "lun": 0,
        "pe_id": "2e00000000000004d3000000000000000000000001",
        "pe_lun": 0,
        "pe_name": "pe0.616334002089339",
        "snap_id": "",
        "snap_name": "",
        "snapluns": null,
        "vol_id": "0600000000000004d3000000000000000000000005",
        "vol_name": "vol0.971473796366812"
    }
}


{
    "data": {
        "access_protocol": "iscsi",
        "apply_to": "vvol_snapshot",
        "chap_user_id": "",
        "chap_user_name": "*",
        "creation_time": 1436195138,
        "id": "0d00000000000004d3000000000000000000000003",
        "initiator_group_id": "0200000000000004d3000000000000000000000001",
        "initiator_group_name": "initiatorgrp0.0770883749156717",
        "last_modified": 1436195138,
        "lun": 1,
        "pe_id": "2e00000000000004d3000000000000000000000001",
        "pe_lun": 0,
        "pe_name": "pe0.616334002089339",
        "snap_id": "0400000000000004d3000000000000000500000001",
        "snap_name": "vol0.971473796366812-snap",
        "snapluns": null,
        "vol_id": "0600000000000004d3000000000000000000000005",
        "vol_name": "vol0.971473796366812"
    }
}