libZSservicesZSamazonka-lightsailZSamazonka-lightsail
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Lightsail.StopInstance

Description

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

Creating a Request

data StopInstance Source #

See: newStopInstance smart constructor.

Constructors

StopInstance' 

Fields

  • force :: Maybe Bool

    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.

  • instanceName :: Text

    The name of the instance (a virtual private server) to stop.

Instances

Instances details
Eq StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Read StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Show StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Generic StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Associated Types

type Rep StopInstance :: Type -> Type #

NFData StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Methods

rnf :: StopInstance -> () #

Hashable StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

ToJSON StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

AWSRequest StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Associated Types

type AWSResponse StopInstance #

ToHeaders StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

ToPath StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

ToQuery StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

type Rep StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

type Rep StopInstance = D1 ('MetaData "StopInstance" "Amazonka.Lightsail.StopInstance" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "StopInstance'" 'PrefixI 'True) (S1 ('MetaSel ('Just "force") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "instanceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse StopInstance Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

newStopInstance Source #

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.

Constructors

StopInstanceResponse' 

Fields

  • operations :: Maybe [Operation]

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq StopInstanceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Read StopInstanceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Show StopInstanceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Generic StopInstanceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Associated Types

type Rep StopInstanceResponse :: Type -> Type #

NFData StopInstanceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

Methods

rnf :: StopInstanceResponse -> () #

type Rep StopInstanceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.StopInstance

type Rep StopInstanceResponse = D1 ('MetaData "StopInstanceResponse" "Amazonka.Lightsail.StopInstance" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "StopInstanceResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "operations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Operation])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.