Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Stops a specific Amazon Lightsail instance that is currently running.
When you start a stopped instance, Lightsail assigns a new public IP address to the instance. To use the same IP address after stopping and starting an instance, create a static IP address and attach it to the instance. For more information, see the Amazon Lightsail Developer Guide.
The stop instance
operation supports tag-based access control via
resource tags applied to the resource identified by instance name
. For
more information, see the
Amazon Lightsail Developer Guide.
Synopsis
- data StopInstance = StopInstance' {
- force :: Maybe Bool
- instanceName :: Text
- newStopInstance :: Text -> StopInstance
- stopInstance_force :: Lens' StopInstance (Maybe Bool)
- stopInstance_instanceName :: Lens' StopInstance Text
- data StopInstanceResponse = StopInstanceResponse' {
- operations :: Maybe [Operation]
- httpStatus :: Int
- newStopInstanceResponse :: Int -> StopInstanceResponse
- stopInstanceResponse_operations :: Lens' StopInstanceResponse (Maybe [Operation])
- stopInstanceResponse_httpStatus :: Lens' StopInstanceResponse Int
Creating a Request
data StopInstance Source #
See: newStopInstance
smart constructor.
StopInstance' | |
|
Instances
Create a value of StopInstance
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:force:StopInstance'
, stopInstance_force
- When set to True
, forces a Lightsail instance that is stuck in a
stopping
state to stop.
Only use the force
parameter if your instance is stuck in the
stopping
state. In any other state, your instance should stop normally
without adding this parameter to your API request.
$sel:instanceName:StopInstance'
, stopInstance_instanceName
- The name of the instance (a virtual private server) to stop.
Request Lenses
stopInstance_force :: Lens' StopInstance (Maybe Bool) Source #
When set to True
, forces a Lightsail instance that is stuck in a
stopping
state to stop.
Only use the force
parameter if your instance is stuck in the
stopping
state. In any other state, your instance should stop normally
without adding this parameter to your API request.
stopInstance_instanceName :: Lens' StopInstance Text Source #
The name of the instance (a virtual private server) to stop.
Destructuring the Response
data StopInstanceResponse Source #
See: newStopInstanceResponse
smart constructor.
StopInstanceResponse' | |
|
Instances
newStopInstanceResponse Source #
Create a value of StopInstanceResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:operations:StopInstanceResponse'
, stopInstanceResponse_operations
- An array of objects that describe the result of the action, such as the
status of the request, the timestamp of the request, and the resources
affected by the request.
$sel:httpStatus:StopInstanceResponse'
, stopInstanceResponse_httpStatus
- The response's http status code.
Response Lenses
stopInstanceResponse_operations :: Lens' StopInstanceResponse (Maybe [Operation]) Source #
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
stopInstanceResponse_httpStatus :: Lens' StopInstanceResponse Int Source #
The response's http status code.