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'
)
[REQUIRED]
The name of the instance to get state information about.
{
'state': {
'code': 123,
'name': 'string'
}
}
Response Structure
The state of the instance.
The status code for the instance.
The state of the instance (e.g., running
or pending
).
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