Deleting a placement group

    Delete the placement group.

    If you don't have the Yandex.Cloud command line interface yet, install it.

    The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

    1. View a list of VM instances in the placement group:

      $ yc compute placement-group list-instances --name my-group
      +----------------------+---------------------+---------------+---------+-------------+-------------+
      |          ID          |        NAME         |    ZONE ID    | STATUS  | EXTERNAL IP | INTERNAL IP |
      +----------------------+---------------------+---------------+---------+-------------+-------------+
      | epdep2kq6dt5uekuhcrd | instance-in-group-1 | ru-central1-b | RUNNING |             | 10.129.0.5  |
      | epdlv1pp54019j09fhue | instance-in-group-2 | ru-central1-b | RUNNING |             | 10.129.0.30 |
      +----------------------+---------------------+---------------+---------+-------------+-------------+
      
    2. Delete the instances in the group:

      $ yc compute instance delete --name instance-in-group-1
      $ yc compute instance delete --name instance-in-group-2
      
    3. Delete the placement group:

      $ yc compute placement-group delete --name my-group
      
    4. Check that the placement group was deleted:

      $ yc compute placement-group list
      +----+------+----------+
      | ID | NAME | STRATEGY |
      +----+------+----------+
      +----+------+----------+
      

    Use the delete API method.