下载
中文
注册

修改用户服务信息

命令功能

修改用户服务信息。

命令格式

操作类型:PATCH

URLhttps://device_ip/redfish/v1/AccountService

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

{
    "PasswordExpirationDays": PasswordExpirationDays,
    "Password": password
}

请求参数

表1 请求参数

参数名

是否必选

参数说明

取值

PasswordExpirationDays

必选

密码有效期

数字类型,默认为90天,取值范围为0~365,0表示永不过期。

Password

必选

当前用户密码

字符串,长度为8~20个字符。

使用指南

使用实例

请求样例:

PATCH https://10.10.10.10/redfish/v1/AccountService

请求头:

X-Auth-Token: auth_value
Content-Type: application/json 

请求消息体:

{
    "PasswordExpirationDays":100,
    "Password": "password"
}

响应样例:

{
    "@odata.context": "/redfish/v1/$metadata#AccountService",
    "@odata.id": "/redfish/v1/AccountService",
    "@odata.type": "#AccountService.v1_11_0.AccountService",
    "Id": "AccountService",
    "Name": "Account Service",
    "PasswordExpirationDays": 100,
    "Accounts": {
        "@odata.id": "/redfish/v1/AccountService/Accounts"
    }
}

响应码:200

输出说明

表2 操作输出说明

字段

类型

说明

@odata.context

字符串

AccountService资源模型的OData描述信息。

@odata.id

字符串

AccountService资源的访问路径。

@odata.type

字符串

AccountService资源类型。

Id

字符串

AccountService资源的Id。

Name

字符串

AccountService资源的名称。

PasswordExpirationDays

数字

密码有效期。

默认为90天,取值范围为0~365,0表示永不过期。

Accounts

对象

Accounts接口资源的访问路径。