Beispiel #1
0
        private static void KeystoneUpdateUserByAdmin(IamClient iamClient)
        {
            var keystoneUpdateUserInformationByAdminRequest = new KeystoneUpdateUserByAdminRequest()
            {
                UserId = "",
                Body   = new KeystoneUpdateUserByAdminRequestBody()
                {
                    User = new KeystoneUpdateUserOption()
                    {
                        Name        = "",
                        DomainId    = "",
                        Enabled     = true,
                        Password    = "",
                        Description = "",
                        PwdStatus   = false
                    }
                }
            };

            try
            {
                var keystoneUpdateUserInformationByAdminResponse =
                    iamClient.KeystoneUpdateUserByAdmin(keystoneUpdateUserInformationByAdminRequest);
                Console.WriteLine(JsonConvert.SerializeObject(keystoneUpdateUserInformationByAdminResponse.User));
            }
            catch (RequestTimeoutException requestTimeoutException)
            {
                Console.WriteLine(requestTimeoutException.ErrorMessage);
            }
            catch (ServiceResponseException clientRequestException)
            {
                Console.WriteLine(clientRequestException.HttpStatusCode);
                Console.WriteLine(clientRequestException.ErrorCode);
                Console.WriteLine(clientRequestException.ErrorMsg);
            }
            catch (ConnectionException connectionException)
            {
                Console.WriteLine(connectionException.ErrorMessage);
            }
        }