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

ModifyAccount

Contributors netapp-pcarriga

You can use the ModifyAccount method to modify an existing account.

When you lock an account, any existing connections from that account are immediately terminated. When you change an account's CHAP settings, any existing connections remain active, and the new CHAP settings are used on subsequent connections or reconnections. To clear an account's attributes, specify {} for the attributes parameter.

Parameters

This method has the following input parameters:

Name Description Type Default value Required

accountID

AccountID for the account to modify.

integer

None

Yes

attributes

List of name-value pairs in JSON object format.

JSON object

None

No

enableChap

Specifies whether CHAP account credentials can be used by an initiator to access volumes.

boolean

None

No

initiatorSecret

The CHAP secret to use for the initiator. This secret must be 12-16 characters in length and should be impenetrable. The initiator CHAP secret must be unique and cannot be the same as the target CHAP secret.

string

None

No

status

Status for the account. Possible values:

  • active: Account is active and connections are allowed.

  • locked: Account is locked and connections are refused.

string

None

No

targetSecret

The CHAP secret to use for the target (mutual CHAP authentication). This secret must be 12-16 characters in length and should be impenetrable. The target CHAP secret must be unique and cannot be the same as the initiator CHAP secret.

string

None

No

username

Used to change the username associated with the account. (Must be 1 to 64 characters in length).

string

None

No

Return value

This method has the following return value:

Name

Description

Type

account

An object containing information about the modified account.

Request example

Requests for this method are similar to the following example. In this example, the attributes are cleared by specifying {} for them:

{
   "method": "ModifyAccount",
   "params": {
     "accountID"  : 25,
     "status"   : "locked",
     "attributes" : {}
   },
   "id" : 1
}

Response example

This method returns a response similar to the following example:

{
    "account": {
        "storageContainerID": "abcdef01-1234-5678-90ab-cdef01234567",
        "username": "user1",
        "accountID": 1,
        "volumes": [
        ],
        "enableChap": true,
        "initiatorSecret": "txz123456q890",
        "attributes": {
        },
        "status": active",
        "targetSecret": "rxe123b567890"
    }
}

New since version

9.6