Updating an origin group
Editing a group
To update an origin group:
- In the management console
, select the folder where you want to create a resource group. - Select Cloud CDN.
- In the left-hand panel, select
Origin groups. - Select the group to edit.
- In the top-right corner, click
Edit. - Edit as appropriate.
- Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID>
command. You can also set a different folder for any specific command using the --folder-name
or --folder-id
parameter.
-
View the description of the CLI command to edit an origin group:
yc cdn origin-group update --help
-
Get a list of all origin groups in the default folder:
yc cdn origin-group list --format yaml
Result:
- id: "90209" folder_id: b1g86q4m5vej******** name: test-group-1 ... origin_group_id: "90208" source: www.a1.com enabled: true
-
Edit the settings of the origin group by specifying the group ID:
yc cdn origin-group update --id <origin_group_ID> \ --name <new_group_name> \ --origin source=<new_origin_IP_address_or_domain_name>,enabled=true \ --origin source=<new_origin_IP_address_or_domain_name>,enabled=true,backup=true
Where
--origin
is the origin specification:source
: New origin's IP address or domain name.enabled
: Flag showing whether the origin is enabled.backup
: Flag showing whether the origin as a backup one.
Result:
id: "90209" folder_id: b1g86q4m5vej******** name: test-group-22 ... origin_group_id: "90209" source: www.site1.com enabled: true
For more information about the
yc cdn origin-group update
command, see the CLI reference.
To update an origin group, use the update REST API method for the OriginGroup resource or the OriginGroupService/Update gRPC API call.
Deleting one origin from a group
Note
You can only delete backup origins.
To delete an origin from an origin group:
- In the management console
, select the folder where you want to create a resource group. - Select Cloud CDN.
- In the left-hand panel, select
Origin groups and click the name of the group to delete an origin from. - Select the appropriate origin and click Delete in the bottom panel.
- In the window that opens, click Delete.
Use the delete REST API method for the Origin resource or the OriginService/Delete gRPC API call.
Deleting multiple origins from a group
Note
You can only delete backup origins.
To delete multiple origins from a group:
- In the management console
, select the folder where you want to create a resource group. - Select Cloud CDN.
- In the left-hand panel, select
Origin groups and click the name of the group to delete origins from. - Select the appropriate origins and click Delete in the bottom panel.
- In the window that opens, click Delete.