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

Copyright(c) 2013-2018 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 #

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 #

Contains the parameters for GetPasswordData.

See: getPasswordData smart constructor.

Instances
Eq GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Data GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

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 # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Show GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Generic GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Associated Types

type Rep GetPasswordData :: Type -> Type #

Hashable GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

AWSRequest GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Associated Types

type Rs GetPasswordData :: Type #

ToHeaders GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

ToPath GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

ToQuery GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

NFData GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Methods

rnf :: GetPasswordData -> () #

type Rep GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

type Rep GetPasswordData = D1 (MetaData "GetPasswordData" "Network.AWS.EC2.GetPasswordData" "amazonka-ec2-1.6.1-H98Zd65xIYr2z4e5UhW9ck" False) (C1 (MetaCons "GetPasswordData'" PrefixI True) (S1 (MetaSel (Just "_gpdDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 (MetaSel (Just "_gpdInstanceId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))
type Rs GetPasswordData # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Request Lenses

gpdDryRun :: Lens' GetPasswordData (Maybe Bool) #

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 #

The ID of the Windows instance.

Destructuring the Response

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:

data GetPasswordDataResponse #

Contains the output of GetPasswordData.

See: getPasswordDataResponse smart constructor.

Instances
Eq GetPasswordDataResponse # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Data GetPasswordDataResponse # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

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 # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Show GetPasswordDataResponse # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Generic GetPasswordDataResponse # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Associated Types

type Rep GetPasswordDataResponse :: Type -> Type #

NFData GetPasswordDataResponse # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

Methods

rnf :: GetPasswordDataResponse -> () #

type Rep GetPasswordDataResponse # 
Instance details

Defined in Network.AWS.EC2.GetPasswordData

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

Response Lenses

gpdrsResponseStatus :: Lens' GetPasswordDataResponse Int #

  • - | The response status code.

gpdrsInstanceId :: Lens' GetPasswordDataResponse Text #

The ID of the Windows instance.

gpdrsPasswordData :: Lens' GetPasswordDataResponse Text #

The password of the instance. Returns an empty string if the password is not available.

gpdrsTimestamp :: Lens' GetPasswordDataResponse UTCTime #

The time the data was last updated.