Modifier un attribut d’une VM

Vous pouvez modifier un attribut d’une machine virtuelle (VM), tel que son type, ses user data ou son paramètre de suppression. Selon l’attribut que vous voulez modifier, la VM doit être en fonctionnement ou à l’arrêt.

Modifier un attribut d’une VM avec Cockpit v2

Avant de commencer :

  • Pour modifier l’attribut Type de VM, vous devez arrêter la VM.

  • Les autres attributs peuvent être modifiés lorsque la VM est en fonctionnement ou à l’arrêt.

  1. Cliquez à l’intérieur du dashboard VM pour faire apparaître des cases à cocher.

  2. Cochez la case de la VM dont vous voulez modifier les attributs.

    La multisélection est disponible.

    L’instance est sélectionnée et un menu d’actions apparaît.

  3. Placez le curseur de la souris sur IconEdit Mettre à jour la VM.
    Les attributs modifiables apparaissent.

(optionnel) Modifier les security groups associés à la VM

  1. Cliquez sur IconSecurityGroup Security Groups.
    La boîte de dialogue METTRE À JOUR LES SECURITY GROUPS apparaît.

  2. Cliquez dans le champ pour faire apparaître la liste des security groups.
    Dans la liste, sélectionnez le ou les security group(s) que vous voulez associer à la VM.

  3. Pour dissocier un security group d’une VM, cliquez sur IconClose à côté du nom du security group.

  4. Cliquez sur Mettre à jour les security groups.

(optionnel) Modifier le type d’instance

  1. Cliquez sur IconEdit Type de VM.
    La boîte de dialogue METTRE À JOUR LE TYPE DE LA VM apparaît.

  2. Spécifiez les attributs suivants pour votre instance :

    • Génération du CPU : La génération du processeur.

    • Performance : L’indicateur de performance.

      • Très haute : Capacité de calcul maximum sur tous les vCPU de la VM. Cette valeur est idéale pour les applications de calcul intensif demandant des performances stables durant le cycle de vie de la VM.

      • Haute : Haute capacité de calcul sur tous les vCPU de la VM. Cette valeur s’applique à la plupart des cas et offre des performances variables dans le temps.

      • Moyenne : Performance à variation significative sur tous les vCPU de la VM. Cette valeur ne garantit pas des performances constantes, mais est idéale pour les machines à faible demande CPU.

    • Cœur(s) : Le nombre de vCores, jusqu’à 78.

    • Mémoire (Gio) : La quantité de mémoire, jusqu’à 1039 Gio.

    Pour en savoir plus sur les types de VM, voir Types de VM.

    Pour fonctionner correctement, les VM Windows nécessitent au moins un processeur de génération v3, 2 vCores et 4 Gio de mémoire.

  3. Cliquez sur Soumettre.

(optionnel) Modifier le comportement de la VM à sa coupure

  1. Cliquez sur IconForceStop Comportement à la coupure.
    La boîte de dialogue METTRE À JOUR LE COMPORTEMENT À LA COUPURE apparaît.

  2. Dans la liste, sélectionnez une des valeurs suivantes :

    • Arrêter : Lorsque vous coupez la VM, celle-ci s’arrête.

    • Terminer : Lorsque vous coupez la VM, celle-ci s’arrête et est terminée.

    • Redémarrer : Lorsque vous coupez la VM, celle-ci s’arrête et redémarre automatiquement.

  3. Cliquez sur Mettre à jour le comportement à la coupure.

(optionnel) Modifier la protection contre la suppression de la VM

  1. Cliquez sur l’onglet IconDeletionProtection Protection contre suppression.
    La boîte de dialogue METTRE À JOUR LA PROTECTION CONTRE SUPPRESSION apparaît.

  2. Activez ou désactivez le bouton :

    1. S’il est sur activé, vous ne pouvez pas supprimer la VM.

    2. S’il est sur désactivé, vous pouvez la supprimer avec n’importe quelle interface.

  3. Cliquez sur Mettre à jour la protection contre suppression.

Modifier un attribut d’une instance avec Cockpit v1

Cockpit v1 n’est plus corrigé ni supporté. Cockpit v1 n’est plus disponible sur la Région cloudgouv-eu-west-1. Pour en savoir plus, voir Politique de fin de vie.

Avant de commencer :

  • Pour modifier les attributs User data et Type d’instance, vous devez arrêter l’instance.

  • Les autres attributs peuvent être modifiés lorsque l’instance est en fonctionnement ou à l’arrêt.

