Appliance LocalAccounts Policy set

Appliance LocalAccounts Policy set

Set the global password policy.

This operation was added in vSphere API 6.7.

Request
URI
PUT
https://{host}/api/appliance/local-accounts/global-policy
COPY
Request Body

Global password policy

Appliance LocalAccounts Policy Info of type(s) application/json
Required
{
    "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
}
integer As int64 As int64
max_days
Optional

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

integer As int64 As int64
min_days
Optional

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

integer As int64 As int64
warn_days
Optional

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

integer As int64 As int64
prior_password_remember_count
Optional

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.

integer As int64 As int64
failed_attempt_count_before_account_lockout
Optional

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

integer As int64 As int64
length_of_lockout_period_in_seconds
Optional

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

integer As int64 As int64
fail_interval_between_attempts
Optional

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.

integer As int64 As int64
minimum_length
Optional

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.

integer As int64 As int64
minimum_uppercase_char_count
Optional

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.

integer As int64 As int64
minimum_lowercase_char_count
Optional

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.

integer As int64 As int64
minimum_numerics_char_count
Optional

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.

integer As int64 As int64
minimum_special_char_count
Optional

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.

boolean
managed_at_fleet
Optional

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

Authentication
This operation uses the following authentication methods.
Responses
204

Success!

Operation doesn't return any data structure

400

if passed policy values are < -1 or > 99999

Returns Vapi Std Errors InvalidArgument of type(s) application/json
This response body class contains all of the following: Vapi Std Errors Error
{
    "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"
}

500

Generic error

Returns Vapi Std Errors Error of type(s) application/json
{
    "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"
}
array of object
messages
Required

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.

object
data
Optional

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.

string
error_type
Required

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.


Code Samples
COPY
                    curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/appliance/local-accounts/global-policy