Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOC-2644



Panel
bgColor#F6F5F5
borderWidth0

You can terminate an instance that you no longer need. Terminating an instance releases its corresponding physical resources, therefore the instance cannot be recovered.You can also specify that the instance terminates when shutting it down with the operating system command by enabling the InstanceInitiatedShutDownBehavior attribute.

Include Page
INCL:_RC-toc-task-choice
INCL:_RC-toc-task-choice

Table of Contents
maxLevel1

Terminating an Instance Using Cockpit

  1. Click Compute > Instances.

  2. Click the running or stopped instance you want to terminate.

    Include Page
    INCL:_RC-General-Note-MultiSelection
    INCL:_RC-General-Note-MultiSelection

    The instance is selected.

    Note

    If the DisableApiTermination attribute is enabled, you need to disable it before you can terminate the instance. For more information, see Modifying an Instance Attribute.


  3. Click Terminate
    Awesome Icon
    size16px
    iconfa-ban
    .
    The
    Status
    colourBlue
    titleTerminate Instance(s)
     confirmation dialog box appears.


  4. Click Terminate to confirm the operation. 
    The state of the selected instance changes to shutting-down, and then to terminated once the operation is completed.

    Info

    Terminated instances remain visible for approximately 1 hour after termination.


Terminating Instances Using AWS CLI

  • To terminate one or more instances, use the terminate-instances command following this syntax:

    Code Block
    languagetext
    titleRequest sample
    $>$ aws ec2 terminate-instances \
        --profile YOUR_PROFILE \
        --instance-ids i-12345678 \
        --endpoint https://fcu.eu-west-2.outscale.com 

     

    Include Page
    INCL:_RC-General-SentPart-AWSCLIattributes
    INCL:_RC-General-SentPart-AWSCLIattributes

    • Include Page
      INCL:_RC-General-SentPart-AWSCLIProfile
      INCL:_RC-General-SentPart-AWSCLIProfile
    • instance-ids: One or more instance IDs.
    • Include Page
      INCL:_RC-General-SentPart-AWSCLIEndpoint
      INCL:_RC-General-SentPart-AWSCLIEndpoint


    The terminate-instances returns the following elements:
    • TerminatingInstances: Information about one or more terminating instances. This element contains the following information:
      • InstanceId: The ID of the instance.
      • CurrentState: The current state of the instance, with the code and the name of the state.
      • PreviousState: The state of the instance before the action, with the code and the name of the state.
    Code Block
    languagetext
    titleResult sample
    {
        "TerminatingInstances": [
            {
                "InstanceId": "i-12345678",
                "CurrentState": {
                    "Code": 32,
                    "Name": "shutting-down"
                },
                "PreviousState": {
                    "Code": 80,
                    "Name": "stopped"
                }
            }
        ]
    } 


  • The state of the specified instances changes to shutting-down, and then to terminated once the operation is completed.

    Info

    Terminated instances remain visible for approximately 1 hour after termination.

     



Include Page
INCL:_RC-General-Panel-AWSLegalMentions
INCL:_RC-General-Panel-AWSLegalMentions



Panel
borderColor#FFFFFF
bgColor#F6F5F5
borderWidth2
titleBGColor#E6E6E6
borderStylesolid
titleRelated Pages


Panel
borderColor#FFFFFF
bgColor#F6F5F5
borderWidth2
titleBGColor#E6E6E6
borderStylesolid
titleCorresponding API Method