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.ServiceExceptionLightsail.Client.exceptions.InvalidInputExceptionLightsail.Client.exceptions.NotFoundExceptionLightsail.Client.exceptions.OperationFailureExceptionLightsail.Client.exceptions.AccessDeniedExceptionLightsail.Client.exceptions.AccountSetupInProgressExceptionLightsail.Client.exceptions.UnauthenticatedException