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

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

Network.AWS.EC2.GetPasswordData

Contents

Description

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.

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:

  • 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 is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • gpdInstanceId - The ID of the Windows instance.

data GetPasswordData Source #

Contains the parameters for GetPasswordData.

See: getPasswordData smart constructor.

Instances

Eq GetPasswordData Source # 
Data GetPasswordData Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetPasswordData -> c GetPasswordData #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetPasswordData #

toConstr :: GetPasswordData -> Constr #

dataTypeOf :: GetPasswordData -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GetPasswordData) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetPasswordData) #

gmapT :: (forall b. Data b => b -> b) -> GetPasswordData -> GetPasswordData #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetPasswordData -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetPasswordData -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetPasswordData -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetPasswordData -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetPasswordData -> m GetPasswordData #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetPasswordData -> m GetPasswordData #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetPasswordData -> m GetPasswordData #

Read GetPasswordData Source # 
Show GetPasswordData Source # 
Generic GetPasswordData Source # 
Hashable GetPasswordData Source # 
NFData GetPasswordData Source # 

Methods

rnf :: GetPasswordData -> () #

AWSRequest GetPasswordData Source # 
ToQuery GetPasswordData Source # 
ToPath GetPasswordData Source # 
ToHeaders GetPasswordData Source # 
type Rep GetPasswordData Source # 
type Rep GetPasswordData = D1 (MetaData "GetPasswordData" "Network.AWS.EC2.GetPasswordData" "amazonka-ec2-1.5.0-8IdXK3SzsETDMW2aFpANS9" False) (C1 (MetaCons "GetPasswordData'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gpdDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) (S1 (MetaSel (Just Symbol "_gpdInstanceId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs GetPasswordData Source # 

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:

data GetPasswordDataResponse Source #

Contains the output of GetPasswordData.

See: getPasswordDataResponse smart constructor.

Instances

Eq GetPasswordDataResponse Source # 
Data GetPasswordDataResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetPasswordDataResponse -> c GetPasswordDataResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetPasswordDataResponse #

toConstr :: GetPasswordDataResponse -> Constr #

dataTypeOf :: GetPasswordDataResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GetPasswordDataResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetPasswordDataResponse) #

gmapT :: (forall b. Data b => b -> b) -> GetPasswordDataResponse -> GetPasswordDataResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetPasswordDataResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetPasswordDataResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetPasswordDataResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetPasswordDataResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetPasswordDataResponse -> m GetPasswordDataResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetPasswordDataResponse -> m GetPasswordDataResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetPasswordDataResponse -> m GetPasswordDataResponse #

Read GetPasswordDataResponse Source # 
Show GetPasswordDataResponse Source # 
Generic GetPasswordDataResponse Source # 
NFData GetPasswordDataResponse Source # 

Methods

rnf :: GetPasswordDataResponse -> () #

type Rep GetPasswordDataResponse Source # 
type Rep GetPasswordDataResponse = D1 (MetaData "GetPasswordDataResponse" "Network.AWS.EC2.GetPasswordData" "amazonka-ec2-1.5.0-8IdXK3SzsETDMW2aFpANS9" False) (C1 (MetaCons "GetPasswordDataResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_gpdrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)) (S1 (MetaSel (Just Symbol "_gpdrsInstanceId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "_gpdrsPasswordData") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_gpdrsTimestamp") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ISO8601)))))

Response Lenses

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.