Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
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 EC2 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.
Synopsis
- data GetPasswordData = GetPasswordData' {
- dryRun :: Maybe Bool
- instanceId :: Text
- newGetPasswordData :: Text -> GetPasswordData
- getPasswordData_dryRun :: Lens' GetPasswordData (Maybe Bool)
- getPasswordData_instanceId :: Lens' GetPasswordData Text
- data GetPasswordDataResponse = GetPasswordDataResponse' {
- httpStatus :: Int
- instanceId :: Text
- passwordData :: Text
- timestamp :: ISO8601
- newGetPasswordDataResponse :: Int -> Text -> Text -> UTCTime -> GetPasswordDataResponse
- getPasswordDataResponse_httpStatus :: Lens' GetPasswordDataResponse Int
- getPasswordDataResponse_instanceId :: Lens' GetPasswordDataResponse Text
- getPasswordDataResponse_passwordData :: Lens' GetPasswordDataResponse Text
- getPasswordDataResponse_timestamp :: Lens' GetPasswordDataResponse UTCTime
Creating a Request
data GetPasswordData Source #
See: newGetPasswordData
smart constructor.
GetPasswordData' | |
|
Instances
Create a value of GetPasswordData
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dryRun:GetPasswordData'
, getPasswordData_dryRun
- 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
.
GetPasswordData
, getPasswordData_instanceId
- The ID of the Windows instance.
Request Lenses
getPasswordData_dryRun :: 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
.
getPasswordData_instanceId :: Lens' GetPasswordData Text Source #
The ID of the Windows instance.
Destructuring the Response
data GetPasswordDataResponse Source #
See: newGetPasswordDataResponse
smart constructor.
GetPasswordDataResponse' | |
|
Instances
newGetPasswordDataResponse Source #
:: Int | |
-> Text | |
-> Text | |
-> UTCTime | |
-> GetPasswordDataResponse |
Create a value of GetPasswordDataResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:GetPasswordDataResponse'
, getPasswordDataResponse_httpStatus
- The response's http status code.
GetPasswordData
, getPasswordDataResponse_instanceId
- The ID of the Windows instance.
$sel:passwordData:GetPasswordDataResponse'
, getPasswordDataResponse_passwordData
- The password of the instance. Returns an empty string if the password is
not available.
GetPasswordDataResponse
, getPasswordDataResponse_timestamp
- The time the data was last updated.
Response Lenses
getPasswordDataResponse_httpStatus :: Lens' GetPasswordDataResponse Int Source #
The response's http status code.
getPasswordDataResponse_instanceId :: Lens' GetPasswordDataResponse Text Source #
The ID of the Windows instance.
getPasswordDataResponse_passwordData :: Lens' GetPasswordDataResponse Text Source #
The password of the instance. Returns an empty string if the password is not available.
getPasswordDataResponse_timestamp :: Lens' GetPasswordDataResponse UTCTime Source #
The time the data was last updated.