Creating a placement group
Create a placement group.
CLI
API
If you don't have the Yandex.Cloud command line interface yet, install and initialize 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.
-
View a description of the CLI command to create a placement group:
$ yc compute placement-group create --help
-
Create a placement group:
$ yc compute placement-group create --spread-strategy --name my-group id: fd83bv4rnsna2sjkiq4s folder_id: b1g5kkhshgs9s0l4609d created_at: "2019-12-30T10:07:34Z" name: my-group spread_placement_strategy: {}
This command creates a placement group with the following characteristics:
- Named
my-group
. - Distributed placement strategy (
spread
).
- Named
-
Check that the placement group was added:
$ yc compute placement-group list +----------------------+----------+----------+ | ID | NAME | STRATEGY | +----------------------+----------+----------+ | fd83bv4rnsna2sjkiq4s | my-group | SPREAD | +----------------------+----------+----------+
Use the create API method.