Ouvrir la boîte de dialogue Modifier les attributs d’une instance

  1. Cliquez sur Calcul > Instances.

  2. Cliquez sur l’instance dont vous voulez modifier les attributs.
    L’instance est sélectionnée.

  3. Cliquez sur Attributs .
    La boîte de dialogue MODIFIER LES ATTRIBUTS D’UNE INSTANCE apparaît.

(optionnel) Modifier le paramètre de suppression de l’instance

  1. Cliquez sur l’onglet Empêcher de terminer l’instance.

  2. Réglez le bouton sur true ou false :

    1. S’il est sur true, vous ne pouvez pas terminer l’instance.

    2. S’il est sur false, vous pouvez la terminer avec n’importe quelle interface.

(optionnel) Modifier le paramètre de suppression des volumes attachés à l’instance

Lorsque vous créez une instance à partir d’une OUTSCALE machine image (OMI) officielle avec Cockpit v1, l’attribut Delete on termination est à true pour le volume système. Si vous attachez des volumes secondaires avec Cockpit v1, l’attribut est à false pour ces volumes.

L’onglet Supprimer les volumes quand l’instance est terminée vous permet uniquement de modifier l’attribut sur true ou false pour tous les volumes en même temps. Si vous voulez modifier cet attribut pour un seul volume à la fois, vous devez utiliser la méthode API ModifyInstanceAttribute.

  1. Cliquez sur l’onglet Supprimer les volumes quand l’instance est terminée.

  2. Réglez le bouton sur true ou false :

    1. Réglez le bouton sur true pour supprimer tous les volumes lorsque l’instance est terminée.

    2. Réglez le bouton sur false pour conserver tous les volumes lorsque l’instance est terminée.

(optionnel) Modifier les security groups associés à l’instance

  1. Cliquez sur l’onglet Security groups.

  2. Dans la liste, sélectionnez le ou les security group(s) que vous voulez associer à l’instance.

  3. Pour dissocier un security group d’une instance, cliquez sur à côté du nom du security group.

  4. Cliquez sur Appliquer pour valider.

(optionnel) Modifier le comportement de l’instance à sa coupure

  1. Cliquez sur l’onglet Comportement à la coupure.

  2. Dans la liste, sélectionnez une des valeurs suivantes :

    • Arrêter : Lorsque vous coupez l’instance, celle-ci s’arrête.

    • Terminer : Lorsque vous coupez l’instance, celle-ci s’arrête et est terminée.

    • Redémarrer : Lorsque vous coupez l’instance, celle-ci s’arrête et redémarre automatiquement.

  3. Cliquez sur Appliquer pour valider.

(VPC uniquement, optionnel) Modifier la vérification source/destination de l’instance

  1. Cliquez sur l’onglet Vérifier source/destination.

  2. Réglez le bouton sur true ou false :

    • S’il est sur true, la vérification source/destination du trafic réseau est activée.

    • S’il est sur false, la vérification source/destination du trafic réseau est désactivée.

(optionnel) Modifier la keypair attribuée à l’instance

  1. Cliquez sur l’onglet Keypair.

  2. Dans la liste, sélectionnez la nouvelle keypair que vous voulez attribuer à l’instance.

  3. Cliquez sur Appliquer pour valider.

    Lorsque vous modifiez une keypair avec Cockpit ou avec les API, les metadata de la VM sont modifiées pour refléter la nouvelle clé publique, mais le remplacement n’est pas encore pris en compte par le système d’exploitation de la VM. Pour finaliser le changement et appliquer concrètement la nouvelle keypair, vous devez effectuer d’autres actions à l’intérieur de la VM.

    Pour en savoir plus, voir Modifier la keypair d’une VM.

(optionnel) Modifier les user data de l’instance

  1. Cliquez sur l’onglet User data.

  2. Dans les champs UserData, tapez les user data. Pour en savoir plus, voir Configurer une VM avec les user data et les tags OUTSCALE.

    Cockpit v1 encode ensuite ces user data en Base64. La taille des user data encodées en Base64 ne doit pas dépasser 500 kibioctets (Kio).

  3. Cliquez sur Appliquer pour valider.

