AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the ChangePassword operation. Changes the password of the IAM user who is calling this action. The root account password is not affected by this action.

To change the password for a different user, see UpdateLoginProfile. For more information about modifying passwords, see Managing Passwords in the IAM User Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.IdentityManagement.AmazonIdentityManagementServiceRequest
      Amazon.IdentityManagement.Model.ChangePasswordRequest

Namespace: Amazon.IdentityManagement.Model
Assembly: AWSSDK.IdentityManagement.dll
Version: 3.x.y.z

Syntax

C#
public class ChangePasswordRequest : AmazonIdentityManagementServiceRequest
         IAmazonWebServiceRequest

The ChangePasswordRequest type exposes the following members

Constructors

NameDescription
Public Method ChangePasswordRequest()

Properties

NameTypeDescription
Public Property NewPassword System.String

Gets and sets the property NewPassword.

The new password. The new password must conform to the AWS account's password policy, if one exists.

The regex pattern used to validate this parameter is a string of characters consisting of almost any printable ASCII character from the space (\u0020) through the end of the ASCII character range (\u00FF). You can also include the tab (\u0009), line feed (\u000A), and carriage return (\u000D) characters. Although any of these characters are valid in a password, note that many tools, such as the AWS Management Console, might restrict the ability to enter certain characters because they have special meaning within that tool.

Public Property OldPassword System.String

Gets and sets the property OldPassword.

The IAM user's current password.

Examples

The following command changes the password for the current IAM user.

To change the password for your IAM user


var response = client.ChangePassword(new ChangePasswordRequest 
{
    NewPassword = "]35d/{pB9Fo9wJ",
    OldPassword = "3s0K_;xh4~8XXI"
});


            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

Unity:
Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone