amazonka-ec2-1.4.0: Amazon Elastic Compute Cloud SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.GetPasswordData

Contents

Description

Retrieves the encrypted administrator password for an instance running Windows.

The Windows password is generated at boot if the EC2Config service plugin, Ec2SetPassword, is enabled. This usually only happens the first time an AMI is launched, and then Ec2SetPassword is automatically disabled. The password is not generated for rebundled AMIs unless Ec2SetPassword is enabled before bundling.

The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.

Password generation and encryption takes a few moments. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.

Synopsis

Creating a Request

getPasswordData Source

Creates a value of GetPasswordData with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

gpdDryRun :: Lens' GetPasswordData (Maybe Bool) Source

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

gpdInstanceId :: Lens' GetPasswordData Text Source

The ID of the Windows instance.

Destructuring the Response

getPasswordDataResponse Source

Creates a value of GetPasswordDataResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

gpdrsInstanceId :: Lens' GetPasswordDataResponse Text Source

The ID of the Windows instance.

gpdrsTimestamp :: Lens' GetPasswordDataResponse UTCTime Source

The time the data was last updated.