(optionnel) Modifier le type d’instance

  1. Cliquez sur l’onglet Type d’instance.

  2. Spécifiez les attributs suivants pour votre instance :

    • CPU : La génération du processeur.

    • Performance : L’indicateur de performance.

      • Performance highest : Capacité de calcul maximum sur tous les vCPU de la VM. Cette valeur est idéale pour les applications de calcul intensif demandant des performances stables durant le cycle de vie de la VM.

      • Performance high : Haute capacité de calcul sur tous les vCPU de la VM. Cette valeur s’applique à la plupart des cas et offre des performances variables dans le temps.

      • Performance medium : Performance à variation significative sur tous les vCPU de la VM. Cette valeur ne garantit pas des performances constantes, mais est idéale pour les machines à faible demande CPU.

    • Cœur(s) : Le nombre de vCores, jusqu’à 78.

    • Mémoire (Gio) : La quantité de mémoire, jusqu’à 1039 Gio.

    Pour en savoir plus sur les types d’instances, voir Types de VM.

    Pour fonctionner correctement, les VMs Windows nécessitent au moins un processeur de génération v3, 2 vCores et 4 Gio de mémoire.

  3. Cliquez sur Appliquer pour valider.

Modifier un attribut d’une VM avec OSC CLI

Avant de commencer :

  • Pour modifier les attributs VmType, UserData, Performance et NestedVirtualization, vous devez arrêter la VM.

  • Les autres attributs peuvent être modifiés lorsque la VM est en fonctionnement ou à l’arrêt.

À ce jour, cette section est disponible en anglais uniquement.

The UpdateVm command modifies the specified attributes of a virtual machine (VM).
You must stop the VM before modifying the following attributes:

  • NestedVirtualization

  • Performance

  • UserData

  • VmType

Request sample
$ osc-cli api UpdateVm --profile "default" \
    --VmId "i-12345678" \
    --VmType "tinav5.c2r2p2"
Request sample
$ osc-cli api UpdateVm --profile "default" \
    --VmId "i-12345678" \
    --UserData "..."

