CloudIdentityProviderAddUser Method |
Adds a user to the account.
Namespace: net.openstack.Providers.RackspaceAssembly: openstacknet (in openstacknet.dll) Version: 1.7.7+Branch.master.Sha.25d803f397c8693c2c13777ef6675f796f520f2c
Syntax public virtual NewUser AddUser(
NewUser user,
CloudIdentity identity
)
Public Overridable Function AddUser (
user As NewUser,
identity As CloudIdentity
) As NewUser
public:
virtual NewUser^ AddUser(
NewUser^ user,
CloudIdentity^ identity
)
abstract AddUser :
user : NewUser *
identity : CloudIdentity -> NewUser
override AddUser :
user : NewUser *
identity : CloudIdentity -> NewUser
Parameters
- user
- Type: net.openstack.Core.DomainNewUser
A NewUser object containing the details of the user to create. - identity
- Type: net.openstack.Core.DomainCloudIdentity
The cloud identity to use for this request. If not specified, the DefaultIdentity for the current provider instance will be used.
Return Value
Type:
NewUserA
NewUser object containing the details of the created user.
Implements
IIdentityProviderAddUser(NewUser, CloudIdentity)Exceptions Remarks
The returned
NewUser object will contain the password of the created user.
If no
Password is specified in
user, the returned
password will be an automatically generated password from the server.
Caution |
---|
After this call, there is no way to retrieve the password for a user. If the password was
auto-generated by the server, make sure to either store the returned value or provide the
information to the user for later use.
|
Examples The following example demonstrates the use of this method using the CloudIdentityProvider
implementation of IIdentityProvider. For more information about creating the provider, see
CloudIdentityProvider(CloudIdentity).
NewUser user = new NewUser("{username}", "{email}", enabled: true);
user = provider.AddUser(user, null);
string password = user.Password;
Dim User = New NewUser("{username}", "{email}", enabled:=True)
User = provider.AddUser(User, Nothing)
Dim password = User.Password
auto user = gcnew NewUser("{username}", "{email}", nullptr, true);
user = provider->AddUser(user, nullptr);
auto password = user->Password;
let user = new NewUser("{username}", "{email}", enabled=true)
let user = provider.AddUser(user, null)
let password = user.Password
Version Information .NET Framework
Supported in: 4.5
openstack.net
Supported in: 1.6, 1.5, 1.4, 1.3.6
See Also