Appliance LocalAccounts Policy set
Set the global password policy.
This operation was added in vSphere API 6.7.
Global password policy
{
"max_days": 0,
"min_days": 0,
"warn_days": 0,
"prior_password_remember_count": 0,
"failed_attempt_count_before_account_lockout": 0,
"length_of_lockout_period_in_seconds": 0,
"fail_interval_between_attempts": 0,
"minimum_length": 0,
"minimum_uppercase_char_count": 0,
"minimum_lowercase_char_count": 0,
"minimum_numerics_char_count": 0,
"minimum_special_char_count": 0,
"managed_at_fleet": false
}
Maximum number of days a password may be used. If the password is older than this, a password change will be forced.
This property was added in vSphere API 6.7.
If missing or null then the restriction will be ignored. This updates the global settings for the new users as well as the existing users. To update the settings for a particular user, PATCH /api/appliance/local-accounts/{username} API can be used
Minimum number of days allowed between password changes. Any password changes attempted sooner than this will be rejected.
This property was added in vSphere API 6.7.
If missing or null then the restriction will be ignored. This updates the global settings for the new users as well as the existing users. To update the settings for a particular user, PATCH /api/appliance/local-accounts/{username} API can be used
Number of days warning given before a password expires. A zero means warning is given only upon the day of expiration.
This property was added in vSphere API 6.7.
If missing or null then no warning will be provided. This updates the global settings for the new users as well as the existing users. To update the settings for a particular user, PATCH /api/appliance/local-accounts/{username} API can be used
The number of prior passwords for the user to be remembered by the vCenter appliance in order for the appliance to assess non-repetition.
This property was added in vSphere API 9.1.0.0.
If missing or null then no warning will be provided.
Threshold Number of consecutive authentication failures for the user during the recent interval before the account is locked out.
This property was added in vSphere API 9.1.0.0.
If missing or null then no warning will be provided
The access will be reenabled after n seconds after the lock out.
This property was added in vSphere API 9.1.0.0.
If missing or null then no warning will be provided
The length of the interval during which the consecutive authentication failures must happen for the user account lock out
This property was added in vSphere API 9.1.0.0.
If missing or null then the restriction will be ignored.
Minimum number of the characters needed in the password.
This property was added in vSphere API 9.1.0.0.
If missing or null then the restriction will be ignored.
Minimum number of upper case characters needed in the password.
This property was added in vSphere API 9.1.0.0.
If missing or null then the restriction will be ignored.
Minimum number of lower case characters needed in the password.
This property was added in vSphere API 9.1.0.0.
If missing or null then the restriction will be ignored.
Minimum number of numeric characters needed in the password.
This property was added in vSphere API 9.1.0.0.
If missing or null then the restriction will be ignored.
Minimum number of special characters needed in the password.
This property was added in vSphere API 9.1.0.0.
If missing or null then the restriction will be ignored.
Whether the password policy is managed at fleet or not.
This property was added in vSphere API 9.1.0.0.
If missing or null then the password policy is not fleet managed
Success!
if passed policy values are < -1 or > 99999
{
"messages": [
{
"id": "string",
"default_message": "string",
"args": [
"string"
],
"params": {
"params": {
"s": "string",
"dt": "string",
"i": 0,
"d": "number",
"l": {
"id": "string",
"params": {
"params": "Vapi Std LocalizationParam Object"
}
},
"format": "string",
"precision": 0
}
},
"localized": "string"
}
],
"data": {},
"error_type": "string"
}
Generic error
{
"messages": [
{
"id": "string",
"default_message": "string",
"args": [
"string"
],
"params": {
"params": {
"s": "string",
"dt": "string",
"i": 0,
"d": "number",
"l": "Vapi Std NestedLocalizableMessage Object",
"format": "string",
"precision": 0
}
},
"localized": "string"
}
],
"data": {},
"error_type": "string"
}
Stack of one or more localizable messages for human error consumers.
The message at the top of the stack (first in the list) describes the error from the perspective of the operation the client invoked.
Each subsequent message in the stack describes the "cause" of the prior message.
Data to facilitate clients responding to the operation reporting a standard error to indicating that it was unable to complete successfully.
Operations may provide data that clients can use when responding to errors. Since the data that clients need may be specific to the context of the operation reporting the error, different operations that report the same error may provide different data in the error. The documentation for each each operation will describe what, if any, data it provides for each error it reports.
The Vapi Std Errors ArgumentLocations, Vapi Std Errors FileLocations, and Vapi Std Errors TransientIndication schemas are intended as possible values for this property. Vapi Std DynamicID may also be useful as a value for this property (although that is not its primary purpose). Some resources may provide their own specific schemas for use as the value of this property when reporting errors from their operations.
Some operations will not set this property when reporting errors.
Discriminator field to help API consumers identify the structure type.
For more information see: Vapi Std Errors Error Type.
This property was added in vSphere API 6.7.2.
Can be missing or null for compatibility with preceding implementations.
curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/appliance/local-accounts/global-policy