IIdentityProviderAddUser Method |
Adds a user to the account.
Namespace: net.openstack.Core.ProvidersAssembly: openstacknet (in openstacknet.dll) Version: 1.7.7+Branch.master.Sha.25d803f397c8693c2c13777ef6675f796f520f2c
Syntax NewUser AddUser(
NewUser user,
CloudIdentity identity = null
)
Function AddUser (
user As NewUser,
Optional identity As CloudIdentity = Nothing
) As NewUser
NewUser^ AddUser(
NewUser^ user,
CloudIdentity^ identity = nullptr
)
abstract AddUser :
user : NewUser *
?identity : CloudIdentity
(* Defaults:
let _identity = defaultArg identity null
*)
-> NewUser
Parameters
- user
- Type: net.openstack.Core.DomainNewUser
A NewUser object containing the details of the user to create. - identity (Optional)
- 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.
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