get_key_pairs
async
¶
get_key_pairs(
*,
config_overrides: Optional[AsyncLightsailClientConfig] = None,
page_token: Optional[string] = None,
include_default_key_pair: Optional[boolean] = None,
) -> GetKeyPairsResult
Returns information about all key pairs in the user's account.
Parameters:
-
page_token(Optional[string], default:None) –The token to advance to the next page of results from your request.
To get a page token, perform an initial
GetKeyPairsrequest. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request. -
include_default_key_pair(Optional[boolean], default:None) –A Boolean value that indicates whether to include the default key pair in the response of your request.
Raises:
-
AccessDeniedException–Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.
-
AccountSetupInProgressException–Lightsail throws this exception when an account is still in the setup in progress state.
-
InvalidInputException–Lightsail throws this exception when user input does not conform to the validation rules of an input field.
Domain and distribution APIs are only available in the N. Virginia (
us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration tous-east-1to create, view, or edit these resources. -
NotFoundException–Lightsail throws this exception when it cannot find a resource.
-
OperationFailureException–Lightsail throws this exception when an operation fails to execute.
-
RegionSetupInProgressException–Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.
-
ServiceException–A general service exception.
-
UnauthenticatedException–Lightsail throws this exception when the user has not been authenticated.
-
UnknownServiceError–The service returned an error code this client does not model.