Lightsail / Client / get_instance_state
get_instance_state#
- Lightsail.Client.get_instance_state(**kwargs)#
Returns the state of a specific instance. Works on one instance at a time.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_state( instanceName='string' )
- Parameters:
instanceName (string) –
[REQUIRED]
The name of the instance to get state information about.
- Return type:
dict
- Returns:
Response Syntax
{ 'state': { 'code': 123, 'name': 'string' } }
Response Structure
(dict) –
state (dict) –
The state of the instance.
code (integer) –
The status code for the instance.
name (string) –
The state of the instance (
running
orpending
).
Exceptions
Lightsail.Client.exceptions.ServiceException
Lightsail.Client.exceptions.InvalidInputException
Lightsail.Client.exceptions.NotFoundException
Lightsail.Client.exceptions.OperationFailureException
Lightsail.Client.exceptions.AccessDeniedException
Lightsail.Client.exceptions.AccountSetupInProgressException
Lightsail.Client.exceptions.UnauthenticatedException