Module netapp_ontap.resources.account_password

Copyright © 2019 NetApp Inc. All rights reserved.

Overview

This API changes the password for a local user account.

Only cluster administrators with the "admin" role can change the password for other cluster or SVM user accounts. If you are not a cluster administrator, you can change your own password only.

Examples

Changing the password of another cluster or SVM user account by a cluster administrator

Specify the user account name, and the new password in the body of the POST request. The owner.uuid or owner.name are not required to be specified for a cluster-scoped user account.

For an SVM-scoped account, along with new password and user account name, specify either the SVM name as the owner.name or SVM uuid as the owner.uuid in the body of the POST request. These indicate the SVM for which the user account is created and can be obtained from the response body of a GET request performed on the /api/svm/svms API.

# The API:
POST "/api/security/authentication/password"
# The call to change the password of another cluster user:
curl -k -u <cluster_admin>:<password> -X POST "https://<mgmt-ip>/api/security/authentication/password" -d '{"name":"cluster_user1","password":"hello@1234"}'
# The call to change the password of another SVM user:
curl -k -u <cluster_admin>:<password> -X POST "https://<mgmt-ip>/api/security/authentication/password" -d '{"owner.name":"svm1","name":"svm_user1","password":"hello@1234"}'

Changing the password of an SVM-scoped user

Note: The IP address in the URI must be same as one of the interfaces owned by the SVM.

# The API:
POST "/api/security/authentication/password"
# The call:
curl -k -u svm_user1:hello@1234 -X POST "https://<SVM-ip>/api/security/authentication/password" -d '{"name":"svm_user1","password":"new1@1234"}'

Classes

class AccountPassword (*args, **kwargs)

The password object

Initialize the instance of the resource.

Any keyword arguments are set on the instance as properties. For example, if the class was named 'MyResource', then this statement would be true:

MyResource(name='foo').name == 'foo'

Args

*args
Each positional argument represents a parent key as used in the URL of the object. That is, each value will be used to fill in a segment of the URL which refers to some parent object. The order of these arguments must match the order they are specified in the URL, from left to right.
**kwargs
each entry will have its key set as an attribute name on the instance and its value will be the value of that attribute.

Ancestors

Methods

def post(self, hydrate: bool = False, poll: bool = True, poll_interval: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse

Updates the password for a user account.

Required parameters

  • name - User account name.
  • password - New password for the user account.

Optional parameters

  • owner.name or owner.uuid - Name or UUID of the SVM for an SVM-scoped user account.
  • security login password

Learn more


Send this object to the host as a creation request.

Args

hydrate
If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of the object.
poll
If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
poll_interval
If the operation returns a job, this specifies how often to query the job for updates.
poll_timeout
If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
**kwargs
Any key/value pairs passed will be sent as query parameters to the host.

Returns

A NetAppResponse object containing the details of the HTTP response.

Raises

NetAppRestError: If the API call returned a status code >= 400

Inherited members

class AccountPasswordSchema (only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)

The fields of the AccountPassword object

Ancestors

  • netapp_ontap.resource.ResourceSchema
  • marshmallow.schema.Schema
  • marshmallow.schema.BaseSchema
  • marshmallow.base.SchemaABC

Class variables

var name

The user account name whose password is being modified.

var opts
var owner

The owner field of the account_password.

var password

The password string