This command contains the following attributes that you need to specify:

  • BlockDeviceMappings: (optional) One or more block device mappings of the VM.

    • Bsu: (optional) Information about the BSU volume.

      • DeleteOnVmDeletion: (optional) If set to true, the volume is deleted when terminating the VM. If set to false, the volume is not deleted when terminating the VM.

      • VolumeId: (optional) The ID of the volume.

    • DeviceName: (optional) The device name for the volume. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).

    • NoDevice: (optional) Removes the device which is included in the block device mapping of the OMI.

    • VirtualDeviceName: (optional) The name of the virtual device (ephemeralN).

  • BsuOptimized: (optional) This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.

  • DeletionProtection: (optional) If true, you cannot delete the VM unless you change this parameter back to false.

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • IsSourceDestChecked: (optional) (Net only) If true, the source/destination check is enabled. If false, it is disabled. This value must be false for a NAT VM to perform network address translation (NAT) in a Net.

  • KeypairName: (optional) The name of a keypair you want to associate with the VM.
    When you replace the keypair of a VM with another one, the metadata of the VM is modified to reflect the new public key, but the replacement is still not effective in the operating system of the VM. To complete the replacement and effectively apply the new keypair, you need to perform other actions inside the VM. For more information, see Modifying the Keypair of a VM.

  • NestedVirtualization: (optional) (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is disabled.

  • Performance: (optional) The performance of the VM (medium | high | highest).

  • SecurityGroupIds: (optional) One or more IDs of security groups for the VM.

  • UserData: (optional) The Base64-encoded MIME user data, limited to 500 kibibytes (KiB).

  • VmId: The ID of the VM.

  • VmInitiatedShutdownBehavior: (optional) The VM behavior when you stop it. If set to stop, the VM stops. If set to restart, the VM stops then automatically restarts. If set to terminate, the VM stops and is terminated.

  • VmType: (optional) The type of VM. For more information, see VM Types.

The UpdateVm command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • Vm: Information about the VM.

    • Architecture: The architecture of the VM (i386 | x86_64).

    • BlockDeviceMappings: The block device mapping of the VM.

      • Bsu: Information about the created BSU volume.

        • DeleteOnVmDeletion: If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.

        • LinkDate: The date and time of attachment of the volume to the VM, in ISO 8601 date-time format.

        • State: The state of the volume.

        • VolumeId: The ID of the volume.

      • DeviceName: The name of the device.

    • BsuOptimized: This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.

    • ClientToken: The idempotency token provided when launching the VM.

    • CreationDate: The date and time of creation of the VM.

    • DeletionProtection: If true, you cannot delete the VM unless you change this parameter back to false.

    • Hypervisor: The hypervisor type of the VMs (ovm | xen).

    • ImageId: The ID of the OMI used to create the VM.

    • IsSourceDestChecked: (Net only) If true, the source/destination check is enabled. If false, it is disabled. This value must be false for a NAT VM to perform network address translation (NAT) in a Net.

    • KeypairName: The name of the keypair used when launching the VM.

    • LaunchNumber: The number for the VM when launching a group of several VMs (for example, 0, 1, 2, and so on).

    • NestedVirtualization: If true, nested virtualization is enabled. If false, it is disabled.

    • NetId: The ID of the Net in which the VM is running.

    • Nics: (Net only) The network interface cards (NICs) the VMs are attached to.

      • AccountId: The account ID of the owner of the NIC.

      • Description: The description of the NIC.

      • IsSourceDestChecked: (Net only) If true, the source/destination check is enabled. If false, it is disabled. This value must be false for a NAT VM to perform network address translation (NAT) in a Net.

      • LinkNic: Information about the network interface card (NIC).

        • DeleteOnVmDeletion: If true, the NIC is deleted when the VM is terminated.

        • DeviceNumber: The device index for the NIC attachment (between 1 and 7, both included).

        • LinkNicId: The ID of the NIC to attach.

        • State: The state of the attachment (attaching | attached | detaching | detached).

      • LinkPublicIp: Information about the public IP associated with the NIC.

        • PublicDnsName: The name of the public DNS.

        • PublicIp: The public IP associated with the NIC.

        • PublicIpAccountId: The account ID of the owner of the public IP.

      • MacAddress: The Media Access Control (MAC) address of the NIC.

      • NetId: The ID of the Net for the NIC.

      • NicId: The ID of the NIC.

      • PrivateDnsName: The name of the private DNS.

      • PrivateIps: The private IP or IPs of the NIC.

        • IsPrimary: If true, the IP is the primary private IP of the NIC.

        • LinkPublicIp: Information about the public IP associated with the NIC.

          • PublicDnsName: The name of the public DNS.

          • PublicIp: The public IP associated with the NIC.

          • PublicIpAccountId: The account ID of the owner of the public IP.

        • PrivateDnsName: The name of the private DNS.

        • PrivateIp: The private IP.

      • SecurityGroups: One or more IDs of security groups for the NIC.

        • SecurityGroupId: The ID of the security group.

        • SecurityGroupName: The name of the security group.

      • State: The state of the NIC (available | attaching | in-use | detaching).

      • SubnetId: The ID of the Subnet for the NIC.

    • OsFamily: Indicates the operating system (OS) of the VM.

    • Performance: The performance of the VM (medium | high | highest).

    • Placement: Information about the placement of the VM.

      • SubregionName: The name of the Subregion. If you specify this parameter, you must not specify the Nics parameter.

      • Tenancy: The tenancy of the VM (default | dedicated).

    • PrivateDnsName: The name of the private DNS.

    • PrivateIp: The primary private IP of the VM.

    • ProductCodes: The product codes associated with the OMI used to create the VM.

    • PublicDnsName: The name of the public DNS.

    • PublicIp: The public IP of the VM.

    • ReservationId: The reservation ID of the VM.

    • RootDeviceName: The name of the root device for the VM (for example, /dev/vda1).

    • RootDeviceType: The type of root device used by the VM (always bsu).

    • SecurityGroups: One or more security groups associated with the VM.

      • SecurityGroupId: The ID of the security group.

      • SecurityGroupName: The name of the security group.

    • State: The state of the VM (pending | running | stopping | stopped | shutting-down | terminated | quarantine).

    • StateReason: The reason explaining the current state of the VM.

    • SubnetId: The ID of the Subnet for the VM.

    • Tags: One or more tags associated with the VM.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • UserData: The Base64-encoded MIME user data.

    • VmId: The ID of the VM.

    • VmInitiatedShutdownBehavior: The VM behavior when you stop it. If set to stop, the VM stops. If set to restart, the VM stops then automatically restarts. If set to terminate, the VM stops and is deleted.

    • VmType: The type of VM. For more information, see VM Types.

Result sample
{
  "Vm": {
    "VmType": "tinav5.c2r2p2",
    "VmInitiatedShutdownBehavior": "stop",
    "State": "stopped",
    "StateReason": "",
    "RootDeviceType": "ebs",
    "RootDeviceName": "/dev/sda1",
    "IsSourceDestChecked": true,
    "KeypairName": "keypair-example",
    "ImageId": "ami-12345678",
    "DeletionProtection": false,
    "Architecture": "x86_64",
    "NestedVirtualization": false,
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeId": "vol-12345678",
          "State": "attached",
          "LinkDate": "2010-10-01T12:34:56.789Z",
          "DeleteOnVmDeletion": true
        }
      }
    ],
    "VmId": "i-12345678",
    "ReservationId": "r-12345678",
    "Hypervisor": "xen",
    "Placement": {
      "Tenancy": "default",
      "SubregionName": "eu-west-2a"
    },
    "ProductCodes": [
      "0001"
    ],
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "UserData": "",
    "SubnetId": "subnet-12345678",
    "PrivateIp": "10.0.0.4",
    "SecurityGroups": [
      {
        "SecurityGroupName": "security-group-example",
        "SecurityGroupId": "sg-12345678"
      }
    ],
    "BsuOptimized": false,
    "LaunchNumber": 0,
    "NetId": "vpc-12345678",
    "Nics": [
      {
        "SubnetId": "subnet-12345678",
        "State": "in-use",
        "LinkNic": {
          "State": "attached",
          "DeviceNumber": 0,
          "LinkNicId": "eni-attach-12345678",
          "DeleteOnVmDeletion": true
        },
        "IsSourceDestChecked": true,
        "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
        "Description": "Primary network interface",
        "AccountId": "123456789012",
        "SecurityGroups": [
          {
            "SecurityGroupName": "security-group-example",
            "SecurityGroupId": "sg-12345678"
          }
        ],
        "MacAddress": "A1:B2:C3:D4:E5:F6",
        "NetId": "vpc-12345678",
        "NicId": "eni-12345678",
        "PrivateIps": [
          {
            "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
            "PrivateIp": "10.0.0.4",
            "IsPrimary": true
          }
        ]
      }
    ],
    "Performance": "high",
    "Tags": [
      {
        "Value": "prod",
        "Key": "env"
      }
    ],
    "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
