Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Retrieves the encrypted administrator password for a running Windows instance.
The Windows password is generated at boot by the EC2Config
service or EC2Launch
scripts (Windows Server 2016 and later). This usually only happens the first time an instance is launched. For more information, see EC2Config and EC2Launch in the Amazon Elastic Compute Cloud User Guide.
For the EC2Config
service, 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.
When you launch an instance, password generation and encryption may take a few minutes. If you try to retrieve the password before it's available, the output returns an empty string. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.
- getPasswordData :: Text -> GetPasswordData
- data GetPasswordData
- gpdDryRun :: Lens' GetPasswordData (Maybe Bool)
- gpdInstanceId :: Lens' GetPasswordData Text
- getPasswordDataResponse :: Int -> Text -> Text -> UTCTime -> GetPasswordDataResponse
- data GetPasswordDataResponse
- gpdrsResponseStatus :: Lens' GetPasswordDataResponse Int
- gpdrsInstanceId :: Lens' GetPasswordDataResponse Text
- gpdrsPasswordData :: Lens' GetPasswordDataResponse Text
- gpdrsTimestamp :: Lens' GetPasswordDataResponse UTCTime
Creating a Request
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:
gpdDryRun
- 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 isDryRunOperation
. Otherwise, it isUnauthorizedOperation
.gpdInstanceId
- The ID of the Windows instance.
data GetPasswordData Source #
Contains the parameters for GetPasswordData.
See: getPasswordData
smart constructor.
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 #
:: Int | |
-> Text | |
-> Text | |
-> UTCTime | |
-> GetPasswordDataResponse |
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:
gpdrsResponseStatus
- -- | The response status code.gpdrsInstanceId
- The ID of the Windows instance.gpdrsPasswordData
- The password of the instance. Returns an empty string if the password is not available.gpdrsTimestamp
- The time the data was last updated.
data GetPasswordDataResponse Source #
Contains the output of GetPasswordData.
See: getPasswordDataResponse
smart constructor.
Response Lenses
gpdrsResponseStatus :: Lens' GetPasswordDataResponse Int Source #
- - | The response status code.
gpdrsInstanceId :: Lens' GetPasswordDataResponse Text Source #
The ID of the Windows instance.
gpdrsPasswordData :: Lens' GetPasswordDataResponse Text Source #
The password of the instance. Returns an empty string if the password is not available.
gpdrsTimestamp :: Lens' GetPasswordDataResponse UTCTime Source #
The time the data was last updated.