appliance local accounts policy: set

Set the global password policy. This operation was added in vSphere API 6.7

Request:

HTTP request

PUT https://{server}/rest/appliance/local-accounts/global-policy

Request Body Structure:

{
    "policy"{
        "max_days"1,
        "min_days"1,
        "warn_days"1
    }
}

Request Body Parameters:

Name Type Description
bold = required
policy info Global password policy.
policy.max_days long Maximum number of days a password may be used. If the password is older than this, a password change will be forced. This attribute was added in vSphere API 6.7

Optional. If unset then the restriction will be ignored.

policy.min_days long Minimum number of days allowed between password changes. Any password changes attempted sooner than this will be rejected. This attribute was added in vSphere API 6.7

Optional. If unset then the restriction will be ignored.

policy.warn_days long Number of days warning given before a password expires. A zero means warning is given only upon the day of expiration. This attribute was added in vSphere API 6.7

Optional. If unset then no warning will be provided.

Response:

HTTP Status Code: 200

None

Errors:

HTTP Status Code Type Description
400 invalid_argument if passed policy values are < -1 or > 99999
500 error Generic error