Result sample
{
  "Vm": {
    "VmType": "tinav5.c1r1p2",
    "VmInitiatedShutdownBehavior": "stop",
    "State": "stopped",
    "StateReason": "",
    "RootDeviceType": "ebs",
    "RootDeviceName": "/dev/sda1",
    "IsSourceDestChecked": true,
    "KeypairName": "keypair-example",
    "ImageId": "ami-12345678",
    "DeletionProtection": true,
    "Architecture": "x86_64",
    "NestedVirtualization": false,
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeId": "vol-12345678",
          "State": "attached",
          "LinkDate": "2010-10-01T12:34:56.789Z",
          "DeleteOnVmDeletion": true
        }
      }
    ],
    "VmId": "i-12345678",
    "ReservationId": "r-12345678",
    "Hypervisor": "xen",
    "Placement": {
      "Tenancy": "default",
      "SubregionName": "eu-west-2a"
    },
    "ProductCodes": [
      "0001"
    ],
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "UserData": "...",
    "SubnetId": "subnet-12345678",
    "PrivateIp": "10.0.0.4",
    "SecurityGroups": [
      {
        "SecurityGroupName": "security-group-example",
        "SecurityGroupId": "sg-12345678"
      }
    ],
    "BsuOptimized": false,
    "LaunchNumber": 0,
    "NetId": "vpc-12345678",
    "Nics": [
      {
        "SubnetId": "subnet-12345678",
        "State": "in-use",
        "LinkNic": {
          "State": "attached",
          "DeviceNumber": 0,
          "LinkNicId": "eni-attach-12345678",
          "DeleteOnVmDeletion": true
        },
        "IsSourceDestChecked": true,
        "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
        "Description": "Primary network interface",
        "AccountId": "123456789012",
        "SecurityGroups": [
          {
            "SecurityGroupName": "security-group-example",
            "SecurityGroupId": "sg-12345678"
          }
        ],
        "MacAddress": "A1:B2:C3:D4:E5:F6",
        "NetId": "vpc-12345678",
        "NicId": "eni-12345678",
        "PrivateIps": [
          {
            "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
            "PrivateIp": "10.0.0.4",
            "IsPrimary": true
          }
        ]
      }
    ],
    "Performance": "high",
    "Tags": [
      {
        "Value": "prod",
        "Key": "env"
      }
    ],
    "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Modifier un attribut d’une instance avec AWS CLI

Avant de commencer :

  • Pour modifier les attributs instance-type et user-data, vous devez arrêter l’instance.

  • Les autres attributs peuvent être modifiés lorsque l’instance est en fonctionnement ou à l’arrêt.

Pour modifier un attribut d’une instance, utilisez la commande modify-instance-attribute suivant cette syntaxe :

Vous ne pouvez modifier qu’un seul attribut à la fois.

Exemple de requête
 $ aws ec2 modify-instance-attribute \
    --profile YOUR_PROFILE \
    --instance-id i-12345678\
    --attribute ATTRIBUTE_NAME \
    --value ATTRIBUTE_VALUE \
    --disable-api-termination \
    --block-device-mappings VALUE \
    --instance-type m1.large \
    --user-data VALUE \
    --instance-initiated-shutdown-behavior stop \
    --groups sg-12345678 \
    [--ebs-optimized NOT_SPECIFIED] \
    --source-dest-check \
    --endpoint https://fcu.eu-west-2.outscale.com

Cette commande contient les attributs suivants que vous devez spécifier :

  • (optionnel) profile : Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI.

  • instance-id : L’ID de l’instance dont vous voulez modifier l’attribut.

  • (optionnel) attribute : Le nom de l’attribut (userData | rootDeviceName | instanceType | groupSet | ebsOptimized | sourceDestCheck | blockDeviceMapping | disableApiTermination | instanceInitiatedShutdownBehavior).

  • (optionnel) value : La valeur de l’attribut (uniquement pour les attributs suivants : userData, disableApiTermination ou instanceInitiatedShutdownBehavior).

  • (optionnel) disable-api-termination : Si paramétré sur true, vous ne pouvez pas terminer l’instance, quelle que soit l’interface. Si paramétré sur false, vous pouvez.

  • (optionnel) block-device-mappings : Informations sur les volumes BSU attachés à l’instance. Cet attribut contient les éléments suivants que vous devez spécifier :

    • DeviceName : Le nom de périphérique utilisé pour attacher le volume à l’instance. Pour en savoir plus, voir À propos des volumes.

      Pour modifier l’attribut DeleteOnTermination, cet élément est requis.

    • (optionnel) Ebs : Informations sur le volume attaché à l’instance. Cet élément contient l’élément suivant que vous devez spécifier :

      • (optionnel) DeleteOnTermination : Par défaut ou si paramétré sur true, le volume est supprimé lorsque l’instance est terminée. Si paramétré sur false, il ne l’est pas.

        Pour modifier l’attribut block-device-mappings pour plusieurs volumes en même temps, utilisez la syntaxe suivante :

        '[{"DeviceName": "/dev/sda1", "Ebs": {"DeleteOnTermination": false}}, {"DeviceName": "/dev/sdb", "Ebs": {"DeleteOnTermination": false}}]'
  • (optionnel) instance-type : Le type d’instance (quantité de vCores, mémoire, stockage). Pour en savoir plus, voir Types de VM.

    Pour fonctionner correctement, les VMs Windows nécessitent au moins un processeur de génération v3, 2 vCores et 4 Gio de mémoire.

  • (optionnel) user-data : De nouvelles user data pour l’instance. Pour en savoir plus, voir Configurer une VM avec les user data et les tags OUTSCALE.

    Les user data existantes sont effacées et remplacées par celles spécifiées ici.

  • (optionnel) instance-initiated-shutdown-behavior : Le comportement lorsque vous coupez l’instance. Par défaut ou si paramétrée sur stop, l’instance s’arrête. Si paramétrée sur terminate, l’instance s’arrête et est terminée. Si paramétrée sur restart, l’instance s’arrête et redémarre automatiquement.

  • (optionnel) groups : Un ou plusieurs ID de security groups pour l’instance.

  • (optionnel) source-dest-check|no-source-dest-check : Si paramétré sur source-dest-check, la vérification source-destination du trafic réseau est activée. Si paramétré sur no-source-dest-check, elle est désactivée.

    Vous pouvez modifier l’attribut sourceDestinationCheck uniquement si l’instance est dans un VPC.

  • (optionnel) ebs-optimized : Indique si l’instance est optimisée pour BSU.

  • endpoint : Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête.

L’attribut spécifié est modifié.

Pages connexes

Méthodes API correspondantes

AWS™ et Amazon Web Services™ sont des marques de commerce d’Amazon Technologies, Inc. ou de ses affiliées aux États-Unis et/ou dans les autres pays.